In [1]:
# imports
from matplotlib import pyplot as plt
from astropy.coordinates import SkyCoord
from astropy import units
from astropy.wcs import WCS
from astropy.table import Table
from frb.surveys import survey_utils,images
In [2]:
coord = SkyCoord('J214425.25-403400.81', unit=(units.hourangle, units.deg))
search_r = 10 * units.arcsec
In [3]:
des_srvy = survey_utils.load_survey_by_name('DES', coord, search_r)
des_tbl = des_srvy.get_catalog(print_query=True)
In [4]:
des_tbl
Out[4]:
In [5]:
cutout, cutout_hdr = des_srvy.get_cutout(search_r, band='r')
In [6]:
wcs = WCS(des_srvy.cutout_hdr)
In [7]:
plt.clf()
plt.subplot(projection=wcs)
plt.imshow(cutout, origin='lower')
plt.show()
In [8]:
coord2 = SkyCoord('J081240.68+320809', unit=(units.hourangle, units.deg))
search_r = 10 * units.arcsec
In [9]:
first_srvy = survey_utils.load_survey_by_name('FIRST', coord2, search_r)
first_tbl = first_srvy.get_catalog()
In [10]:
first_tbl
Out[10]:
In [11]:
dec_srvy = survey_utils.load_survey_by_name('DECaL', coord2, search_r)
dec_tbl = dec_srvy.get_catalog()
In [12]:
dec_tbl
Out[12]:
In [13]:
wise_srvy = survey_utils.load_survey_by_name('WISE', coord2, 10*units.arcsec)
wise_tbl = wise_srvy.get_catalog()
In [14]:
wise_tbl
Out[14]:
In [15]:
tmp = 'mag_auto_g,magerr_auto_g,mag_auto_r,magerr_auto_r,mag_auto_i,magerr_auto_i,mag_auto_z,magerr_auto_z,mag_auto_y,magerr_auto_y,coadd_object_id,ra,dec,tilename\n23.9905,0.194438,22.3105,0.0595304,20.9695,0.0296516,20.4385,0.0391535,20.292,0.100701,209895628,326.105565,-40.569422,DES2143-4040\n'
In [16]:
coord3 = SkyCoord(0, 0,unit="deg")
ps_srvy = survey_utils.load_survey_by_name('Pan-STARRS',coord3,30*units.arcsec)
ps_tbl = ps_srvy.get_catalog()
In [17]:
ps_tbl
Out[17]:
In [18]:
img, = ps_srvy.get_cutout(filt="gri",imsize=30*units.arcsec)
plt = images.gen_snapshot_plt(img,imsize=30*units.arcsec,show=True)
In [19]:
fits_img = ps_srvy.get_image(imsize=30*units.arcsec)
wcsinfo = WCS(fits_img.header)
plt.subplot(projection=wcsinfo)
plt.imshow(fits_img.data, origin='lower')
plt.show()