def lightcurve(skypos, filename, in_raduis, out_raduis=None, trange=None, stepsz=False): if out_raduis != None: annulus = [in_raduis, out_raduis] gAperture('NUV',skypos,in_raduis,csvfile=filename,annulus=annulus, stepsz=stepsz, trange=trange) else: gAperture('NUV',skypos,in_raduis,csvfile=filename, stepsz=stepsz, trange=trange)
def g_app_make(ra, dec, name, b='NUV', ap=21, in_an=22.5, out_an=38): start_time = datetime.now() print 'Beginning Data Query for target: ' + name ap *= 0.000277778 in_an *= 0.000277778 out_an *= 0.000277778 gData = gAperture(band=b, skypos=[ra, dec], radius=ap, annulus=[in_an, out_an], stepsz=10, csvfile='GENLC_' + name + '.csv', verbose=3) end_time = datetime.now() runtime = end_time-start_time print 'Finished Data Query for target: ' + name return gData
def search_galex(coords, band, dt, obj_id, target_dir="./"): """ Search the GALEX gPhoton database for observations at a specific set of coordinates, and if data exists, download it and save it to disc. Parameters ---------- coords: astropy.coordinates.SkyCoord object an object with the sky coordinates where to look for GALEX data band: {"NUV" | "FUV"} Look for data in the near-UV or far-UV? dt: float The desired time resolution of the output light curve obj_id: string The object identifier to be used to save the data target_dir: string, optional, default "./" The directory to store the data in. By default the current working directory """ ## use gFind to see if there's data in GALEX res = gFind(band=band,skypos=[coords.ra.degree,coords.dec.degree]) ## if not, continue if res[band]["expt"] == 0: return else: tstart = res[band]["t0"] tend = res[band]["t1"] #print(tstart[0]) #print(tend[0]) for i,(ts, te) in enumerate(zip(tstart, tend)): ## otherwise find the object's name and fetch the data d = gAperture(band=band, skypos=[coords.ra.degree,coords.dec.degree],radius=0.03, annulus=[0.03,0.04], trange=[ts, te], stepsz=dt, csvfile="%s%s_%s_lc%i.dat"%(target_dir, obj_id, band, i)) ## move photons into a DataFrame df = pd.DataFrame(d["photons"]) ## store in HDF5 file: df.to_hdf('%s%s_%s_%i_photons.h5'%(target_dir,obj_id, band, i), 'table',append=False) return
def main(): gAperture(band="NUV", skypos=[326.550708,0.852778], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_sdssj9-10_214612.17+005110.0/sdB_sdssj9-10_214612.17+005110.0_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[150.976167,40.571969], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_PG_1000+408 /sdB_PG_1000+408_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[184.715125,17.055519], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_lbqs_1216+1719/sdB_lbqs_1216+1719_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[143.700917,-25.213053], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_GALEX_J09348-2512 /sdB_GALEX_J09348-2512_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[172.321417,44.805972], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_FBS_1126+450 /sdB_FBS_1126+450_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[208.284292,-46.72845], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_lse_153/sdB_lse_153_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[335.117167,6.123075], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_pg_2217+059/sdB_pg_2217+059_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[210.718292,39.229992], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_PG_1400+395 /sdB_PG_1400+395_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[48.375917,42.777111], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_FBS_0310+425 /sdB_FBS_0310+425_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[323.506542,-1.077639], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_sdssj9-10_213401.57-010439.5/sdB_sdssj9-10_213401.57-010439.5_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[306.333,14.716056], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_sdssj_202519.92+144257.8/sdB_sdssj_202519.92+144257.8_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[8.943667,26.915194], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_PG_0033+266 /sdB_PG_0033+266_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[217.213958,-6.950928], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_PG_1426-067 /sdB_PG_1426-067_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[66.643833,16.924283], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_kuv_04237+1649/sdB_kuv_04237+1649_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[107.546167,40.605842], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_galex_j07101+4036/sdB_galex_j07101+4036_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[294.635833,46.066389], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_kepler_2m1938+4603/sdB_kepler_2m1938+4603_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[46.702125,41.732], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_FBS_0303+415 /sdB_FBS_0303+415_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[2.188667,12.288567], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_PG_0006+120 /sdB_PG_0006+120_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[216.493458,40.382722], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_sdssj9-10_142558.43+402257.8/sdB_sdssj9-10_142558.43+402257.8_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[173.088792,-8.356892], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_pg_1129-081/sdB_pg_1129-081_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[225.360625,-19.205719], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_ec_14586-1900/sdB_ec_14586-1900_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[162.389792,18.711447], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_PG_1046+189 /sdB_PG_1046+189_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[94.678417,21.59315], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_rl_54/sdB_rl_54_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[301.448125,-39.304408], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_BPS_CS22964-216 /sdB_BPS_CS22964-216_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[241.921917,25.705639], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_sdssj9-10_160741.26+254220.3/sdB_sdssj9-10_160741.26+254220.3_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[221.027042,-23.259781], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_EC_14412-2302 /sdB_EC_14412-2302_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
def main(): gAperture(band="NUV", skypos=[44.092417,33.162417], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_sdssj_025622.18+330944.7/sdB_sdssj_025622.18+330944.7_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)