tablehdu=pyfits.new_table(coldefinitions)
tablehdu.name='TIME'
tablehdu.writeto(flags10file,clobber=True)

cols=[]
cols.append(pyfits.Column(name='FLAGS',format='B',array=flags))
coldefinitions=pyfits.ColDefs(cols)
f10=pyfits.open(flags10file,mode='update')
for chan in chans10:
    tablehdu=pyfits.new_table(coldefinitions)
    tablehdu.name=chan
    f10.append(tablehdu)
f10.flush()
    
# retrieve the start and stop times of the calibrations
calstops=util.find_command_uts('0051')
calstarts=util.find_command_uts('0050')
cals=['cal1','cal2','cal3','cal4','cal5','cal6']

f10=pyfits.open(flags10file,mode='update')
for ichan,chan in enumerate(chans10):
    flags=f10[chan].data['FLAGS']
    azname=chan_az_names[ichan]
    elname=chan_el_names[ichan]
    #take care of calibration sections first
    for i,cal in enumerate(cals):
        uttime=calstarts[i]
        calutstart=uttime[1]+uttime[2]/60. + uttime[3]/3600.
        uttime=calstops[i]
        calutstop=uttime[1]+uttime[2]/60. + uttime[3]/3600.
        if cal == 'cal6':
Ejemplo n.º 2
0
tablehdu = pyfits.new_table(coldefinitions)
tablehdu.name = 'TIME'
tablehdu.writeto(flags10file, clobber=True)

cols = []
cols.append(pyfits.Column(name='FLAGS', format='B', array=flags))
coldefinitions = pyfits.ColDefs(cols)
f10 = pyfits.open(flags10file, mode='update')
for chan in chans10:
    tablehdu = pyfits.new_table(coldefinitions)
    tablehdu.name = chan
    f10.append(tablehdu)
f10.flush()

# retrieve the start and stop times of the calibrations
calstops = util.find_command_uts('0051')
calstarts = util.find_command_uts('0050')
cals = ['cal1', 'cal2', 'cal3', 'cal4', 'cal5', 'cal6']

f10 = pyfits.open(flags10file, mode='update')
for ichan, chan in enumerate(chans10):
    flags = f10[chan].data['FLAGS']
    azname = chan_az_names[ichan]
    elname = chan_el_names[ichan]
    #take care of calibration sections first
    for i, cal in enumerate(cals):
        uttime = calstarts[i]
        calutstart = uttime[1] + uttime[2] / 60. + uttime[3] / 3600.
        uttime = calstops[i]
        calutstop = uttime[1] + uttime[2] / 60. + uttime[3] / 3600.
        if cal == 'cal6':