Advance Signal Processing in JETDSPM.Walters, S.Bird, D.Kinna ContentsVariables available to a Signal Processing expression The JETDSP signal that is created
IntroductionThis document describes the details of how JETDSP creates a processed signal. Some knowledge of IDL is assumed. For a more simple view of this subject, see the Introduction. The aim of the signal processing code is to make the JET data that the program holds available to the full range of IDL commands, and to make the results of these commands available for plotting. Creating a new SignalTo create a processed signal, JETDSP requires input of the following form in the 'IDL expression:' box: newsignal = expression where:
JETDSP's signal processing dialog and functions will not allow multiple lines using the continuation character ($). The maximum length of the input, including the newsignal component, is 255 characters. The expression can be created by typing the parts of the expression into the four individual text boxes. These are then used to create the 'IDL expression'. JETDSP:
IDL Variables available to a Signal Processing expressionJETDSP searches the input for internal names of the signals that the program is holding. For each signal present with internal name name, the program makes the following IDL variables available:
The size of the name vector may not correspond to their size in the originating PPF or in the program as they are currently held. This is because the expression may refer to signals on different timebases. See Interpolation below. The IDL Variable that the expression createsGiven the input: newsignal = expression expression must be an IDL function (user or system) or operator, or combination of functions and operators, acting on the above variables to return a value that is one of the following:
with type byte, integer, longword, floating point or double precision. See the IDL documentation for a description of these types. The JETDSP Signal that is createdJETDSP examines the result of the expression (called here the 'output variable') and creates a signal for plotting based on it.
InterpolationWhen JETDSP performs signal processing, it checks to see how many existing signals are present in the IDL expression and makes them available to IDL. If there are two or more existing signals in the expression, then JETDSP will instruct IDL to perform an interpolation of the data onto a new interpolated time vector. If there is only one signal, then the time vector of that signal is taken as the time vector of the result. The interpolated time vector is defined by the following set of parameters:
The default interpolated time vector is the superset of the input time vectors, within the common time range of all the input signals. The data vector of each signal is then interpolated onto the interpolated time vector using linear interpolation, and the result is made available to IDL. The expression is then evaluated. If a result is valid, then a new signal of the appropriate dimension is created and the interpolated time vector is taken as the time vector of this result. If the result is a 3D signal, then the X vector of the first signal in the expression is taken as the X vector of the result. The signal processing dialogue provides an interface to the interpolation parameters dialogue. A brief introduction may be found here or in the Tutorial. This dialogue allows the user to define a specific time range in which the new signal exists, to choose the number of data points in that range, and whether they should be equally spaced or not. It is also possible to choose a cubic interpolation rather than linear interpolation. Note that the defualt parameters will be used if this dialogue is left unchanged. Some of the parameters are only available under certain situations. For example, the point spacing parameter may only be changed if the number of points parameter is non-zero. It is possible to change some parameters and to use the default settings for the others. In all cases, the interpolated time vector is constructed first, using the parameters mentioned above. The IDL interpolation routines are then used to construct data vectors which exist in the same time range and have the same number of data points as the interpolated time vector. The original data vectors are still available to JETDSP during the interpolation, and may be accessed by specifying signal1_raw. Similarly the original 'TIME' and 'X' vectors are accessible using signal1_time_raw and signal1_x_raw respectively. For certain combinations of signals, interpolation may not be possible. An obvious example is the case where two signals do not have a common time range. If two signals of different dimensions are used, say a 1D signal and a 2D signal, then the result will be a 1D signal. In these cases merging the signals may be more appropriate.
Specifying an explicit time vectorThe process described so far gives the new signal the interpolated time vector whether or not this is appropriate. For example, the following takes a slice of 3D signal signal in the X-direction, but results in an unplottable new signal because the associated horizontal axis 'time' vector is the default interpolated time - in this case, the time vector of signal: newsignal = transpose(signal[50,*]) What we really want to construct is a 2D signal of data against the 'X' vector. To do this, concatenate a second IDL expression onto the end of the first using the standard IDL '&' operator: newsignal = transpose(signal[50,*]) & newsignal_time = signal_x Or alternatively use the 'time_vector' box on the dialog. This will result in the required output. Note that in the most general case, the number of elements in the 'time' and 'X' vectors will not be the same, so it is very important to select the correct horizontal axis to match the number of data points. Failure to do so will result in an unplottable signal. The slices described above may also be constructed using the 'Slice Signal' dialog of the view window. See the Signal Slicing documentation. Signal versus signalIt is possible to plot one data signal against another using the '&' operator as above: newsignal = signal1 & newsignal_time = signal2 will plot signal1 against signal2 (i.e. signal2 is treated as the 'time' axis). Note that signal1 and signal2 will be interpolated onto a common time base (based on signal1_time and signal2_time). To use the actual data use '_raw' as described above. |