def cnfg_KOI1003(): lygos.init( \ ticitarg=122374527, \ abltarg='KOI 1003', \ #strgmast='KOI-1003', \ epocpmot=2019.3, \ )
def cnfg_TOI2406(): lygos.init( \ toiitarg=2406, \ boolplotrflx=True, \ #ticitarg=212957629, \ #labltarg='TOI-2406', \ )
def cnfg_GJ299(): lygos.init( \ #boolfittoffs=True, \ labltarg='GJ 299', \ ticitarg=334415465, \ epocpmot=2019.3, \ )
def IRAS090263817(): labltarg = 'IRAS09026-3817' rasctarg = 136.1388872 decltarg = -38.4895431 for k in range(1, 4): lygos.init(rasctarg=rasctarg, decltarg=decltarg, labltarg=labltarg, maxmnumbstar=k)
def cnfg_WASP121(): lygos.init( \ strgmast='WASP-121', \ boolplotquat=True, \ boolcalcconr=True, \ boolanim=True, \ boolanimframtotl=False, \ )
def cnfg_TOI1233(): lygos.init( \ toiitarg=1233, \ numbside=21, \ boolplotquat=True, \ boolplotrflx=True, \ boolanim=True, \ boolanimframtotl=False, \ )
def cnfg_GJ299(): lygos.init( \ #boolfittoffs=True, \ labltarg='GJ 299', \ #typepsfn='ontf', \ boolplotquat=True, \ boolanim=True, \ ticitarg=334415465, \ epocpmot=2019.3, \ )
def cnfg_WD1856(): ticitarg = 267574918 strgmast = 'TIC 267574918' labltarg = 'WD 1856' lygos.init( \ labltarg=labltarg, \ #strgmast=strgmast, \ ticitarg=ticitarg, \ #datatype='sapp', \ )
def cnfg_TIC284856863(): ''' 12 July 2021, young star with accretion disk from Max (TYC 2597-735-1) ''' lygos.init( \ boolregrforc=True, \ maxmnumbstar=999, \ maxmdmag=6, \ ticitarg=284856863, \ labltarg='TYC 2597-735-1', \ )
def ASASNN(): # a string that will be used to query the target on MAST, which should be resolvable on MAST liststrgmast = [ \ 'ASASSN-19bt', \ #'ASASNN-19fp', \ ] for strgmast in liststrgmast: lygos.init( \ strgmast=strgmast, \ strgclus='ASASSN', \ )
def cnfg_test347543557(): ticitarg = 347543557 labltarg = 'TIC 347543557' strgtarg = 'test347543557' listlimttimeplot = [[2458428, 2458430]] lygos.init( \ ticitarg=ticitarg, \ labltarg=labltarg, \ strgtarg=strgtarg, \ listlimttimeplot=listlimttimeplot, \ )
def cnfg_spec(): path = os.environ['LYGOS_DATA_PATH'] + '/data/List_for_MIT_pilot.txt' data = np.loadtxt(path, delimiter='\t', skiprows=1) numbtarg = data.shape[0] indxtarg = np.arange(numbtarg) for k in indxtarg: ticitarg = int(data[k, 2]) lygos.init( \ ticitarg=ticitarg, \ labltarg='TIC %s' % ticitarg, \ strgtarg='speculus_%s' % ticitarg, \ )
def cnfg_arry(strgclus): pathdata = os.environ['LYGOS_DATA_PATH'] + '/data/' if strgclus == 'KeplerEBs': path = pathdata + 'KeplerEBs/Kepler_binaries_priority.csv' else: path = pathdata + 'SPECULOOS/final_catalog.csv' cntr = 0 indx listtici = [] print('Reading from %s...' % path) for line in open(path, 'r'): if cntr == 0: cntr += 1 continue linesplt = line.split(',') if strgclus == 'KeplerEBs': listtici.append(int(linesplt[1])) else: listtici.append(int(linesplt[23])) numbtarg = len(listtici) indxtarg = np.arange(numbtarg) listintgresu = np.empty(numbtarg) for k in indxtarg: temp = lygos.init( \ ticitarg=listtici[k], \ strgclus=strgclus, \ )
def cnfg_requests(): lygos.init( \ #strgmast='V563 Lyr', \ # from Ozgur Basturk strgmast='HAT-P-19', \ # from Ben Rackham #strgmast='Ross 619', \ # from Andrew Vanderburg, white dwarf ticitarg=902906874, \ boolfasttpxf=True, \ numbside=7, \ #boolfittoffs=True, \ )
def cnfg_GRB191016A(): rasctarg = 30.2695 decltarg = 24.5099 labltarg = 'GRB191016A' listlimttimeplot = [] for timedelt in [1.]: listlimttimeplot.append(2458772.67 + np.array([-timedelt, timedelt])) listtimeplotline = [2458772.67291666667] boolfittoffs = False#True boolcuttqual = False lygos.init( \ rasctarg=rasctarg, \ decltarg=decltarg, \ labltarg=labltarg, \ boolcuttqual=boolcuttqual, \ boolfittoffs=boolfittoffs, \ numbside=9, \ listtimeplotline=listtimeplotline, \ listlimttimeplot=listlimttimeplot, \ )
def cnfg_movingobject(): labltarg = 'Synthetic Interstellar Object' numbside = 11. dicttrue = dict() dicttrue['xpostarg'] = 5. + np.random.rand() dicttrue['ypostarg'] = 5. + np.random.rand() dicttrue['tmagtarg'] = 10. dicttrue['pmxatarg'] = 1. dicttrue['pmyatarg'] = 1. numbtargneig = 10 dicttrue['xposneig'] = 5. + np.random.rand(numbtargneig) dicttrue['yposneig'] = 5. + np.random.rand(numbtargneig) dicttrue['tmagneig'] = 5. + np.random.rand(numbtargneig) lygos.init( \ labltarg=labltarg, \ typedata='simugene', \ dicttrue=dicttrue, \ )
def cnfg_Luhman16(): pmratarg = -2762.16 # [mas/yr] pmdetarg = 357.79 # [mas/yr] # exofop (J2015.5) #rasctarg = 162.328259 #decltarg = -53.319372° # TICv8 (J2000) rasctarg = 162.328814 decltarg = -53.319466 lygos.init( \ rasctarg=rasctarg, \ decltarg=decltarg, \ labltarg='Luhman 16', \ booladdddiscdetr=True, \ maxmnumbstar=5, \ epocpmot=2019., \ pmratarg=pmratarg, \ pmdetarg=pmdetarg, \ psfntype='lion', \ )
def cnfg_lindsey(): from astropy import units as u from astropy.coordinates import SkyCoord pathbase = os.environ['PERGAMON_DATA_PATH'] + '/featsupntess/' pathdata = pathbase + 'data/' pathimag = pathbase + 'imag/' os.system('mkdir -p %s' % pathdata) os.system('mkdir -p %s' % pathimag) for strgclus in [ \ 'Cycle1-matched', \ 'Cycle2-matched', \ 'Cycle3-matched', \ ]: pathcsvv = pathdata + '%s.csv' % strgclus print('Reading from %s...' % pathcsvv) objtfile = open(pathcsvv, 'r') k = 0 for line in objtfile: if k == 0: k += 1 continue linesplt = line.split(',') labltarg = linesplt[2] c = SkyCoord('%s %s' % (linesplt[3], linesplt[4]), unit=(u.hourangle, u.deg)) rasctarg = c.ra.degree decltarg = c.dec.degree print('labltarg') print(labltarg) print('linesplt[1]') print(linesplt[1]) print('linesplt[2]') print(linesplt[2]) print('rasctarg') print(rasctarg) print('decltarg') print(decltarg) dictoutp = lygos.init( \ rasctarg=rasctarg, \ decltarg=decltarg, \ labltarg=labltarg, \ #numbside=5, \ booldetrcbvs=False, \ strgclus=strgclus, \ booltpxflygo=False, \ ) listtsec = dictoutp['listtsec'] numbtsec = len(listtsec) indxtsec = np.arange(numbtsec) for o in indxtsec: cmnd = 'cp %s%s/%s/imag/* %s%s/imag/' % (pathbase, strgclus, dictoutp['strgtarg'], pathbase, strgclus) print(cmnd) os.system(cmnd) pathsaverflxtarg = dictoutp['pathsaverflxtargsc%02d' % listtsec[o]] cmnd = 'cp %s %s%s/data/' % (pathsaverflxtarg, pathbase, strgclus) print(cmnd) os.system(cmnd) k += 1
def cnfg_TOI2406(): lygos.init( \ toiitarg=2406, \ )
def tutorial(): lygos.init(strgmast='WASP-121') lygos.init(toiitarg=1233) lygos.init(rasctarg=124.343, decltarg=decltarg)
def cnfg_contamination(): ''' typdata: 'toyy': simulated images based on imaginary temporal footprint as well as imaginary RA, DEC, and Tmag for all sources 'mock': simulated images based on real temporal footprint as well as real RA, DEC, Tmag for all sources 'obsd': real images and real RA, DEC, and Tmag for all sources ''' listtypedata = ['toyy', 'mock', 'obsd'] # get the features of highly-contaminated sources in the TIC dictpopl = miletos.retr_dictcatltic8('ffimhcon') numbsour = 10 indxsour = np.arange(numbsour) for typedata in listtypedata: for k in indxsour: if typedata == 'toyy': ticitarg = None labltarg = 'Mock Target %d' % k xpostarg = 5. + np.random.rand() ypostarg = 5. + np.random.rand() tmagtarg = 10. numbneig = 10 xposneig = np.random.rand(numbneig) * 11 yposneig = np.random.rand(numbneig) * 11 tmagneig = np.random.rand(numbneig) * 4 + 10 else: tmagtarg = None ticitarg = dictpopl['tici'][k], \ xpostarg = None ypostarg = None xposneig = None yposneig = None labltarg = None lygos.init( \ strgclus='contamination', \ typepsfn='ontf', \ boolplotrflx=True, \ boolplotcntp=True, \ boolplotquat=True, \ ticitarg=ticitarg, \ labltarg=labltarg, \ xpostarg=xpostarg, \ ypostarg=ypostarg, \ tmagtarg=tmagtarg, \ boolmile=True, \ xposneig=xposneig, \ yposneig=yposneig, \ tmagneig=tmagneig, \ boolfittoffs=True, \ #boolanim=True, \ typedata=typedata, \ )
def cnfg_V563Lyr(): lygos.init( \ strgmast='V563 Lyr', \ )
def cnfg_ASASSN20qc(): ''' 13 July 2021, AGN from DJ ''' rasctarg = 63.260208 decltarg = -53.0727 labltarg = 'ASASSN-20qc' refrlistlabltser = [['Michael']] path = os.environ['LYGOS_DATA_PATH'] + '/data/lc_2020adgm_cleaned_ASASSN20qc' print('Reading from %s...' % path) objtfile = open(path, 'r') k = 0 linevalu = [] for line in objtfile: if k == 0: k += 1 continue linesplt = line.split(' ') linevalu.append([]) for linesplttemp in linesplt: if linesplttemp != '': linevalu[k-1].append(float(linesplttemp)) linevalu[k-1] = np.array(linevalu[k-1]) k += 1 linevalu = np.vstack(linevalu) refrarrytser = np.empty((linevalu.shape[0], 3)) refrarrytser[:, 0] = linevalu[:, 0] refrarrytser[:, 1] = linevalu[:, 2] refrarrytser[:, 2] = linevalu[:, 3] dictmileinpt = dict() dictmileinpt['listtypemodl'] = ['supn'] listnumbside = [7, 11, 15] #dictmileinpt['listlimttimemask'] = [[[[-np.inf, 2457000 + 2175], [2457000 + 2186.5, 2457000 + 2187.5]]]] dictmileinpt['listlimttimemask'] = [[[[2457000 + 2186.5, 2457000 + 2187.5]]]] for numbside in listnumbside: if numbside == 11: dictmileinpt['listtimescalbdtrspln'] = [0., 0.1, 0.5] boolfittoffs = True else: dictmileinpt['listtimescalbdtrspln'] = [0.] boolfittoffs = False dictoutp = lygos.init( \ boolplotrflx=True, \ boolplotcntp=True, \ boolfittoffs=boolfittoffs, \ refrlistlabltser=refrlistlabltser, \ refrarrytser=refrarrytser, \ labltarg=labltarg, \ listtsecsele=[32], \ dictmileinpt=dictmileinpt, \ timeoffs=2459000, \ numbside=numbside, \ rasctarg=rasctarg, \ decltarg=decltarg, \ boolregrforc=True, \ )
def cnfg_TOI1233(): lygos.init( \ toiitarg=1233, \ numbside=21, \ )
def cnfg_syst(typeanls): ''' Investigate systematics typedata: 'simugene': simulated images based on imaginary temporal footprint as well as imaginary RA, DEC, and Tmag for all sources 'mock': simulated images based on real temporal footprint as well as real RA, DEC, Tmag for all sources 'obsd': real images and real RA, DEC, and Tmag for all sources typemult: 'sing': single source 'doub': two sources ''' # get the features of highly-contaminated sources in the TIC dictpopl = ephesus.retr_dictpopltic8('ticihcon') typedata, typemult = typeanls.split('_') pathbase = os.environ['LYGOS_DATA_PATH'] + '/syst/' pathimag = pathbase + 'imag/' numbside = 11 if typemult == 'sing': numbsour = 2 boolanim = False boolfittoffs = True else: numbsour = 100 boolanim = False boolfittoffs = False indxsour = np.arange(numbsour) listtmag = np.empty(numbsour) listnois = np.empty(numbsour) listsepa = np.empty(numbsour) dictfitt = dict() dicttrue = dict() for k in indxsour: if typemult == 'sing': boolplot = True else: boolplot = False if typemult == 'sing': typepsfninfe = 'locl' else: typepsfninfe = 'fixd' if typemult == 'sing' and k == 0: dicttrue['typepsfnshap'] = 'gauselli' dicttrue['sigmpsfnxpos'] = 0.9 dicttrue['sigmpsfnypos'] = 1.2 dicttrue['fracskewpsfnxpos'] = 0.4 dicttrue['fracskewpsfnypos'] = 0.7 if typemult == 'sing' and k == 1: dicttrue['typepsfnshap'] = 'gauscirc' if typedata == 'simugene' or typedata == 'inje': ticitarg = None if typemult == 'sing' or typemult == 'doub': dicttrue['tmagtarg'] = 10. else: dicttrue['tmagtarg'] = tdpy.icdf_self(np.random.rand(), 7., 20.) listtmag[k] = dicttrue['tmagtarg'] if typedata == 'simugene': if typemult == 'sing': strgtarg = 'simugene%s%starg' % (typemult, dicttrue['typepsfnshap']) else: strgtarg = 'simugene%starg%04d' % (typemult, k) labltarg = 'Sim. Image, Sim. T=%.1f Source' % listtmag[k] print('labltarg') print(labltarg) if typemult == 'isol': dicttrue['cntpbackscal'] = 100. # [e-/s] dictfitt['cntpbackscal'] = 90. # [e-/s] if typemult == 'bkgd': dicttrue['cntpbackscal'] = 100. # [e-/s] dictfitt['cntpbackscal'] = 90. # [e-/s] if typemult == 'psfn': dicttrue['sigmpsfn'] = 1. # [px] dictfitt['sigmpsfn'] = 0.9 # [px] rasctarg = None decltarg = None if typemult == 'doub': cent = (numbside - 1.) / 2. offs = tdpy.icdf_self(np.random.rand(), 0., 1.) listsepa[k] = 2. * offs dicttrue['numbneig'] = 1 dicttrue['xpostarg'] = cent - offs dicttrue['xposneig'] = np.array([cent + offs]) dicttrue['yposneig'] = np.array([cent]) dicttrue['tmagneig'] = np.array([10.]) if typemult == 'blen': dicttrue['cntpbackscal'] = tdpy.icdf_self(np.random.rand(), 50., 300.) # [e-/s] dicttrue['numbneig'] = 10 dicttrue['xposneig'] = tdpy.icdf_self(np.random.rand(dicttrue['numbneig']), 0., numbside - 1.) dicttrue['yposneig'] = tdpy.icdf_self(np.random.rand(dicttrue['numbneig']), 0., numbside - 1.) dicttrue['tmagneig'] = tdpy.icdf_self(np.random.rand(dicttrue['numbneig']), 10., 20.) if typedata == 'inje': strgtarg = 'injetarg%04d' % k labltarg = 'Real Image, Injected T=%.3g Source' % listtmag[k] rasctarg = np.random.rand() * 360. decltarg = -90. + np.random.rand() * 180. if typedata == 'obsd': strgtarg = None ticitarg = dictpopl['tici'][k] listtmag[k] = dictpopl['tmag'][k] dicttrue = None rasctarg = None decltarg = None labltarg = None dictoutp = lygos.init( \ strgclus='syst', \ ticitarg=ticitarg, \ rasctarg=rasctarg, \ decltarg=decltarg, \ strgtarg=strgtarg, \ labltarg=labltarg, \ boolanim=boolanim, \ boolplot=boolplot, \ boolfittoffs=boolfittoffs, \ typepsfninfe=typepsfninfe, \ dictfitt=dictfitt, \ dicttrue=dicttrue, \ boolmerg=False, \ seedrand=k, \ typedata=typedata, \ ) if len(dictoutp['listnois']) > 0: listnois[k] = dictoutp['listnois'][0][1, 1] if typemult == 'doub': figr, axis = plt.subplots() axis.scatter(listsepa, listnois, s=2) axis.set_yscale('log') axis.set_ylabel('1-hour CDPP [ppm]') axis.set_xlabel('Separation [px]') #plt.tight_layout() path = pathimag + 'noissepa_%s.pdf' % typemult plt.savefig(path) plt.close() if typemult != 'sing' and typemult != 'doub': figr, axis = plt.subplots() axis.scatter(listtmag, listnois, s=2) axis.set_yscale('log') axis.set_ylabel('1-hour CDPP [ppm]') axis.set_xlabel('TESS Mag') #plt.tight_layout() path = pathimag + 'noistmag_%s.pdf' % typemult plt.savefig(path) plt.close()
def cnfg_Pleides(): lygos.init( \ strgmast='Electra', \ )
def cnfg_HATP19(): strgmast = 'HAT-P-19' lygos.init( \ strgmast=strgmast, \ )