pro get_movyinfo,index,sxt1,sxt2,sxt3 ;+ ; NAME ; get_movyinfo ; PURPOSE ; To quickly collect the information for the exposures ; comprising a movie image(s). ; CALLING SEQUENCE ; get_movyinfo,index,sxt1,sxt2,sxt3 ; INPUT ; index, FITS movie header structure. ; OPTIONAL KEYWORD INPUT ; OUTPUT ; sxt3: array of index structures for the longest exposure ; sxt2: array of index structures for the next shorter exposure ; sxt1: array of index structures for the shortest exposure ; Note: sxt3 is always the longest exposure. If sxt1=sx2 ; but not equal sxt3 only 2 exposures comprise the ; composite image. For single-exposure movie images ; then sxt1=sxt2=sxt3. ; HISTORY ; 18-Oct-2005 LWA Created from get_sscinfo. ; 24-Oct-2005 LWA Checked for updated .history entry. ; 25-Oct-2005 LWA Debugged. ; 29-Nov-2005 LWA Updated header purpose. ; 20-Jun-2005 LWA Changed logic to remove need to specify ; keyword sst. ; 11-Jul-2007 LWA Soft coded determination of number of ; images in a composite. Corrected header. ; 27-Jul-2007 LWA Updated header. ;- img1={time:0L,day:0L} ;,comp:'img1'} img1=replicate(img1,n_elements(index)) img2={time:0L,day:0L} ;,comp:'img2'} img2=replicate(img2,n_elements(index)) img3={time:0L,day:0L} ;,comp:'img3'} img3=replicate(img3,n_elements(index)) for i=0L,n_elements(index)-1 do begin nmg=strwhere(index(i).history,'Img*: *',njj) case 1 of njj eq 3 : begin xx=anytim(strmid(index(i).history(nmg(0)),6,24),/ints) img1(i).time=xx.time img1(i).day=xx.day xx=anytim(strmid(index(i).history(nmg(1)),6,24),/ints) img2(i).time=xx.time img2(i).day=xx.day xx=anytim(strmid(index(i).history(nmg(2)),6,24),/ints) img3(i).time=xx.time img3(i).day=xx.day end njj eq 2 : begin xx=anytim(strmid(index(i).history(nmg(0)),6,24),/ints) img2(i).time=xx.time img2(i).day=xx.day xx=anytim(strmid(index(i).history(nmg(1)),6,24),/ints) img3(i).time=xx.time img3(i).day=xx.day end njj eq 0 : begin img3(i).time=index(i).time img3(i).day=index(i).day end else : begin print,' Test in get_movyinfo for number of images failed.' return end endcase endfor rd_obs,img3(0),img3(0),bcs,sxtf,/nobcs,/quiet sxt1=replicate(sxtf,n_elements(index)) sxt2=replicate(sxtf,n_elements(index)) sxt3=replicate(sxtf,n_elements(index)) for i=0L,n_elements(index)-1 do begin case 1 of img1(i).time ne 0 : begin rd_obs,img1(i),img1(i),bcs,sxtg,/nobcs,/quie sxt1(i)=sxtg rd_obs,img2(i),img2(i),bcs,sxtg,/nobcs,/quiet sxt2(i)=sxtg rd_obs,img3(i),img3(i),bcs,sxtg,/nobcs,/quiet sxt3(i)=sxtg 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 sxt2(i)=sxtg rd_obs,img3(i),img3(i),bcs,sxtg,/nobcs,/quiet sxt3(i)=sxtg end img2(i).time eq 0 : begin rd_obs,img3(i),img3(i),bcs,sxtg,/nobcs,/quie sxt1(i)=sxtg sxt2(i)=sxtg sxt3(i)=sxtg end endcase endfor end