PRO RDLMP,time,state,raw,conv,files ;+ ; ; NAME: ; RDLMP ; PURPOSE: ; Reads in the time ordered list of lamp data: Cal lamps 1, 2, 3, and ; Surface Lamp. ; CATEGORY: ; Verification Tool ; CALLING SEQUENCE: ; RDLMP,time,state,raw,conv,files ; INPUTS: ; None ; OPTIONAL INPUT PARAMETERS: ; None ; OUTPUTS: ; time: Array of mission time ; state: Array of lamp states ; raw: Array of raw data values of the lamps. Two voltages each for ; Cal lamps 1, 2, and 3, and Surface Lamp. There are 8 columns ; of time ordered data. ; conv: Array of converted voltages and currents for each bulb (same ; order). There are 8 columns of time ordered data. ; files: Array of filenames in time order ; All arrays have the same length as the time ordered list. ; OPTIONAL OUTPUT PARAMETERS: ; None ; KEYWORDS: ; None ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; None ; RESTRICTIONS: ; None ; EXAMPLE: ; rdlmp,time,state,raw,conv,files ; PROCEDURE: ; Determine size of input file: post/timelist/t07lamp.list ; Read in file ; MODIFICATION HISTORY: ; Created by Laura Ellen Dafoe 14 June 1994 ; Tested by Laura Ellen Dafoe on test log: baptism2 on 25 June 1994 ; Manually compared 1st and last entries of time ordered list ; to records read in by this routine. ; REVISION: ; 1.0 ; ;---------------------------------------------------------------------------- ; D I S R S O F T (C) 1 9 9 4 ;----------------------------------------------------------------------------- ;- if (N_PARAMS(0) NE 5) then print,'Call is RDLMP,time,state,raw,conv,files' InputFile='post/timelist/t07lamp.list' spawn,'wc '+InputFile,WC NumLines=fix(strmid(WC,0,7)) NumLines=NumLines(0) openr,infile,Inputfile,/get_lun time=fltarr(NumLines) state=strarr(NumLines) raw=intarr(NumLines,8) conv=fltarr(NumLines,8) files=strarr(NumLines) a='' s='' for i=0,NumLines-1 do begin readf,infile,format='(g10.4,x,a4,8i5,8g6.3,x,a48)',time1,s,r1,r2,r3,r4,$ r5,r6,r7,r8,c1,c2,c3,c4,c5,c6,c7,c8,a time(i)=time1 state(i)=s raw(i,0)=r1 raw(i,1)=r2 raw(i,2)=r3 raw(i,3)=r4 raw(i,4)=r5 raw(i,5)=r6 raw(i,6)=r7 raw(i,7)=r8 conv(i,0)=c1 conv(i,1)=c2 conv(i,2)=c3 conv(i,3)=c4 conv(i,4)=c5 conv(i,5)=c6 conv(i,6)=c7 conv(i,7)=c8 files(i)=strtrim(a,2) endfor free_lun,infile end