Commit af3e3304 authored by Zhang Xin's avatar Zhang Xin
Browse files

modify data-obs and darktime by shaoli's new chart

parent a8a8036c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -39,13 +39,13 @@ def add_LED_Flat(self, chip, filt, tel, pointing, catalog, obs_param):
    t_obs = Time(datetime_obs)
    
    ##ccd刷新2s,等待0.5s,开灯后等待0.5s,开始曝光
    t_obs_renew = Time(t_obs.mjd - (2.+0.5 +0.5) / 86400., format="mjd")
    t_obs_renew = Time(t_obs.mjd - (2.) / 86400., format="mjd")

    t_obs_utc = datetime.utcfromtimestamp(np.round(datetime.utcfromtimestamp(t_obs_renew.unix).replace(tzinfo=timezone.utc).timestamp(), 1))
    self.updateHeaderInfo(header_flag='prim', keys = ['DATE-OBS'], values = [t_obs_utc.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-5]])

    #dark time : 曝光时间+刷新后等带时间0.5s+点亮灯后0.5s+关闭快门时间1.5s+管快门后关灯前0.5+关灯后读出前等待0.5s
    self.updateHeaderInfo(header_flag='ext', keys = ['DARKTIME'], values = [0.5+0.5+1.5+0.5+0.5+pointing.exp_time])
    #dark time : 
    self.updateHeaderInfo(header_flag='ext', keys = ['DARKTIME'], values = [pointing.exp_time])

    gc.collect()
    return chip, filt, tel, pointing
 No newline at end of file
+4 −4
Original line number Diff line number Diff line
@@ -221,13 +221,13 @@ def add_objects(self, chip, filt, tel, pointing, catalog, obs_param):
    datetime_obs = datetime_obs.replace(tzinfo=timezone.utc)
    t_obs = Time(datetime_obs)
    
    ##ccd刷新2s,等待0.5s,开始曝光
    t_obs_renew = Time(t_obs.mjd - (2.+0.5) / 86400., format="mjd")
    ##ccd刷新2s,等待0.s,开始曝光
    t_obs_renew = Time(t_obs.mjd - (2.+0.) / 86400., format="mjd")

    t_obs_utc = datetime.utcfromtimestamp(np.round(datetime.utcfromtimestamp(t_obs_renew.unix).replace(tzinfo=timezone.utc).timestamp(), 1))
    self.updateHeaderInfo(header_flag='prim', keys = ['DATE-OBS'], values = [t_obs_utc.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-5]])

    #dark time : 曝光时间+刷新后等带时间0.5s+关闭快门时间1.5s+管快门后读出前等待0.5s
    self.updateHeaderInfo(header_flag='ext', keys = ['DARKTIME'], values = [0.5+1.5+0.5+pointing.exp_time])
    #dark time : 曝光时间+刷新后等带时间0.s+关快门后读出前等待0.s
    self.updateHeaderInfo(header_flag='ext', keys = ['DARKTIME'], values = [0.+0.+pointing.exp_time])

    return chip, filt, tel, pointing
 No newline at end of file