function get_yo_dates, index, launch=launch, entrance=entrance, $ pointing=pointing, moon=moon, mercury=mercury, $ safehold=safehold, value=value, verbose=verbose, $ header=header, bakeout=bakeout, eclipse=eclipse, $ no_canopus=no_canopus, reentry=reentry, $ science_op=science_op ;+ ; NAME: ; get_yo_dates ; PURPOSE: ; Return significant Yohkoh dates. ; CALLING SEQUENCE: ; Launch = get_yo_dates(/launch) ; Return launch date ; SXT_ent= get_yo_dates(/entrance) ; Date SXT entrance filter failed ; SXT_ent= get_yo_dates(/entr,/verbos); Provide additional information ; SXT_ent= get_yo_dates(/entr,/ver,/head); Provide additional information with header ; SXT_ent= get_yo_dates(/entr,/value) ; Provide values of entrance filter ; SC_pnt = get_yo_dates(/pointing) ; Dates of S/C pointing changes ; SC_pnt = get_yo_dates(/poi,verbose) ; Provide additional information ; SC_pnt = get_yo_dates(/poi,/val) ; Return the values ; moon = get_yo_dates(moon=1) ; Get first eclipse date ; mercury= get_yo_dates(/mercury) ; Get the mercury date ; bakeouts=get_yo_dates(/bakeout) ; bakeout (ranges) ; bakeouts=get_yo_dates(/bakeout,/header,/verbos) ; additional info ; SC_pnt = get_yo_dates(index,/point) ; Return nominal pointing time of index ; no_can = get_yo_dates(/no_canopus) ; dates Canopus (roll ref Star) lost ; ; OPTIONAL INPUTS: ; index = Standard Yohkoh index or time in any Yohkoh format ; OPTIONAL INPUT KEYWORDS: ; launch = Set to return launch date ; entrance = Set to return dates when SXT entrance filter transmission changed ; Value returned the fractional open area ; safehold = Set ot return the dates when SXT was in safehold ; pointing = Set to return dates of Yohkoh spacecraft pointing ; ; verbose = Set to return additional information as a string vector ; value = Set to return the associated value (rather than the date) ; header = If verbose is set, return a header as first element of output ; string vector ; bakeout = return times of SXT CCD bakeouts (from file) ; moon = time ranges for solar eclipses possibly seen by Yohkoh ; eclipse = actual SFR image intervals when eclipses were seen ; no_canopus = dates when Yohkoh roll reference star Canopus was lost ; science_op = Set to return the start/end dates of science operation. ; reentry = Set to return the dates Yohkoh reentered the atomosphere. ; ; ; RESTRICTIONS: ; The keywords launch, entrance and pointing are mutually exclusive. ; MODIFICATION HISTORY: ; 25-jan-93, J. R. Lemen LPARL, Written ; 22-aug-95, S. L. Freeland - second entrance filter failure ; 13-nov-95, JRL, Added safehold dates; Updated Moon (eclipse) dates ; 29-aug-96, S.L. Freeland - third entrance filter failterwq! ; 1-oct-97, S.L. Freeland - add BAKEOUT keyword and function ; 3-oct-97, S.L. Freeland - fine tune 3rd ent failure per LWA ; 2-feb-98, S.L.Freeeland - fourth ent filt failure (ESTIMATE!) ; 2-feb-99, S.L.Freeland - fifth ent filter failure (ESTIMATE!) ; 19-feb-99, P.G.Shirts - changed 1st ent. failure date from: ; 13-NOV-92 16:50:00 to 13-NOV-92 18:00:00 ; 5th failure time to 30-Jan-99 22:03:37 ; 24-feb-99, P.G.Shirts - changed fifth ent. failure date from: ; 30-Jan-99 22:03:37 to 30-JAN-99 23:17 ; 27-feb-99, P.G.Shirts - changed 16 August 1995 filter failure ; time from 08:21:02 to 08:04:20, per Acton ; 5-May-99, S.L.Freeland - declare leak era ~ VERY APPROX 18-apr-99 ; 4-March-00, Zarro - fixed IDL 5.3 syntax error ; 17-May-00, B.N. Handy - Implement pointing changes. Needs more ; history, but this will enable my QUICK ; page OP_TERM_SCORE updates. ; 13-Aug-01, S.L. Freeland - add/modify entrance filter info(1999) ; 5-nov-02, S.L. Freeland - add end of mission (last sxt image+1sec) ; to entrance filter epochs ; 23-Jul-2003, T. Metcalf - Added a pseudo entrace filter failure at ; 11-feb-00 13:00:20. This is not a real ; failure but the pointing changed and it ; changed the leak enough to act like an ; entrance filter failure. ; 17-dec-2004, H. Hudson - added eclipse time ranges and made /moon return strarr(2) ; 11-jan-2004, H. Hudson - added detailed eclipse times based on manual inspection of SFRs ; /eclipse returns strarr(2,n) ; 1-dec-2005, S. Freeland - add /NO_CANOPUS keyword&function ; 11-mar-2011, A. Takeda - updated observed eclipse timing based on L. Acton's ; data survey in 2009. ; 12-mar-2014, A. Takeda - updated entrance filter failure dates (two ; entries added) & fraction values per L. Acton's ; final calibration in 2014. ; 13-mar-2014, A. Takeda - added a safe_hold entry (Aug-1998 event was missing). ; also added two new keywords, /reentry and /science_op ; to get Yohkoh reentry date and period of science operation. ;- ; on_error,2 ; Return to caller ; ----------- Check the input parameters ----------------- ok = keyword_set(pointing) + keyword_set(launch) + keyword_set(entrance) + $ keyword_set(mercury) + keyword_set(moon) + keyword_set(safehold) + $ keyword_set(eclipse) + keyword_set(reentry) + keyword_set(science_op) ok=ok + keyword_set(bakeout) + keyword_set(no_canopus) if (ok eq 0) then begin doc_library,'get_yo_dates' message,'You must supply at least one keyword parameter' endif if ok gt 1 then begin message,'/pointing, /launch, /entrance, /mercury, /moon',/cont message,'/reentry, /science_op are mutually exclusive' endif ok = keyword_set(value) + keyword_set(verbose) if ok gt 1 then message,'/value and /verbose are mutually exclusive' ; --------------- Set up the data base --------------------------- launch_date = '30-Aug-91 10:30:00' ; Yohkoh Launch date reentry_date ='12-Sep-05 09:16:00' ; Yohkoh Reentry date ; ----- start ----- ------ end ------ science_op_period =['03-Sep-91 01:05:38','14-Dec-01 21:00:09'] merc_date = ' 6-nov-93 03:07:23' ; First Contact time merc_date = [merc_date, ' 6-nov-93 03:13:48',' 6-nov-93 03:59:41'] ; 2nd and central point merc_date = [merc_date, ' 6-nov-93 04:40:03',' 6-nov-93 04:45:24'] ; fourth, fifth merc_date = fmt_tim(merc_date) ; ; the eclipse times given below are limits based on Fred Espenak's on-line databases. ; images within these ranges will often have eclipse phenomena ; moon_date = [[' 4-jan-92 20:00', ' 5-jan-92 02:10'], ['30-jun-92 09:50', '30-jun-92 14:30'],$ ['21-may-93 12:40', '21-may-93 16:20'], ['13-nov-93 19:45', '13-nov-93 23:45'],$ ; neither one in Espenak ['10-may-94 14:10', '10-may-94 20:15'], [' 3-nov-94 11:00', ' 3-nov-94 16:15'],$ ['29-apr-95 14:30', '29-apr-95 20:35'], ['24-oct-95 01:50', '24-oct-95 07:15'],$ ['17-apr-96 20:36', '18-apr-96 00:45'], ['12-oct-96 12:10', '12-oct-96 16:05'],$ [' 8-mar-97 23:15', ' 9-mar-97 03:35'], [' 2-sep-97 21:45', ' 3-sep-97 02:30'],$ ['26-feb-98 14:50', '26-feb-98 20:10'], ['21-aug-98 23:05', '22-aug-98 05:05'],$ ['16-feb-99 03:50', '16-feb-99 09:20'], ['11-aug-99 08:20', '11-aug-99 13:45'],$ ; using French circumstances [' 5-feb-00 10:50', ' 5-feb-00 14:50'], [' 1-jul-00 18:05', ' 1-jul-00 21:00'],$ ['31-jul-00 00:35', '31-jul-00 03:55'], ['25-dec-00 15:20', '25-dec-00 19:50'],$ ['21-jun-01 09:30', '21-jun-01 14:40'], ['14-dec-01 18:00', '14-dec-01 23:45']] ; ;-- new timing determined by Loren on 9-Aug-2009 -- sfr_ecl = [['13-nov-93 19:20:32','13-nov-93 19:25:30'], $ ['13-nov-93 20:56:10','13-nov-93 21:00:16'], $ ['10-May-94 14:08:58','10-May-94 14:11:22'], $ [' 3-nov-94 12:13:23',' 3-nov-94 12:30:13'], $ ['29-apr-95 18:14:51','29-apr-95 18:14:51'], $ ['29-apr-95 18:31:55','29-apr-95 18:36:11'], $ ['29-apr-95 20:08:59','29-apr-95 20:13:15'], $ ['24-oct-95 03:27:08','24-oct-95 03:46:20'], $ ['24-oct-95 05:23:56','24-oct-95 05:51:48'], $ ['24-oct-95 07:15:00','24-oct-95 07:15:00'], $ ['17-apr-96 22:05:14','17-apr-96 22:16:14'], $ ['17-apr-96 23:50:16','18-apr-96 00:03:24'], $ ['12-oct-96 13:08:51','12-oct-96 13:08:51'], $ ['12-oct-96 14:51:05','12-oct-96 14:51:05'], $ [' 9-mar-97 00:58:36',' 9-mar-97 01:11:24'], $ ['26-feb-98 14:54:58','26-feb-98 15:08:46'], $ ['26-feb-98 16:43:46','26-feb-98 16:59:38'], $ ['26-feb-98 18:42:02','26-feb-98 19:08:42'], $ ['22-aug-98 02:45:17','22-aug-98 03:15:37'], $ ['22-aug-98 04:37:13','22-aug-98 04:54:49'], $ ['16-feb-99 07:26:32','16-feb-99 07:30:48'], $ ['16-feb-99 08:55:44','16-feb-99 09:08:32'], $ ['11-aug-99 08:53:48','11-aug-99 08:58:58'], $ ['11-aug-99 12:58:02','11-aug-99 13:09:46'], $ ['21-jun-01 12:30:48','21-jun-01 12:46:48'], $ ['21-jun-01 14:15:20','21-jun-01 14:23:52'], $ ['14-dec-01 20:49:07','14-dec-01 20:59:37']] ;-- old data -- ; sfr_ecl = [[' 3-nov-94 12:15:19', ' 3-nov-94 12:32:21'], $ ; ['29-apr-95 18:19:07', '29-apr-95 18:23:23'], $ ; ['29-apr-95 18:40:27', '29-apr-95 19:19:23'], $ ; ['29-apr-95 20:17:31', '29-apr-95 20:21:47'], $ ; ['24-oct-95 03:28:12', '24-oct-95 03:47:50'], $ ; ['24-oct-95 05:26:04', '24-oct-95 05:52:20'], $ ; ['17-apr-96 22:04:14', '17-apr-96 22:18:18'], $ ; ['17-apr-96 23:52:26', '18-apr-96 00:07:30'], $ ; ['12-oct-96 13:10:59', '12-oct-96 13:10:59'], $ ; [' 9-mar-97 00:58:36', ' 9-mar-97 01:10:52'], $ ; ['26-feb-98 14:55:20', '26-feb-98 15:11:18'], $ ; ['26-feb-98 16:46:52', '26-feb-98 17:07:18'], $ ; ['26-feb-98 18:43:40', '26-feb-98 19:09:18'], $ ; ['22-aug-98 02:47:53', '22-aug-98 03:11:53'], $ ; ['22-aug-98 04:37:45', '22-aug-98 04:54:17'], $ ; ['16-feb-99 07:28:44', '16-feb-99 07:32:56'], $ ; ['16-feb-99 09:00:00', '16-feb-99 09:08:32'], $ ; ['11-aug-99 08:53:48', '11-aug-99 08:58:26'], $ ; ['11-aug-99 12:58:02', '11-aug-99 13:09:46'], $ ; ['21-jun-01 12:30:48', '21-jun-01 12:46:48'], $ ; ['21-jun-01 14:15:20', '21-jun-01 14:23:52'], $ ; ['14-dec-01 20:49:07', '14-dec-01 20:59:37']] ; ---- Dates of entrance filter changes ---- E_times = [launch_date, fmt_tim('27-Oct-92 07:18'), $ ; added per L. Acton's final calibration. fmt_tim('13-Nov-92 18:00'), $ ; fmt_tim('13-Nov-92 16:50'), $ ; per L. Acton fmt_tim('1-Aug-93 00:00:00'), $ ; added per L. Acton's final calibration. fmt_tim('16-Aug-95 08:04:20'), $ ; per L. Acton fmt_tim('24-Aug-96 07:00:00'), $ fmt_tim('24-Jan-98 00:00:00'), $ ; ESTIMATE fmt_tim('30-Jan-99 23:17'), $ ; Loren Acton fmt_tim('12-MAR-99 02:00'), $ ; per L. Acton fmt_tim('20-Apr-99 19:02'), $ ; per L. Acton fmt_tim('11-Feb-00 13:00:20'), $ ; Pseduo failure when pointing changed fmt_tim('14-DEC-01 21:12:16')] ; last SXT + 1sec ; ent_val = [0., 1./12, 2./12,3./12, 4./12, 5./12., 6/12.,7/12.,7/12.] ; Open fraction of entrance filter ent_val = [0., 0.071, 0.123, 0.128, 0.284, 0.366, 0.455, $ 0.563, 0.622, 0.666, 0.666, 0.666] ; new values per L. Acton's final cal. ; ---- Dates of Spacecraft safeholds ------ ; ----- start ----- ------ stop ------ safe_date = ['24-Oct-95 07:29:20','28-Oct-95 05:00:47', $ '22-Aug-98 07:00' ,'27-Aug-98 13:07'] ; ----- start ----- ------ stop ------ science_op_period = ['03-Sep-91 01:05:38','14-Dec-01 21:00:09'] ; ---- Dates of Spacecraft pointing changes ------ point_dates = ['31-Jul-99 12:00', $ ; Not Complete! '11-Feb-00 12:00'] ; --------------- Return the requested information ---------------- case 1 of keyword_set(launch): begin outval = launch_date if keyword_set(verbose) then begin outval = ['Yohkoh launched on '+outval] if keyword_set(header) then outval = $ ['Yohkoh launched from Kagoshima Space Center',outval] endif end keyword_set(reentry): begin outval = reentry_date if keyword_set(verbose) then begin outval = ['Yohkoh reentered on '+outval] if keyword_set(header) then outval = $ ['Yohkoh reentered at the point, 24 deg. N., 85 deg. E. ',outval] endif end keyword_set(pointing): begin outval = point_dates message,/info,'/pointing history not complete' endcase keyword_set(entrance): begin if n_elements(index) eq 0 then begin times = E_times(0:n_elements(E_times)-1) vvv = ent_val endif else begin times = anytim2ints(index) vvv = fltarr(n_elements(times)) for i=0,n_elements(E_times)-2 do begin ss = sel_timrange(times, E_times(i), E_times(i+1), /between) if ss(0) gt -1 then vvv(ss) = ent_val(i) endfor endelse if keyword_set(verbose) then begin outval = strarr(n_elements(times)) for i=0,n_elements(times)-1 do $ outval(i) = string(fmt_tim(times(i)),vvv(i),format='(a,f10.4)') if keyword_set(header) then outval = [' Date Open Fraction of SXT Entrance Filter',outval] endif else if keyword_set(value) then begin outval = vvv if n_elements(vvv) eq 1 then outval = outval(0) endif else outval = fmt_tim(times) end keyword_set(mercury): begin outval = merc_date if keyword_set(verbose) then begin outval = 'First contact ' + merc_date(0) outval = [outval, 'Second contact '+merc_date(1)] outval = [outval, 'Central point '+merc_date(2)] outval = [outval, 'Third contact '+merc_date(3)] outval = [outval, 'Fourth contact '+merc_date(4)] endif end keyword_set(moon): outval = moon_date keyword_set(eclipse): outval = sfr_ecl keyword_set(safehold): begin outval = safe_date if keyword_set(verbose) then begin txt = ['Start time: ','Stop time: '] for i=0,n_elements(safe_date)-1 do $ outval(i) = txt(i mod 2)+outval(i) endif if keyword_set(header) then outval = $ ['Spacecraft safehold dates:', outval] end keyword_set(science_op): begin outval = science_op_period if keyword_set(verbose) then begin txt = ['Start time: ','Stop time: '] for i=0,n_elements(science_op_period)-1 do $ outval(i) = txt(i mod 2)+outval(i) endif if keyword_set(header) then outval = $ ['Period of Yohkoh science operation:', outval] end keyword_set(bakeout) or keyword_set(warm): begin outval='' bakefile=concat_dir('$DIR_SXT_DOC','sxt_ccdbakeouts.dat') if not file_exist(bakefile) then message,/info, $ "No bakeout file: " + bakefile + " found..." else begin data=rd_tfile(bakefile,nocom=([';',''])(keyword_set(header))) cols=str2cols(data,ncols=5,colpos=colpos) if keyword_set(verbose) or keyword_set(header) then outval=data else $ outval=strmid(data,0,colpos(3)) endelse end keyword_set(no_canopus): begin outval='' canfile=concat_dir('$DIR_SXT_DOC','no_canopus.genx') if file_exist(canfile) then restgen,file=canfile,outval else $ box_message,'Cannot find canopus file> '+canfile endcase else: box_message,'Unknown keyword set...' endcase return,outval end