PRO RDADC,time,raw,conv,files ;+ ; ; NAME: ; RDADC ; PURPOSE: ; Reads in the time ordered list of ADC offset and gain, Aux board ; and CPU voltage ; CATEGORY: ; Verification Tool ; CALLING SEQUENCE: ; RDADC,time,raw,conv,files ; INPUTS: ; None ; OPTIONAL INPUT PARAMETERS: ; None ; OUTPUTS: ; time: Array of mission time ; raw: Array of raw data values of the ADC offset, ADC Gain, ; Aux voltage and CPU voltage ; conv: Array of converted voltages from raw data (same order) ; 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: ; rdadc,time,raw,conv,files ; PROCEDURE: ; Determine size of input file: post/timelist/t05adchr.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 records read into memory by ; this routine with time ordered list. ; REVISION: ; 1.0 ; ;---------------------------------------------------------------------------- ; D I S R S O F T (C) 1 9 9 4 ;----------------------------------------------------------------------------- ;- if (N_PARAMS(0) NE 4) then print,'Call is RDADC,time,raw,conv,files' InputFile='post/timelist/t05adchr.list' spawn,'wc '+InputFile,WC NumLines=fix(strmid(WC,0,7)) NumLines=NumLines(0) openr,infile,InputFile,/get_lun time=fltarr(NumLines) raw=intarr(NumLines,4) conv=fltarr(NumLines,4) files=strarr(NumLines) a='' for i=0,NumLines-1 do begin readf,infile,format='(g10.4,4i7,4g10.4,x,a48)',time1,r1,r2,r3,r4,$ c1,c2,c3,c4,a time(i)=time1 raw(i,0)=r1 raw(i,1)=r2 raw(i,2)=r3 raw(i,3)=r4 conv(i,0)=c1 conv(i,1)=c2 conv(i,2)=c3 conv(i,3)=c4 files(i)=strtrim(a,2) endfor free_lun,infile end