Jetdsp
JETDSP Homepage
Manual Homepage
Signal Processing Homepage
 
Signal processing
Basic guide
Advanced guide
IBM NEWDSP-syntax
Use your code
Signal slicing
Simple expressions
 
Tutorial
Introduction
Internals
IDL commands
Interpolation
Writing your own code
Adding functions to the Simple dialogue
 
How to...
Read data
Define structure
 
Functions
jetSmooth
jetint
jetsubset
jetmerge
fixgrid
jetwindowpoints
 

IDL commands

JETDSP passes signals to the signal processing interface as arrays of data. These arrays can be of the form X, i.e. a single integer or floating point number, X[25], i.e. a vector of data, or X[20,200], i.e. an array of data. These are referred to as 1D, 2D and 3D signals respectively. Certain commands may not be available for certain dimensions of signals, e.g. trying to take the vector product of two signals may not be a good idea if they are both single integers.

IDL has many useful commands that JETDSP supports. Simple examples are :

  • NEWSIGNAL = SIGNAL1 + SIGNAL2. The operators +, -, /, and * are all supported
  • NEWSIGNAL = SIGNAL1 ## SIGNAL2 will perform matrix multiplication (row of SIGNAL1 multiplied by column of SIGNAL2) and # will return column of SIGNAL1 multiplied by row of SIGNAL2
  • NEWSIGNAL = SIGNAL1^2 will produce the square of SIGNAL1
  • NEWSIGNAL = EXP(SIGNAL1) will return the natural exponential of SIGNAL1. The functions EXP, ALOG, 10^ and ALOG10 are all available
  • NEWSIGNAL = SIN(SIGNAL1) . The trigonometric functions SIN, COS, TAN, ASIN, ACOS, ATAN, SINH, COSH and TANH are all supported
  • NEWSIGNAL = SMOOTH(SIGNAL1, 5) will return a smoothed version of SIGNAL1. The value 5 indicates the width of the boxcar average used for the smoothing.
  • NEWSIGNAL = ABS(SIGNAL1) will return the absolute value of SIGNAL1. The functions MAX, MIN, MEAN, MEDIAN, TOTAL, TRACE and MOD are also supported
  • NEWSIGNAL = FFT(SIGNAL1, -1) will take the Fourier transform of SIGNAL1. NEWSIGNAL2 = FFT(NEWSIGNAL, 1) will take the inverse transform

This list is by no means exhaustive. More details are given in the IDL manual. Combinations of these commands may also be used, e.g. NEWSIGNAL = EXP(SIGNAL1 + SIGNAL2) . IDL is not case sensitive, so EXP and exp are both valid commands. The use of parantheses to indicate the command is recommended; e.g. NEWSIGNAL = (SIGNAL1 + SIGNAL2)/SIGNAL2 is clear but NEWSIGNAL = SIGNAL1 + SIGNAL2 / SIGNAL2 is not.

It is also possible to create simple signals directly through the signal processing dialogue. The command

NEWSIGNAL = 2.1

will return a floating point signal, of value 2.1. The command

NEWSIGNAL = FINDGEN(200)

will produce a floating point vector of 200 elements, with each element set equal to its index in the vector. Since IDL uses C indexing, NEWSIGNAL[0] will have the value 0 and NEWSIGNAL[199] will have the value 199. Note that this differs to the indices used in slicing which are FORTRAN indexed and start at 1.

This FINDGEN function can be useful for producing other simple functions, e.g. NEWSIGNAL = SIN(FINDGEN(200)) will produce a sine wave. FINDGEN and the related functions DINDGEN (for double precision), LINDGEN (for long integers) and BINDGEN (for short integers) are available in the form FINDGEN(x) or FINDGEN(x,y) resulting in 2D and 3D signal respectively.

Note that all axes can be used, and also that the dimensionality can change. In the last example in the table below the time axis needs to be specified explicitly.
Function descriptionData vector Horizontal (Time) Horizontal (x)
Transposing a 3-D signal. transpose(NE1)ne1_xne1_time
Total of all points.total(NE1)
Total of points at each time.total(NE1,2)
Total of points at each x.total(NE1,1)NE1_X

Previous page Next page

Top  JETDSP Home Page  Manual  FAQ 
Please send comments to: data-and-coding-support@ccfe.ac.uk