API Reference¶
The classes and functions of StarKit, by module, generated from their docstrings.
Synthetic photometry¶
starkit.filters Module¶
Filter curves and zero points for synthetic photometry.
A Filter holds a response curve and its detector type. The mean flux
density of a spectrum through a filter is
<f_lambda> = int f_lambda S(lambda) lambda dlambda / int S(lambda) lambda dlambda
for a photon-counting curve S, and
<f_lambda> = int f_lambda S’(lambda) dlambda / int S’(lambda) dlambda
for an energy response curve S’, as published for photomultiplier photometry (Bessell & Murphy 2012, PASP 124, 140, Appendix A). Both forms are computed here with the energy-weighted response, S lambda or S’.
Functions¶
|
Make a list of |
Spectrum of Vega used for the Vega zero points, read from |
Classes¶
|
Response curve of a photometric filter. |
starkit.base.operations.imager Module¶
Classes¶
|
Magnitudes of a spectrum in a set of filters. |
Models¶
starkit.base.assemble_model Module¶
Functions¶
|
starkit.base.operations.stellar Module¶
Classes¶
|
The rotational broadening kernel was taken from Observation and Analysis of Stellar Photospheres by David Gray |
|
Module to model the velocity of the star with the relativistic redshift correction. |
|
Module to model the classical definition of radial velocity |
|
|
|
starkit.base.operations.spectrograph Module¶
Classes¶
|
Convolve with a gaussian with given resolution to mimick an instrument assuming lambda / delta_lambda being constant |
|
Convolve with a gaussian with given resolution to mimick an instrument assuming delta_lambda being constant |
|
This class can be called to do a interpolation on a given spectrum. |
|
Normalize a model spectrum to an observed one using a polynomial |
|
Normalize a model spectrum to an observed one in multiple parts |
Fitting¶
starkit.fitkit.likelihoods Module¶
Classes¶
|
|
|
Gaussian likelihood of the colors between consecutive filters. |
|
Gaussian likelihood of the magnitudes. |
|
|
|
|
|
|
|
starkit.fitkit.priors Module¶
Classes¶
|
A fixed value |
|
A gaussian prior |
|
A Poisson prior |
|
A collection of prior objects that will be evaluated |
|
A Uniform distribution prior |
starkit.fitkit.multinest Package¶
Classes¶
|
Use multinest to fit a spectrum using a grid of models generated by specgrid. |
|
Grids¶
starkit.gridkit Package¶
Functions¶
|
Load the grid from an HDF file |
|
Load the grid from an HDF file |
Classes¶
|
starkit.gridkit.flux_check Module¶
Compare the flux scale of a grid with the surface flux of a blackbody.
The flux_unit label of a grid does not always describe its fluxes: grids
written by StarKit before January 2025 are labeled erg/s/angstrom whether they
hold luminosity density or surface flux. check_flux_scale integrates a few
model spectra of a grid over its wavelength range and divides by the integral
of the surface flux of a blackbody at the same effective temperature,
pi * B_lambda(teff). The ratio identifies what the fluxes are:
about 1 for surface flux, F_lambda (erg / (s cm2 Angstrom));
about 1/pi for surface flux divided by pi;
about 1/(4 pi) for the Eddington flux, F_lambda / (4 pi);
4 pi R**2, with R the stellar radius in cm (about 6e22 for the Sun), for luminosity density, L_lambda (erg / (s Angstrom));
continuum-normalized spectra have values near 1 and carry no flux scale.
Model spectra differ from a blackbody by tens of percent, more so over a narrow wavelength range, so the ratios of surface fluxes found in practice lie between about 0.5 and 2.
Functions¶
|
Surface flux pi * B_lambda of a blackbody, in erg / (s cm2 Angstrom). |
|
Compare the fluxes of a grid with the surface flux of a blackbody. |
|
Text report of a |
Classes¶
|
Flux scale of one model spectrum of a grid. |
|
starkit.gridkit.inspector Module¶
Functions¶
|
|
|
|
|
|
|
Classes¶
|
|
|