pynbody.analysis.luminosity.StevSSPTable#

class pynbody.analysis.luminosity.StevSSPTable(path, ignore_bands=None)[source]#

Bases: SSPTable

An SSP table from the output of the STEV/CMD web interface

Attributes:
bands

List of bandpasses available in this table

Methods

__call__(snapshot, band)

Interpolate the magnitude for a given snapshot and bandpass

get_central_wavelength(band)

Get the estimated central wavelength of a bandpass

get_flux_normalization(band)

Get the normalization factor for converting relative magnitudes to fluxes

get_spectral_density_normalization(band)

Get the normalization factor for converting absolute magnitudes to spectral density

interpolate(ages, metallicities, band)

Interpolate the magnitude for a given age, metallicity and bandpass

__init__(path, ignore_bands=None)[source]#

Initialise an SSP table from the text output of the STEV/CMD web interface

property bands#

List of bandpasses available in this table

get_central_wavelength(band)#

Get the estimated central wavelength of a bandpass

The values are approximate, based on the tabulated central wavelengths from CMD. If you use a different bandpass set, you may wish to override this method. It is used by the pynbody.plot.stars.render() routine to estimate the central wavelength of a bandpass for the purposes of estimating dust extinction.

Parameters:

band (str) – Bandpass name

Returns:

Central wavelength in Angstroms

Return type:

float

get_flux_normalization(band)#

Get the normalization factor for converting relative magnitudes to fluxes

The normalization factor is the flux of a star with a magnitude of 0 in the given bandpass. Currently, this is only implemented for AB-calibrated systems, where the normalization factor is 3631 Jy.

get_spectral_density_normalization(band)#

Get the normalization factor for converting absolute magnitudes to spectral density

This uses the flux normalization and then (as per definition of absolute magnitude) considers the source to be at a distance of 10 pc. The output units are power per unit frequency (or, eqivalently, energy).

interpolate(ages, metallicities, band)#

Interpolate the magnitude for a given age, metallicity and bandpass

Parameters:
  • age (float or array-like) – Age in log10 years

  • metallicities (float or array-like) – Metallicity in log10 mass fraction

  • band (str) – Bandpass name

Returns:

Magnitude(s) per solar mass interpolated from the SSP table

Return type:

float or array-like