function readexample,pulno,signal,xVal ;This is an example function to demonstrate how to read data into JETDSP ;using the signal processing functions. This example requires the JPF system. ; The example reads data from the KY6 spectrometer, this is 3D data, and only ; slice of the data is shown. ;This defines the return structure that needs filling with the values. resultStruct={JetProcSignal $ ,data:ptr_new() $ ,time:ptr_new() $ ,x:ptr_new() $ ,type:'' $ ,tAxisType:0 $ ,xAxisType:0 $ ,multigraph:0 $ ,n_multi:1 $ ,slice:'' $ ,status:0 $ } ; Assume success. resultStruct.status=1 ; convert signal number into string. signalNumStr=strtrim(string(signal),2) ; append this string to each signal name. ;This is the data signal signal='DH/Y6-SPEC:00'+signalNumStr ;This signal contains one value corresponding to the number of X points. xSizeSignal='DH/Y6-ACTSEG