pro choose_sfc,index,term=term,syn=syn ;+ ; NAME ; choose_sfc ; PURPOSE ; Toggle the environmental variable sxt_syn_sfc to cause use ; of Terminator or Synthetic leak (SFC) images for correction ; of SXT images. Default is to use the following choices. ; ; i-------- Syn/Term SFC boundaries in terms of dates ------ ; 30-AUG-91 10:30 - 13-NOV-92 18:00 No SFC required ; 13-NOV-92 18:00 - 24 Jul 93 use TermSFC ; 24 Jul 93 - 16 Sep 94 use SynSFC ; 16 Sep 94 - 24-AUG-96 07:00 use TermSFC ; 24-AUG-96 07:00 - 30-JAN-99 23:17 use SynSFC ; 30-JAN-99 23:17 - 20-APR-99 19:02 use TermSFC ; 20-APR-99 19:02 - 14-DEC-01 21:12 use SynSFC ; ------------------------------------------------- ; NOTE: Syn/Term choice is based upon time of first index ; record and that selection is used for that SSC or SST. ; ; CALLING SEQUENCE ; choose_sfc,index,term=term,syn=syn ; INPUT ; index, only needed if used to choose default Syn/Term ; selection. ; KEYWORD INPUT ; no keyword input, use Syn/Term rules for SFC selection. ; /term, use Terminator SFCs. ; /syn, use Synthetic SFCs. ; HISTORY ; 10-Nov-2004 LWA Added header. ; 20-Dec-2004 LWA & AkT ; 17-Jul-2009 LWA Added boundary date table in header. ; Changed ent(0) to ent(1). ; 7-Aug-2009 LWA Corrected blunder of previous change. ; Add /quiet to all set_logenv calls. ; 28-Jun-2014 LWA Replaced call to get_yo_dates with ; hard-coded dates. ;- if keyword_set(term) and keyword_set(syn) then begin print,' It is invalid to choose BOTH Terminator and Synthetic SFCs' return endif term=keyword_set(term) syn=keyword_set(syn) if not term and not syn then begin ; ent=get_yo_dates(/ent) ; braks=[ent(0),'24-Jul-93 00:00','16-Sep-94 00:00',ent(3),ent(5),$ ; ent(7),ent(9)] braks=['30-AUG-91 10:30','24-Jul-93 00:00','16-Sep-94 00:00',$ '24-AUG-96 07:00','30-JAN-99 23:17','20-APR-99 19:02',$ '14-DEC-01 21:12'] btt0=int2secarr(braks,index(0)) bii0=where(btt0 ge 0) case 1 of bii0(0) eq 1 : set_logenv,/quiet,'sxt_syn_sfc','' bii0(0) eq 2 : set_logenv,/quiet,'sxt_syn_sfc','1' bii0(0) eq 3 : set_logenv,/quiet,'sxt_syn_sfc','' bii0(0) eq 4 : set_logenv,/quiet,'sxt_syn_sfc','1' bii0(0) eq 5 : set_logenv,/quiet,'sxt_syn_sfc','' bii0(0) eq 6 : set_logenv,/quiet,'sxt_syn_sfc','1' else : set_logenv,/quiet,'sxt_syn_sfc','' endcase endif ; ----------------- Use standard SFCs ---------- if keyword_set(term) then $ set_logenv,'sxt_syn_sfc','' ; --------------- Use synthetic SFCs --------- if keyword_set(syn) then $ set_logenv,'sxt_syn_sfc','1' end