pro get_sscinfo,index,sxt1,sxt2,sxt3,sst=sst ;+ ; NAME ; get_sscinfo ; PURPOSE ; To quickly collect the information for the exposures ; comprising an SSC or SST. ; CALLING SEQUENCE ; get_sscinfo,index,sxt1,sxt2 [,sxt3] ; INPUT ; index, SSC or SST index structure. ; OPTIONAL KEYWORD INPUT ; /sst, force treatment as SST. Use for cases where no ; SST "triplet" uses 3 images. ; OUTPUT ; sxt1: array of index structures for the short exposure ; sxt2: array of index structures for the long exposure ; Note: For single-exposure SSCs then sxt1=sxt2. ; OPTIONAL OUTPUT ; sxt3: for SST, index structures for the super-long exposure. ; Note: For double-exposure SSTs then sxt1=sxt2 and sxt3 ; refers to the super_long exposure. ; For single-exposure SSTs then sxt1=sxt2=sxt3. ; If sxt3 is asked for when SSC index is input then ; sxt3 remains undefined. ; HISTORY ; Journal File for acton@pachyderm.physics.montana.edu ; Working directory: /disk/pd1/acton/movietime ; Date: Fri Nov 12 10:23:25 2004 (LWA) ; 17-Nov-2004 LWA Changed loop indices to longword. ; Handle no-short SSCs and SSTs. ; 18-Mar-2005 LWA Now call rd_obs with fmt_tim(index) ; to deal with ms errors in index.time. ; 14-Oct-2005 LWA Updated header. ; 24-Oct-2005 LWA Corrected many blunders. ; 24-Jan-2007 LWA Fixed case of duplicate sxtf files. ; 27-Oct-2010 LWA Fixed case of duplicate sxtg files. ;- sst=keyword_set(sst) if max(index.his.time_compos(2)) gt 0 or sst then sst=1 else sst=0 img1={time:0L,day:0,comp:'img1'} img1=replicate(img1,n_elements(index)) img2={time:0L,day:0,comp:'img2'} img2=replicate(img2,n_elements(index)) if sst then begin img3={time:0L,day:0,comp:'img3'} img3=replicate(img3,n_elements(index)) endif if not sst then begin for i=0L,n_elements(index)-1 do begin case 1 of index(i).his.time_compos(0) ne 0 : begin img1(i).time=index(i).his.time_compos(0) img1(i).day=index(i).his.day_compos(0) img2(i).time=index(i).his.time_compos(1) img2(i).day=index(i).his.day_compos(1) end index(i).his.time_compos(0) eq 0 : begin img2(i).time=index(i).gen.time img2(i).day=index(i).gen.day end endcase endfor endif else begin for i=0L,n_elements(index)-1 do begin case 1 of index(i).his.time_compos(2) ne 0 : begin img1(i).time=index(i).his.time_compos(0) img1(i).day=index(i).his.day_compos(0) img2(i).time=index(i).his.time_compos(1) img2(i).day=index(i).his.day_compos(1) img3(i).time=index(i).his.time_compos(2) img3(i).day=index(i).his.day_compos(2) end index(i).his.time_compos(2) eq 0 $ and index(i).his.time_compos(1) ne 0 : begin img2(i).time=index(i).his.time_compos(0) img2(i).day=index(i).his.day_compos(0) img3(i).time=index(i).his.time_compos(1) img3(i).day=index(i).his.day_compos(1) end index(i).his.time_compos(0) eq 0 : begin img3(i).time=index(i).gen.time img3(i).day=index(i).gen.day end endcase endfor endelse if sst then begin rd_obs,img3(0),img3(0),bcs,sxtf,/nobcs,/quiet sxt1=replicate(sxtf(0),n_elements(index)) sxt2=replicate(sxtf(0),n_elements(index)) sxt3=replicate(sxtf(0),n_elements(index)) endif else begin rd_obs,img2(0),img2(0),bcs,sxtf,/nobcs,/quiet sxt1=replicate(sxtf(0),n_elements(index)) sxt2=replicate(sxtf(0),n_elements(index)) endelse for i=0L,n_elements(index)-1 do begin if sst then begin case 1 of img1(i).time ne 0 : begin rd_obs,img1(i),img1(i),bcs,sxtg,/nobcs,/quiet sxt1(i)=sxtg(0) rd_obs,img2(i),img2(i),bcs,sxtg,/nobcs,/quiet sxt2(i)=sxtg(0) rd_obs,img3(i),img3(i),bcs,sxtg,/nobcs,/quiet sxt3(i)=sxtg(0) end img1(i).time eq 0 and img2(i).time ne 0 : begin rd_obs,img2(i),img2(i),bcs,sxtg,/nobcs,/quiet sxt1(i)=sxtg(0) sxt2(i)=sxtg(0) rd_obs,img3(i),img3(i),bcs,sxtg,/nobcs,/quiet sxt3(i)=sxtg(0) end img2(i).time eq 0 : begin rd_obs,img3(i),img3(i),bcs,sxtg,/nobcs,/quiet sxt1(i)=sxtg(0) sxt2(i)=sxtg(0) sxt3(i)=sxtg(0) end endcase endif else begin case 1 of img1(i).time ne 0 : begin rd_obs,img1(i),img1(i),bcs,sxtg,/nobcs,/quiet sxt1(i)=sxtg(0) rd_obs,img2(i),img2(i),bcs,sxtg,/nobcs,/quiet sxt2(i)=sxtg(0) end img1(i).time eq 0 : begin rd_obs,img2(i),img2(i),bcs,sxtg,/nobcs,/quiet sxt1(i)=sxtg(0) sxt2(i)=sxtg(0) end endcase endelse endfor end