Contents
JETDSP tutorial Home page
Jetdsp Main Page
Online Manual
FAQ
Transp Data
Timeslice editor
Tutorials
Main Tutorial
TRANSP data Tutorial
Data Preparation Tutorial
 

Data preparation Tutorial

Introduction

Using 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.
  1. Read the PPF CXSM/TI and plot it. Note that near 45s all the values go to zero due to an error in the data. Using this directly in TRANSP could cause an error, so this timeslice needs to be removed.
  2. Using the signal processing dialog select 'Simple Expression' and set the 'Type of Processing' to f(t,x). These are the operations possible on profile data.
  3. Select 'Subset(t)' and the signal to subset. Enter the parameters see here for details, and remembering to give the signal a name create two signals, one with all the data before the problem timeslice and one with the data afterwards.
  4. Now use the 'Merge(t)' operation to join these two parts back together.
  5. Plot the merged signal and the original signal on separate plots and compare.

Removing Slices using IDL expressions

It 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.

  1. Construct a signal plotting TI against RCOR only for the valid points using IDL expressions.
  2. Save this signal in the PPF system. (An intermediate signal processing step in required.)

Merging without using the simple expressions

In 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.
  1. Read the private PPF signals LHCR/RFCR and LHCR/DSPE for uid=ybar and the following sequences. Each of these correspond to a given time point.
  2. SequenceTime
    36349.0
    36446.4
    36550.4
  3. Bring up the simple expression dialog and display the 3D merge expression.
  4. Copy the IDL expression used into the second field of the IDL expression dialog.
  5. Alter this expression to join the first two RFCR slices together, note that there is no X vector for these signals, but they have a Time vector.
  6. Alter the expression to join the third slice to the two other slices.
  7. Repeat for DSPE.
  8. Plot the resultant signals as surfaces.
  9. Save the signals as LHCD/JPSI and LHCD/PPSI under your userid.
Note that this method will work for slices not on the same axes since they will be interpolated onto a common axis.

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 signals

Many 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.
  1. Smooth LIDR/NE by one point in the radial direction and one point in the time direction. Use both a rectangular and triangular window and compare the results.

Elimination of bad points

IDL 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.

  1. Read in 53521/LIDR/NE sliced at 44.87s
  2. Apply the following IDL signal processing expression
  3. 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 routines

The 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 data

Sometimes 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.
  1. Read KK3S/PRFL?uid=ybar
  2. Use the simple subset function to remove all points above 3.6m
  3. Use the slice signal function to get the last good x-slice
  4. Create a signal with data one fifth of this signal
  5. Use the merge function (Not possible from simple) to merge this slice back in at 3.85m

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.


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