PhotometricSpectrum

class PhotometricSpectrum[source]

Photometric spectrum object.

This object is used to plot the photometric spectrum of a source. It is initialized with a catalogset object, which is a CatalogSet object. The catalogset object is used to extract the source information from the catalogs.

To change the plot parameters, modify the plt_params attribute.

__init__(catalogset=None)[source]

Initialize the PhotometricSpectrum object.

Parameters:

catalogset (CatalogSet) – The source catalogs to use for the photometric spectrum.

Methods

plot(self, ra=None, dec=None, obsdate=None, matching_radius_arcsec=5.0, ra_key='X_WORLD', dec_key='Y_WORLD', flux_key='MAGSKY_APER_2', fluxerr_key='MAGERR_APER_2', zperr_key='ZPERR_APER_2', depth_key='UL5SKY_APER_2', plot_all_in_one_figure=True, overplot_gaiaxp=False, overplot_sdss=False, overplot_ps1=False, overplot_stamp=False, verbose=True, title=None)

Plot photometric spectrum (wavelength vs magnitude/flux) for the given source.

The figure parameters are set in the plt_params attribute.

Parameters:
  • ra (float) – Right ascension of the source in degrees.

  • dec (float) – Declination of the source in degrees.

  • objname (str, optional) – Name of the source.

  • matching_radius_arcsec (float, optional) – Matching radius in arcseconds.

  • flux_key (str, optional) – Key for the flux column.

  • fluxerr_key (str, optional) – Key for the flux error column.

  • overplot_gaiaxp (bool, optional) – Whether to overplot GaiaXP data.

  • overplot_sdss (bool, optional) – Whether to overplot SDSS data.

  • overplot_ps1 (bool, optional) – Whether to overplot PS1 data.

  • verbose (bool, optional) – Whether to print verbose output.

Returns:

  • figs (list) – List of figures.

  • axs (list) – List of axes.

  • tbl (astropy.table.Table) – Table of data.

extract_source_info(self, ra, dec, ra_key='X_WORLD', dec_key='Y_WORLD', flux_key=None, fluxerr_key=None, zperr_key=None, depth_key=None, matching_radius_arcsec=5.0, verbose=True)

Extract source information from the merged catalog.

Each row of the returned table will be a per-exposure record with the metadata and photometry.

Parameters:
  • ra (float) – Sky position in degrees.

  • dec (float) – Sky position in degrees.

  • ra_key (str) – Column name for right ascension. Default is β€˜X_WORLD’.

  • dec_key (str) – Column name for declination. Default is β€˜Y_WORLD’.

  • flux_key (str or sequence of str) – Photometry value column you want to carry over (e.g., β€˜MAGSKY_APER_1’).

  • fluxerr_key (str or sequence of str) – Corresponding error column (e.g., β€˜MAGERR_APER_1’). Must be same length as flux_key.

  • zperr_key (str or sequence of str) – Corresponding zeropoint error column (e.g., β€˜ZPERR_APER_1’). Must be same length as flux_key.

  • depth_key (str or sequence of str) – Corresponding depth column (e.g., β€˜UL5SKY_APER_1’). Must be same length as flux_key.

  • matching_radius_arcsec (float) – Search radius for the source match.

Returns:

One row per exposure/catalog with metadata + requested photometry. Returns None if no source is found.

Return type:

astropy.table.Table or None