Basic Signal Processing in JETDSPThis is an introduction to creating processed signals in Jetdsp. A more comprehensive guide is given here. The signal processing dialogsThe signal processing features of JETDSP are accessed via the Signal Processing menu of both the main JETDSP window and the View/Print window. The 'Create processed signal' option launches the Signal Processing dialog, which may look like this: Along the top are three buttons which specify what type of processing expression you want to use, Simple expressions allows shortcuts to commonly used IDL expressions whilst IBM expression allows the use of expressions from IBM-JETDSP. At the bottom is row of boxes to enter the unit labels for the new signal IDL expressionTo create a new signal:
The data vector for the new signal may be an IDL expression using zero or more existing signals. For example, suppose that the plasma currents for 2 shots have been created in JETDSP through the read signal dialogue as IPLA and IPLA1. Using these, create a processed signal DIFF by entering 'DIFF' in the new internal name field and IPLA-IPLA1 in the Data vector field . The program will fill in the IDL command field automatically with: DIFF = IPLA - IPLA1 Clicking on 'Create signal' creates the signal and adds it to the main JETDSP table, from where it may be plotted. You could achieve the same result by typing DIFF = IPLA - IPLA1 directly into the IDL command field yourself. Note that the Data vector field does not need to include an existing signal. For example, the following generates a sine wave. Data vector: SIN(FINDGEN(200))Other possible IDL commands are the SMOOTH command. For example: Data vector: SMOOTH(IPLA,5)will create a smoothed version of the IPLA signal. IDL commandsIDL has many useful commands that JETDSP supports. Simple examples are :
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 parentheses 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 creates 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: NEWSIGNAL(200) is undefined. 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 whilst it is possible to reference a single element of a vector or an array, such as NEWSIGNAL2 = NEWSIGNAL[23] , it is not possible at present to access ranges of an array without using the jetSubset function. Simple ExpressionsBy selecting the 'Simple Expression' button in the top line of the window the simple expression dialog is displayed: This dialog allow quick entry of commonly used expressions. User expressions can be added to this dialog by following the steps described here. The processing options are split into 4 types, shown in the upper droplist.
To subtract one signal from another as before;
Signal Slicing (Profiles)A profile of a signal can be created using signal slicing, see here. Further details of possible IDL commands are given in the IDL manual. The processed signal dialogue supports all common commands in IDL5.2. InterpolationIn the case of 2 or more existing signals being processed, then a decision has to be made about the positioning of the data points. If the data points coincide in time (which is usually the x-axis for JET signals), then the time points which are used are the existing ones. If the time points do not coincide, then the default is to take a linear interpolation onto the superset of the time points of the 2 (or more) signals. If a signal does not exist in a certain range, then no interpolation will be possible in that range. By clicking on the 'Interpolation...' button, the user may use the Interpolation dialogue to define their own time points, by specifying a range and the number of data points. If the start and end of the specified range are equal, then the superset of the time points of the signals is used. The spacing of the data points can also be set (NB: only equal point spacing available as of 28/05/1999). The user may also use cubic interpolation rather than linear interpolation. |