NAME: tek_inpcsv- input tek scope csv file SYNTAX: istat=tek_inpcsv(file,d,hdrar=hdrar) ARGS: file: string .csv file to input KEYWORDS: RETURNS: istat : int npts > 0 1 ok, -1 error, will print error msg d : {} structure with returned info hdrar[17]:strarr if present then return ascii header from file DESCRIPTION: Input a tektronix scope .csv binary. The routine was written to handle files with all 4 channels (eg tek0003ALL.csv). If there are fewer channels, then you will still get arrasy of 4..but the channels that are missing will have 0's (this needs to be checked). The returned structure contains: IDL> help,d,/st ** Structure <19333f8>, 10 tags, length=2000136, data length=2000132, refs=1: CHANS INT Array[4] NPNTS LONG 100000 XUNIT STRING 's' XSTEP FLOAT 2.00000e-10 XZERO FLOAT 8.00000e-06 YUNITS STRING Array[4] XDAT FLOAT Array[100000] YDAT FLOAT Array[100000, 4] If hdrar= is supplied, the ascii file header will be returned; an example is: print,hdrar
(See /pkg/rsi/local/libao/phil/tek/tek_inpcsv.pro)
NAME: tek_inpisf- input tek scope binary save file SYNTAX: istat=tek_inpisf(file,d,hdrar=hdrar) ARGS: file: string .isf file to input KEYWORDS: RETURNS: istat : int 1 ok, -1 error, will print error msg d : {} structure with returned info hdrar[23]:strarr if present then return parsed ascii header from file DESCRIPTION: Input a tektronix scope .isf binary. The routine makes a few assumptions on the input: - 16 bit binary The returned structure contains: IDL> help,d,/st ** Structure <1523638>, 10 tags, length=800056, data length=800056, refs=1: CHAN LONG 4 ; 1 thru 4. channel of scope NPNTS LONG 100000 ; number points in data array XUNIT STRING 's' ; s - seconds XSTEP FLOAT 2.00000e-10 ; time for 1 sample XZERO FLOAT -5.62000e-06 ; time offset for 1st time point YUNIT STRING 'V' ; ydim V=volts YSTEP FLOAT 3.12500e-05 ; # of yunits for 1 step in raw integer input YOFFSET FLOAT -12800.0 ; display offset in raw input y integer XDAT FLOAT Array[100000] ; time in seconds for each sample YDAT FLOAT Array[100000] ; ydata converted to volts (or at least yunits). If hdrar= is supplied, the ascii file header will be returned, parsed on each ; an example is: print,hdrar IDL> for i=0,22 do print,hdrar[i] :WFMP:NR_P 100000 :WFMP:BYT_N 2 BIT_N 16 ENC BIN BN_F RI BYT_O MSB WFI "Ch4, DC coupling, 200.0mV/div, 2.000us/div, 100000 points, Sample mode" NR_P 100000 PT_F Y XUN "s" XIN 200.0000E-12 XZE -5.6200E-6 PT_O 0 YUN "V" YMU 31.2500E-6 YOF -12.8000E+3 YZE 0.0E+0 VSCALE 200.0000E-3 ;HSCALE 100.0000E-9 VPOS -2.0000 VOFFSET 0.0E+0 HDELAY 0.0E+0 :CURV #
(See /pkg/rsi/local/libao/phil/tek/tek_inpisf.pro)