|
Data preparation TutorialIntroductionUsing JETDSP it is possible to perform a large number of signal processing tasks. This tutorial introduces the main tasks required for preparing data for TRANSP runs. For information about how to perform individual tasks see the JETDSP manual. All data is for pulse 53521.Subset and Merge using 'Simple' Expressions.The Simple Expressions part of the Signal Processing dialog allows shortcuts to commonly used expressions. Two of the most commonly used expressions within these are the Subset and Merge options.
Removing Slices using IDL expressionsIt is possible to remove slices using just IDL expressions. 3D signals are stored as F(t,x) so F[0,*] is the first timeslice. F[0:3,*] is the first four timeslices, and F[5:*] contains all timeslices from the sixth to the end.The signal CXSM/RCOR contains the corrected radii, but the first point for each timeslice is sometimes invalid. CXSM/TI for pulse 53521 goes to zero at the wrong place and hence the last point for each timeslice is wrong.
Merging without using the simple expressionsIn some cases the simple signal processing expressions do not do everything that is required. In these cases the IDL expression can be used to perform the tasks. For example there are expressions for merging two 2D signals to produce a new 2D signal, but there is not an expression to merge two 2D signals to produce a 3D signal.
In this example all the signals share a common second axis and hence these can be merged using IDL array concatenation. Assuming the signals RFCR1,2,3 correspond to Sequences 363,4,5 respectively; Name RFCR_NEW Data transpose([[RFCR2],[RFCR1],[RFCR3]]) Time [46.4,49.0,50.4] X RFCR_TIME Smoothing signalsMany signals have noise and this can cause problems, this can be improved by smoothing. Smoothing in JETDSP works by smoothing points within a user-defined window. This window can be based on either indices or values. The window can be of rectangular shape or triangular shape and can be of any width.
Elimination of bad pointsIDL has many useful signal processing routines built in. Some of these can be used to remove bad points, see here and here for some that can be implemented within the Simple signal processing dialog.However there are cases when these are not what is required. For example LIDR/NE should not become 0 before X=3.85m, but plotting it shows that it does. An IDL expression can be used to remove those points with radius less than 3.85m with value 0. This works on 2D signals only.
Name NE2 Data NE1[WHERE(NE1 GT 0 OR NE1_TIME ge 3.85)] Time NE1_TIME[WHERE(NE1 GT 0 OR NE1_TIME ge 3.85)]The 'WHERE' part select the indices of the points of interest and the NE1[..] parts extract these points. Only points which have a value greater than 0 or a radius greater than 3.85 are kept. Writing your own routinesThe above approach only works for 2D signals, it may be a lot of work to split, modify and join each timeslice in turn. One solution to this is top write your own routine to perform such a task for all slices automatically. Note that some interpolation is required to keep the same number of points in each slice.Extrapolation of dataSometimes data is required in regions where none exists, this can be done in a variety of ways. One method would be to use the IDL routine 'interpol' to extrapolate each timeslice. This could be done for all routines by use of a user written function. An alternative is to set a known limit e.g. the value is zero at a known radius and interpolate between these values to fill the middle using the IDL routine 'BILINEAR'. The solution in this case is to remove the bad data and add a scaled copy of the last good data at a known radius.
Note that this can all be done in one stage by using the IDL expression; TEST = [[PRFL[*,0:38]],[PRFL[*,38]/5]] & TEST_TIME=PRFL_TIME & TEST_X=[PRFL_X[0:38],3.85] The use of this involves quite detailed knowledge of IDL and this is shown to demonstrate the power of IDL. |