;+ ; NAME: lasertimes ; ; PURPOSE: ; Compute the start and stop allowable times for the Lick Laser, in LST. ; These correspond to 11 pm and 5 am, local time (either PST or PDT) ; ; USAGE: ; suntimes,jd,rise,set, [/date, /lst] ; ; INPUTS: ; KEYWORDS: ; OUTPUTS: ; ; BUGS: ; Not daylight savings time aware. It assumes that the entire year ; uses whatever the current timezone setting is. (i.e. if it's ; PDT when you run the program, it assumes it's -always- PDT, and ; vice versa for PST) ; ; HISTORY: ; Began 2005-07-14 16:07:24 by Marshall Perrin ; see 'obsplan.pro' from the Buie library for algorithm source. ;- PRO lasertimes,laserstart,laserstop,today=today,date=date,lst=uselst gmt_offset_days = gmt_offsec()/84600. gmt_offset_hours = gmt_offsec()/3600. if ~(keyword_set(jd)) and ~(keyword_set(date)) then today=1 if keyword_set(today) then begin ; julday by itself doesn't know about time zones. ; So you have to add in an offset to take into account the ; fact that the computer's clock may not be in GMT. jd = julday()+gmt_offset_days daycnv,jd-gmt_offset_days,yr,mon,day,hr date = [yr,mon,day,hr] endif else $ if keyword_set(date) then begin jdcnv,date[0],date[1],date[2],date[3],jd jd += gmt_offset_days endif year=date[0] mon=date[1] day=date[2] obsname='lick' observatory,obsname,obs ct2lst,laserstart,obs.longitude*(-1),gmt_offset_hours,23,day,mon,year ct2lst,laserstop,obs.longitude*(-1),gmt_offset_hours,5,day+1,mon,year end