From 3f044125960b87122a1a07cbabae111e3c38482f Mon Sep 17 00:00:00 2001 From: hposborn Date: Fri, 2 Aug 2024 11:03:20 -0400 Subject: [PATCH] changing names of pymc3 variables -> pymc --- MonoTools/lightcurve.py | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/MonoTools/lightcurve.py b/MonoTools/lightcurve.py index 1fcc13a..f428ff7 100755 --- a/MonoTools/lightcurve.py +++ b/MonoTools/lightcurve.py @@ -1206,6 +1206,7 @@ def get_tess_lc(self,sector,search=['all'],use_fast=True,use_eleanor=False,**kwa #QLP orbit files stored in folder: orbits=[7+sector*2,8+sector*2] qlpfiles=['/'.join(self.savefileloc.split('/')[:-1])+"/orbit-"+str(int(orbits[n]))+"_qlplc.h5" for n in range(2)] + print(qlpfiles) import h5py if os.path.isfile(qlpfiles[0]) and os.path.isfile(qlpfiles[1]): f1=h5py.File(qlpfiles[0]) @@ -1591,14 +1592,31 @@ def read_from_file(self, f, fname, sect, **kwargs): return None elif f[0][0].header['TELESCOP'].lower()=='tess': if 'ORIGIN' in f[0][0].header and f[0][0].header['ORIGIN']=='MIT/QLP': - print([type(fi[1].columns) for fi in f]) fs='elec' if int(sect)<56 else 'norm1' + fluxnames={'raw_flux':['SAP_FLUX'], + 'flux':['SYS_RM_FLUX','DET_FLUX','KSPSAP_FLUX'], + 'xl_ap_flux':['DET_FLUX_LAG','KSPSAP_FLUX_LAG','SAP_FLUX_LAG'], + 'xs_ap_flux':['DET_FLUX_SML','KSPSAP_FLUX_SML','SAP_FLUX_SML']} + ifluxes={} + for ifname in fluxnames: + ifluxes[ifname]=[] + found=np.tile(False,len(f)) + for ifi,fi in enumerate(f): + found[ifi]=False;icname=0 + while not found[ifi] and icname