ocssw
V2022
|
interpolateFields2hicotimes.py
Go to the documentation of this file.
7 code_version = 1.0
120 cqt[:,0] = np.squeeze([ np.multiply(aqt0,bqt3) + np.multiply(aqt1,bqt2) - np.multiply(aqt2,bqt1) + np.multiply(aqt3,bqt0)] )
121 cqt[:,1] = np.squeeze([-np.multiply(aqt0,bqt2) + np.multiply(aqt1,bqt3) + np.multiply(aqt2,bqt0) + np.multiply(aqt3,bqt1)] )
122 cqt[:,2] = np.squeeze([ np.multiply(aqt0,bqt1) - np.multiply(aqt1,bqt0) + np.multiply(aqt2,bqt3) + np.multiply(aqt3,bqt2)] )
123 cqt[:,3] = np.squeeze([-np.multiply(aqt0,bqt0) - np.multiply(aqt1,bqt1) - np.multiply(aqt2,bqt2) + np.multiply(aqt3,bqt3)] )
201 def __init__(self,fileName,csvFileName,delta_odrcBTmGPS,iss_orientation,n_pixels=512,delta_texp=0,delta_ticugps=0,delta_tisspvq=0):
258 self.Jday_start = JDay(self.start_struct['century']*100+self.start_struct['year'],self.start_struct['month'],self.start_struct['day'],
260 self.Jday_end = JDay(self.end_struct['century']*100+self.end_struct['year'],self.end_struct['month'],self.end_struct['day'],
291 if self.hsdat.loc[0,'ICUTIMEHWREGSECOND'] > self.hsdat.loc[len(self.hsdat.loc[:,'ICUTIMEHWREGSECOND'])-1,'ICUTIMEHWREGSECOND']:
302 self.hwreg=self.hsdat.loc[:,'ICUTIMEHWREGSECOND'] + self.hsdat.loc[:,'ICUTIMEHWREGSUBSECOND'] * 16.72e-6
367 self.t_icugps = self.hsdat.loc[:,'ICUTIMEGPSSECONDS'].values + 1.e-6 * self.hsdat.loc[:,'ICUTIMEISSSUBSECOND'].values
371 self.t_issgps = self.hsdat.loc[:,'_ISSGPSTIME'].values + 1.e-6 * self.hsdat.loc[:,'ISSTIMESUBSECOND'].values
399 #self.hwstart= (self.ffpps_all-self.hwreg_locs_lt[self.just_before])/(self.hwreg_locs_lt[self.just_before + 1] -
421 self.hico_times = np.add(np.add(self.time_start, self.testrange),(self.trigger_pulse_width + 0.5*self.exptimes))
422 #self.hico_times = self.time_start + self.exptimes* + self.trigger_pulse_width + 0.5*self.exptimes # 2013Jan17
430 #self.u_usgnc = pd.unique(self.hsdat.loc[self.idx_goodt,'USGNC_PS_Pointing_Coarse_Time_Tag']) #.values.ravel())
432 self.u_usgnc = self.hsdat.loc[self.idx_goodt,'USGNC_PS_Pointing_Coarse_Time_Tag'].duplicated() #.values.ravel())
445 u_usgnc_q0=np.array(self.hsdat.loc[self.udx_usgnc,'USGNC_PS_Pointing_Current_Inert_Att_Quatrn_0'].values)
446 self.u_usgnc_q1=np.array(self.hsdat.loc[self.udx_usgnc,'USGNC_PS_Pointing_Current_Inert_Att_Quatrn_1'].values)
447 u_usgnc_q2=np.array(self.hsdat.loc[self.udx_usgnc,'USGNC_PS_Pointing_Current_Inert_Att_Quatrn_2'].values)
448 u_usgnc_q3=np.array(self.hsdat.loc[self.udx_usgnc,'USGNC_PS_Pointing_Current_Inert_Att_Quatrn_3'].values)
483 self.hstattitudetime=self.hsdat['HSTATTITUDETIME0']*0.050 + self.hsdat['HSTATTITUDETIME1'] * 62.5e-9
618 fcsv.write('SecondsSinceEpoch, ISSPOSX, ISSPOSY, ISSPOSZ, ISSVELX, ISSVELY, ISSVELZ, ISSQX, ISSQY, ISSQZ, ISSQS, STQX, STQY, STQZ, STQS, HST_ATTITUDE_STATUS\n')
776 # print('a={:20.8f},b={:20.8f},c={:20.8f},d={:20.8f},e={:02d}'.format(hico.hstqt_hicotimes[0][0],hico.hstqt_hicotimes[0][1],hico.hstqt_hicotimes[0][2],hico.hstqt_hicotimes[0][3],hico.hstqt_status[0]))
794 parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, description='''\
798 parser.add_argument('-ifile', nargs=1, type=str, help=' iss*hico.bil input file (Must be a BIL file) ')
801 parser.add_argument('-orient', default=('-XVV'),nargs=1, type=str, help=' iss orientation file ')
802 args = parser.parse_args('-ifile /home/rhealy/src/python/hico/l02l1b/iss.2013067.0308.063527.L0.12933.20130308205743.hico.bil -csvfile /home/rhealy/src/python/hico/l02l1b/iss.2013067.0308.063527.L0.12933.20130308205743.hico.csv -hdr /home/rhealy/src/python/hico/l02l1b/iss.2013067.0308.063527.L0.12933.20130308205743.hico.hdr'.split())
Jday_end
Definition: interpolateFields2hicotimes.py:260
hstattitudetime
Definition: interpolateFields2hicotimes.py:483
end_struct
Definition: interpolateFields2hicotimes.py:255
delta_odrcBTmGPS
Definition: interpolateFields2hicotimes.py:218
ISSPOSITIONZ
Definition: interpolateFields2hicotimes.py:457
def qterp_slerp(t0, q0, t1)
Definition: interpolateFields2hicotimes.py:127
t_icugps
Definition: interpolateFields2hicotimes.py:367
ISSPOSITIONX
Definition: interpolateFields2hicotimes.py:453
ffpps_sub
Definition: interpolateFields2hicotimes.py:238
def get_odrc_time_offset(filename)
Definition: interpolateFields2hicotimes.py:781
ffpps_all
Definition: interpolateFields2hicotimes.py:296
def writeCSVfile(self)
Definition: interpolateFields2hicotimes.py:607
locs_goodt
Definition: interpolateFields2hicotimes.py:423
time_start
Definition: interpolateFields2hicotimes.py:406
exptimes
Definition: interpolateFields2hicotimes.py:264
start_struct
Definition: interpolateFields2hicotimes.py:254
end_time
Definition: interpolateFields2hicotimes.py:235
hstqt_hicotimes
Definition: interpolateFields2hicotimes.py:503
anglename
Definition: interpolateFields2hicotimes.py:216
def gethsdatrange(self, hsdatf, Jday_start, Jday_end)
Definition: interpolateFields2hicotimes.py:523
idx_goodt
Definition: interpolateFields2hicotimes.py:425
lfpps_all
Definition: interpolateFields2hicotimes.py:297
t_issgps
Definition: interpolateFields2hicotimes.py:371
hico_times
Definition: interpolateFields2hicotimes.py:421
n_pixels
Definition: interpolateFields2hicotimes.py:217
lfpps_sub
Definition: interpolateFields2hicotimes.py:240
def getTimeStruct(date, time)
Definition: interpolateFields2hicotimes.py:690
finish_time
Definition: interpolateFields2hicotimes.py:521
testrange
Definition: interpolateFields2hicotimes.py:420
Jday_start
Definition: interpolateFields2hicotimes.py:258
def writeHicoTimes(hico)
Definition: interpolateFields2hicotimes.py:773
def qtmult(aqt, bqt, inverse1=0, inverse2=0)
Definition: interpolateFields2hicotimes.py:73
hstclocktime
Definition: interpolateFields2hicotimes.py:473
scanrange
Definition: interpolateFields2hicotimes.py:419
fixed_hwreg
Definition: interpolateFields2hicotimes.py:290
udx_usgnc
Definition: interpolateFields2hicotimes.py:433
d_tisspvq
Definition: interpolateFields2hicotimes.py:277
u_usgnc_q1
Definition: interpolateFields2hicotimes.py:446
ISSVELOCITYX
Definition: interpolateFields2hicotimes.py:459
def time_to_seconds(hh, nn, ss, subsec)
Definition: interpolateFields2hicotimes.py:644
begin_time
Definition: interpolateFields2hicotimes.py:211
hwreg_locs_gt
Definition: interpolateFields2hicotimes.py:351
t_issposvelquat
Definition: interpolateFields2hicotimes.py:450
ISSPOSITIONY
Definition: interpolateFields2hicotimes.py:455
orientation
Definition: interpolateFields2hicotimes.py:227
def qtpow(q, pwr)
Definition: interpolateFields2hicotimes.py:12
csvFileName
Definition: interpolateFields2hicotimes.py:212
ISSVELOCITYY
Definition: interpolateFields2hicotimes.py:461
def timeIncrement(date, time)
Definition: interpolateFields2hicotimes.py:698
def createCSVInfo(self)
Definition: interpolateFields2hicotimes.py:568
void copy(double **aout, double **ain, int n)
start_time
Definition: interpolateFields2hicotimes.py:247
hstqt_status
Definition: interpolateFields2hicotimes.py:507
issqt_hicotimes
Definition: interpolateFields2hicotimes.py:466
gps_seconds_2009Jan01_00_00_00
Definition: interpolateFields2hicotimes.py:223
d_ticugps
Definition: interpolateFields2hicotimes.py:270
def __init__(self, fileName, csvFileName, delta_odrcBTmGPS, iss_orientation, n_pixels=512, delta_texp=0, delta_ticugps=0, delta_tisspvq=0)
Definition: interpolateFields2hicotimes.py:201
ISSVELOCITYZ
Definition: interpolateFields2hicotimes.py:463
hstqt_pps
Definition: interpolateFields2hicotimes.py:493
just_after
Definition: interpolateFields2hicotimes.py:352
trigger_pulse_width
Definition: interpolateFields2hicotimes.py:229