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