pro idsupdate,lblfile ; routine to update the DATASET_ID for all labels ; Routine to read the fits file, correct the exposure time for the ; 1.65 ms in the (usually) even frames. ; ; 1) 1.65 ms is subtracted off the EXPOSURE keyword ; 2) The calibration is corrected by multiplying by the factor ; EXPOSURE_OLD/EXPOSURE_NEW ; 3) The EXPOSURE keyword is updated ; 4) The keyword SHUT_COR is added, with a value "APPLIED" ; 5) The new updated image is written over the old file print,lblfile close,1,2 line1=' ' openr,1,lblfile openw,2,'label1' while not eof(1) do begin readf,1,line1,format='(a80)' if strmatch(line1,'*SDU-C-NAVCAM-3-RDR-WILD2-V1.0*') then begin printf,2,'DATA_SET_ID = '+$ '"SDU-C-NAVCAM-3-RDR-WILD2-V2.0"' endif else printf,2,line1 endwhile close,1,2 spawn,'fixlen -c label1 > label2' file_move,'label2',lblfile,/overwrite return end