frb.surveys.sdss

Methods related to SDSS/BOSS queries

class frb.surveys.sdss.SDSS_Survey(coord, radius, **kwargs)[source]

Bases: SurveyCoord

Class to handle queries on the SDSS database

Args:
  • coord (SkyCoord) – Coordiante for surveying around

  • radius (Angle) – Search radius around the coordinate

__init__(coord, radius, **kwargs)[source]
get_catalog(photoobj_fields=None, timeout=120, print_query=False)[source]

Query SDSS for all objects within a given radius of the input coordinates.

Merges photometry with photo-z

TODO – Expand to include spectroscopy TODO – Consider grabbing all of the photometry fields

Args:
  • coord – astropy.coordiantes.SkyCoord

  • radius – Angle, optional Search radius

  • photoobj_fields – list Fields for querying

  • timeout – float, optional Default value - 120 s.

  • print_query – bool, optional Print the SQL query for the photo-z values

Returns:

astropy.table.Table

Contains all measurements retieved WARNING :: The SDSS photometry table frequently has multiple entries for a given source, with unique objid values

Return type:

catalog

get_cutout(imsize, scale=0.396127)[source]

Grab a cutout from SDSS

Args:

imsize (Quantity) – Size of image desired

Returns:

self.cutout and a None to match the image header (not provided by SDSS)

Return type:

PNG image, None

frb.surveys.sdss.get_url(coord, imsize=30.0, scale=0.396127, grid=False, label=False, invert=False)[source]

Generate the SDSS URL for an image retrieval

Args:
  • coord (astropy.coordiantes.SkyCoord) – Center of image

  • imsize – float, optional Image size (rectangular) in arcsec and without units

  • scale (float, optional)

  • grid (bool, optional)

  • label (bool, optional)

  • invert (bool, optional)

Returns:

URL for the image

Return type:

str

frb.surveys.sdss.trim_down_catalog(catalog, keep_photoz=False, cut_within=<Quantity 1.5 arcsec>)[source]

Cut down a catalog to keep only 1 source within cut_within

Args:
  • catalog (astropy.table.Table) – Input source catalog

  • keep_photoz (bool, optional)

  • cut_within (Angle or Quantity) – Cut radius

Returns:

Catalog trimmed down

Return type:

astropy.table.Table