species.core package¶
Submodules¶
species.core.box module¶
Module with the Box classes and create_box function.
- class species.core.box.Box[source]¶
Bases:
objectClass for generic methods that can be applied on all Box object.
- Returns:
None
- Return type:
NoneType
- class species.core.box.ColorColorBox[source]¶
Bases:
BoxClass for storing color-color data in a
Box.- Returns:
None
- Return type:
NoneType
- class species.core.box.ColorMagBox[source]¶
Bases:
BoxClass for storing color-magnitude data in a
Box.- Returns:
None
- Return type:
NoneType
- class species.core.box.CoolingBox[source]¶
Bases:
BoxClass for storing cooling curve data in a
Box.- Returns:
None
- Return type:
NoneType
- class species.core.box.IsochroneBox[source]¶
Bases:
BoxClass for storing isochrone data in a
Box.- Returns:
None
- Return type:
NoneType
- class species.core.box.ModelBox[source]¶
Bases:
BoxClass for storing a model spectrum in a
Box.- Returns:
None
- Return type:
NoneType
- resample_spectrum(wavel_resample: ndarray) None[source]¶
Method for resampling the spectrum with
spectresto a new wavelength grid.- Parameters:
wavel_resample (np.ndarray) – Wavelength points (um) to which the spectrum will be resampled.
- Returns:
None
- Return type:
NoneType
- smooth_spectrum(spec_res: float) None[source]¶
Method for smoothing the spectrum with a Gaussian kernel to the instrument resolution. The method is best applied on an input spectrum with a logarithmic wavelength sampling (i.e. constant spectral resolution). Alternatively, the wavelength sampling may be linear, but the smoothing is slower in that case.
- Parameters:
spec_res (float) – Spectral resolution that is used for the smoothing kernel.
- Returns:
None
- Return type:
NoneType
- synthetic_photometry(filter_name: str | list[str]) PhotometryBox[source]¶
Method for calculating synthetic photometry from the model spectrum that is stored in the
ModelBox.- Parameters:
filter_name (str, list(str)) – Single filter name or a list of filter names for which synthetic photometry will be calculated.
- Returns:
Box with the synthetic photometry.
- Return type:
- class species.core.box.ObjectBox[source]¶
Bases:
BoxClass for storing object data in a
Box.- Returns:
None
- Return type:
NoneType
- class species.core.box.PhotometryBox[source]¶
Bases:
BoxClass for storing photometric data in a
Box.- Returns:
None
- Return type:
NoneType
- class species.core.box.ResidualsBox[source]¶
Bases:
BoxClass for storing best-fit residuals in a
Box.- Returns:
None
- Return type:
NoneType
- class species.core.box.SamplesBox[source]¶
Bases:
BoxClass for storing posterior samples in a
Box.- Returns:
None
- Return type:
NoneType
- class species.core.box.SpectrumBox[source]¶
Bases:
BoxClass for storing spectral data in a
Box.- Returns:
None
- Return type:
NoneType
species.core.constants module¶
Physical constants in the International System of Units (SI).
species.core.species_init module¶
Module for setting up species in the working folder.
- class species.core.species_init.SpeciesInit(config_file: str | PosixPath | WindowsPath | None = None, database_file: str | PosixPath | WindowsPath | None = None)[source]¶
Bases:
objectClass for initiating species by creating the database and configuration file in case they are not present in the working folder, and creating the data folder for storage of input data.
- Parameters:
config_file (str, PosixPath, WindowsPath, None) – Path to the configuration file that is stored as species_config.ini. Setting the argument enables reading a configuration file at a different path than the current working directory. The default location (i.e. the working folder of your script or notebook) is used by setting the argument to
None.database_file (str, PosixPath, WindowsPath, None) – Path to the HDF5 database that is stored as species_database.hdf5. Setting the argument will overwrite the database path in the configuration file. The path from the configuration file is used if the argument of
database_fileis set toNone.
- Returns:
None
- Return type:
NoneType