frb.surveys.panstarrs
Slurp data from Pan-STARRS catalog using the MAST API. A lot of this code has been directly taken from http://ps1images.stsci.edu/ps1_dr2_api.html
- class frb.surveys.panstarrs.Pan_STARRS_Survey(coord, radius, **kwargs)[source]
Bases:
SurveyCoordA class to access all the catalogs hosted on the MAST database. Inherits from SurveyCoord. This is a super class not meant for use by itself and instead meant to instantiate specific children classes like PAN-STARRS_Survey
- get_catalog(query_fields=None, release='dr2', table='stack', print_query=False, use_psf=False, photoz=True)[source]
Query a catalog in the MAST Pan-STARRS database for photometry.
- Args:
query_fields – list, optional A list of query fields to get in addition to the default fields.
release – str, optional “dr1” or “dr2” (default: “dr2”). Data release version.
table – str, optional “mean”,”stack” or “detection” (default: “stack”). The data table to search within.
use_psf – bool, optional If True, use PSFmag instead of KronMag
photoz – bool, optional If True, also download photometric redshifts using the Mast CasJobs API.
- Returns:
- astropy.table.Table
Contains all query results
- Return type:
catalog
- get_cutout(imsize=<Quantity 30. arcsec>, filt='irg', output_size=None)[source]
Grab a color cutout (PNG) from Pan-STARRS
- Args:
imsize (Quantity) – Angular size of image desired
filt (str) – A string with the three filters to be used
output_size (int) – Output image size in pixels. Defaults to the original cutout size.
- Returns:
PNG image, None (None for the header).
- get_image(imsize=<Quantity 30. arcsec>, filt='i', timeout=120)[source]
Grab a fits image from Pan-STARRS in a specific band.
- Args:
imsize (Quantity) – Angular size of the image desired
filt (str) – One of ‘g’,’r’,’i’,’z’,’y’ (default: ‘i’)
timeout (int) – Number of seconds to timout the query (default: 120 s)
- Returns:
fits header data unit for the downloaded image
- Return type:
hdu