PRO readparm,date,nlines,ut,parms,cam0,cam1 ; The last two are optional output parameters; if specified, ; the indices of the parameters from Camera 0 and 1 images, ; respectively, are returned in them. This assists in plotting ; the data from each camera individually. IF N_PARAMS() LT 4 THEN BEGIN MESSAGE,'Usage: readparm,date,nlines,ut,parms' RETURN END path='\IDL\DATA\' file=STRTRIM(date,2)+'.SRT' f=FINDFILE(path+file,COUNT=nf) IF nf EQ 0 THEN BEGIN MESSAGE,path+file+' not found' RETURN ENDIF OPENR,in,path+f(0),/GET_LUN ut=FLTARR(3000) & parms=INTARR(26,3000) ut1=-1.0 & parm1=INTARR(26) nlines=0 REPEAT BEGIN READU,in,ut1,parm1 ut(nlines)=ut1 parms(*,nlines)=parm1 nlines=nlines+1 ENDREP UNTIL EOF(in) CLOSE,in & FREE_LUN,in ut=ut(0:nlines-1) parms=parms(*,0:nlines-1) IF N_PARAMS() GT 4 THEN BEGIN cam0=WHERE(parms(7,*) EQ 0) cam1=WHERE(parms(7,*)) ENDIF PRINT,'Contents of p:' PRINT,'0: year 7: cam 13: heater 18: pixel min 22: gain (0/1)' PRINT,'1: month 8: tfw 14: VAC 19: pixel max 23: MPP (0/1)' PRINT,'2: day 9: tei 15: +5 VDC 20: exp_scale 24: sbin' PRINT,'3: hour 10: td 16: +15 VDC 21: exposure 25: pbin' PRINT,'4: minute 11: tee 17: |-15 VDC|' PRINT,'5: second 12: tcf' PRINT,'6: csecond ' RETURN END