species.data package

Submodules

species.data.ames_cond module

Module for AMES-Cond atmospheric models.

species.data.ames_cond.add_ames_cond(input_path, database, wl_bound, teff_bound, specres)[source]

Function for adding the AMES-Cond atmospheric models to the database.

Parameters:
  • input_path (str) – Folder where the data is located.
  • database (h5py._hl.files.File) – Database.
  • wl_bound (tuple(float, float)) – Wavelength range (micron).
  • teff_bound (tuple(float, float), None) – Effective temperature range (K).
  • specres (float) – Spectral resolution.
Returns:

None

Return type:

NoneType

species.data.ames_dusty module

Module for AMES-Dusty atmospheric models.

species.data.ames_dusty.add_ames_dusty(input_path, database, wl_bound, teff_bound, specres)[source]

Function for adding the AMES-Dusty atmospheric models to the database.

Parameters:
  • input_path (str) – Folder where the data is located.
  • database (h5py._hl.files.File) – Database.
  • wl_bound (tuple(float, float)) – Wavelength range (micron).
  • teff_bound (tuple(float, float), None) – Effective temperature range (K).
  • specres (float) – Spectral resolution.
Returns:

None

Return type:

NoneType

species.data.btnextgen module

Module for BT-NextGen atmospheric models.

species.data.btnextgen.add_btnextgen(input_path, database, wl_bound, teff_bound, specres)[source]

Function for adding the BT-NextGen atmospheric models to the database.

Parameters:
  • input_path (str) – Folder where the data is located.
  • database (h5py._hl.files.File) – Database.
  • wl_bound (tuple(float, float)) – Wavelength range (micron).
  • teff_bound (tuple(float, float), None) – Effective temperature range (K).
  • specres (float) – Spectral resolution.
Returns:

None

Return type:

NoneType

species.data.btsettl module

Module for BT-Settl atmospheric models.

species.data.btsettl.add_btsettl(input_path, database, wl_bound, teff_bound, specres)[source]

Function for adding the BT-Settl atmospheric models to the database.

Parameters:
  • input_path (str) – Folder where the data is located.
  • database (h5py._hl.files.File) – Database.
  • wl_bound (tuple(float, float)) – Wavelength range (micron).
  • teff_bound (tuple(float, float), None) – Effective temperature range (K).
  • specres (float) – Spectral resolution.
Returns:

None

Return type:

NoneType

species.data.companions module

Module for extracting data of directly imaged planets and brown dwarfs.

species.data.companions.get_data()[source]

Function for extracting a dictionary with the distances (pc) and apparent magnitudes of directly imaged planets and brown dwarfs.

Returns:Dictionary with the distances and apparent magnitudes of directly imaged companions. Distances are from GAIA DR2 unless indicated as comment.
Return type:dict

species.data.database module

Module with functionalities for reading and writing of data.

class species.data.database.Database[source]

Bases: object

Class for fitting atmospheric model spectra to photometric data.

Returns:None
Return type:NoneType
add_calibration(tag, filename=None, data=None, units=None, scaling=None)[source]

Function for adding a calibration spectrum to the database.

Parameters:
  • tag (str) – Tag name in the database.
  • filename (str, None) – Filename with the calibration spectrum. The first column should contain the wavelength (micron), the second column the flux density (W m-2 micron-1), and the third column the error (W m-2 micron-1). The data argument is used if set to None.
  • data (numpy.ndarray, None) – Spectrum stored as 3D array with shape (n_wavelength, 3). The first column should contain the wavelength (micron), the second column the flux density (W m-2 micron-1), and the third column the error (W m-2 micron-1).
  • units (dict, None) – Dictionary with the wavelength and flux units. Default (micron and W m-2 micron-1) is used if set to None.
  • scaling (tuple(float, float)) – Scaling for the wavelength and flux as (scaling_wavelength, scaling_flux). Not used if set to None.
Returns:

None

Return type:

NoneType

add_companion(name=None)[source]
Parameters:name (list(str, )) – Companion name. All companions are added if set to None.
Returns:None
Return type:NoneType
add_filter(filter_name, filename=None)[source]
Parameters:
  • filter_name (str) – Filter name from the SVO Filter Profile Service (e.g., ‘Paranal/NACO.Lp’).
  • filename (str) – Filename with the filter profile. The first column should contain the wavelength (micron) and the second column the transmission (no units). The profile is downloaded from the SVO Filter Profile Service if set to None.
Returns:

None

Return type:

NoneType

add_isochrones(filename, tag, model='baraffe')[source]

Function for adding isochrones data to the database.

Parameters:
  • filename (str) – Filename with the isochrones data.
  • tag (str) – Database tag name where the isochrone that will be stored.
  • model (str) – Evolutionary model (‘baraffe’ or ‘marleau’). For ‘baraffe’ models, the isochrone data can be downloaded from https://phoenix.ens-lyon.fr/Grids/. For ‘marleau’ models, the data can be requested from Gabriel Marleau.
Returns:

None

Return type:

NoneType

add_model(model, wavel_range=None, teff_range=None, spec_res=1000.0, data_folder=None)[source]
Parameters:
  • model (str) – Model name (‘ames-cond’, ‘ames-dusty’, ‘bt-settl’, ‘bt-nextgen’, ‘drift-phoenix’, ‘petitcode-cool-clear’, ‘petitcode-cool-cloudy’, ‘petitcode-hot-clear’, or ‘petitcode-hot-cloudy’).
  • wavel_range (tuple(float, float), None) – Wavelength range (micron).
  • teff_range (tuple(float, float), None) – Effective temperature range (K).
  • spec_res (float) – Spectral resolution.
  • data_folder (str, None) – Folder with input data. Only required for the petitCODE hot models which are not publically available.
Returns:

None

Return type:

NoneType

add_object(object_name, distance=None, app_mag=None, spectrum=None, instrument=None)[source]
Parameters:
  • object_name (str) – Object name.
  • distance (tuple(float, float), None) – Distance and uncertainty (pc). Not written if set to None.
  • app_mag (dict) – Apparent magnitudes. Not written if set to None.
  • spectrum (str) – Spectrum filename. The first three columns should contain the wavelength (micron), flux density (W m-2 micron-1), and the error (W m-2 micron-1). Not written if set to None.
  • instrument (str) – Instrument that was used for the spectrum (currently only ‘gpi’ possible). Not used if set to None.
Returns:

None

Return type:

NoneType

add_photometry(phot_library)[source]
Parameters:phot_library (str) – Photometric library (‘vlm-plx’ or ‘leggett’).
Returns:None
Return type:NoneType
add_samples(sampler, spectrum, tag, modelpar, distance=None)[source]
Parameters:
  • sampler (emcee.ensemble.EnsembleSampler) – Ensemble sampler.
  • spectrum (tuple(str, str)) – Tuple with the spectrum type (‘model’ or ‘calibration’) and spectrum name (e.g. ‘drift-phoenix’).
  • tag (str) – Database tag.
  • modelpar (list(str, )) – List with the model parameter names.
  • distance (float) – Distance to the object (pc). Not used if set to None.
Returns:

None

Return type:

NoneType

add_spectrum(spec_library, sptypes=None)[source]
Parameters:
  • spec_library (str) – Spectral library (‘irtf’ or ‘spex’).
  • sptypes (list(str, )) – Spectral types (‘F’, ‘G’, ‘K’, ‘M’, ‘L’, ‘T’). Currently only implemented for ‘irtf’.
Returns:

None

Return type:

NoneType

get_mcmc_photometry(tag, burnin, filter_name)[source]
Parameters:
  • tag (str) – Database tag with the MCMC samples.
  • burnin (int) – Number of burnin steps.
  • filter_name (str) – Filter name for which the photometry is calculated.
Returns:

Synthetic photometry (mag).

Return type:

numpy.ndarray

get_mcmc_spectra(tag, burnin, random, wavel_range, spec_res=None)[source]
Parameters:
  • tag (str) – Database tag with the MCMC samples.
  • burnin (int) – Number of burnin steps.
  • random (int) – Number of random samples.
  • wavel_range (tuple(float, float) or str) – Wavelength range (micron) or filter name. Full spectrum if set to None.
  • spec_res (float) – Spectral resolution, achieved by smoothing with a Gaussian kernel. The original wavelength points are used if set to None.
Returns:

Boxes with the randomly sampled spectra.

Return type:

list(species.core.box.ModelBox, )

get_median_sample(tag, burnin)[source]
Parameters:
  • tag (str) – Database tag with the MCMC results.
  • burnin (int) – Number of burnin steps.
Returns:

Parameters and values for the sample with the maximum posterior probability.

Return type:

dict

get_object(object_name, filters=None, inc_phot=True, inc_spec=True)[source]
Parameters:
  • object_name (str) – Object name in the database.
  • filters (list(str, )) – Filter names for which the photometry is selected. All available photometry of the object is selected if set to None.
  • inc_phot (bool) – Include photometry in the box.
  • inc_spec (bool) – Include spectrum in the box.
Returns:

Box with the object’s data.

Return type:

species.core.box.ObjectBox

get_probable_sample(tag, burnin)[source]
Parameters:
  • tag (str) – Database tag with the MCMC results.
  • burnin (int) – Number of burnin steps.
Returns:

Parameters and values for the sample with the maximum posterior probability.

Return type:

dict

get_samples(tag, burnin=None, random=None)[source]
Parameters:
  • tag (str) – Database tag with the samples.
  • burnin (int, None) – Number of burnin samples to exclude. All samples are selected if set to None.
  • random (int, None) – Number of random samples to select. All samples (with the burnin excluded) are selected if set to None.
Returns:

Box with the MCMC samples.

Return type:

species.core.box.SamplesBox

static list_companions()[source]
Returns:None
Return type:NoneType
list_content()[source]
Returns:None
Return type:NoneType

species.data.drift_phoenix module

Module for DRIFT-PHOENIX atmospheric models.

species.data.drift_phoenix.add_drift_phoenix(input_path, database)[source]

Function for adding the DRIFT-PHOENIX atmospheric models to the database.

Parameters:
  • input_path (str) –
  • database (h5py._hl.files.File) –
Returns:

None

Return type:

NoneType

species.data.filters module

Module for downloading filter data from the SVO website.

species.data.filters.download_filter(filter_id)[source]
Parameters:filter_id (str) – Filter ID.
Returns:
  • numpy.ndarray – Wavelength (micron).
  • numpy.ndarray – Transmission.

species.data.irtf module

Module for adding IRTF spectra tot the database.

species.data.irtf.add_irtf(input_path, database, sptypes)[source]

Function to add the IRTF Spectral Library to the database.

Parameters:
  • input_path (str) – Path of the data folder.
  • database (h5py._hl.files.File) – Database.
  • sptypes (tuple(str, )) – Spectral types (‘F’, ‘G’, ‘K’, ‘M’, ‘L’, ‘T’).
Returns:

None

Return type:

NoneType

species.data.isochrones module

Module for isochrone data of evolutionary models.

species.data.isochrones.add_baraffe(database, tag, filename)[source]

Function for adding the Baraffe et al. isochrone data to the database. Any of the isochrones from https://phoenix.ens-lyon.fr/Grids/ can be used as input.

https://ui.adsabs.harvard.edu/abs/2003A%26A…402..701B/

Parameters:
  • database (h5py._hl.files.File) – Database.
  • tag (str) – Tag name in the database.
  • filename (str) – Filename with the isochrones data.
Returns:

None

Return type:

NoneType

species.data.isochrones.add_marleau(database, tag, filename)[source]

Function for adding the Marleau et al. isochrone data to the database. The isochrone data can be requested from Gabriel Marleau.

https://ui.adsabs.harvard.edu/abs/2019A%26A…624A..20M/abstract

Parameters:
  • database (h5py._hl.files.File) – Database.
  • tag (str) – Tag name in the database.
  • filename (str) – Filename with the isochrones data.
Returns:

None

Return type:

NoneType

species.data.leggett module

Text

species.data.leggett.add_leggett(input_path, database)[source]

Function for adding the Database of Ultracool Parallaxes to the database.

Parameters:
  • input_path (str) – Path of the data folder.
  • database (h5py._hl.files.File) – Database.
Returns:

None

Return type:

NoneType

species.data.petitcode module

Module for petitCODE atmospheric models.

species.data.petitcode.add_petitcode_cool_clear(input_path, database, wl_bound, teff_bound, specres)[source]

Function for adding the petitCODE cool clear atmospheric models to the database.

Parameters:
  • input_path (str) – Folder where the data is located.
  • database (h5py._hl.files.File) – Database.
  • wl_bound (tuple(float, float)) – Wavelength range (micron).
  • teff_bound (tuple(float, float), None) – Effective temperature range (K).
  • specres (float) – Spectral resolution.
Returns:

None

Return type:

NoneType

species.data.petitcode.add_petitcode_cool_cloudy(input_path, database, wl_bound, teff_bound, specres)[source]

Function for adding the petitCODE cool cloudy atmospheric models to the database.

Parameters:
  • input_path (str) – Folder where the data is located.
  • database (h5py._hl.files.File) – Database.
  • wl_bound (tuple(float, float)) – Wavelength range (micron).
  • teff_bound (tuple(float, float), None) – Effective temperature range (K).
  • specres (float) – Spectral resolution.
Returns:

None

Return type:

NoneType

species.data.petitcode.add_petitcode_hot_clear(input_path, database, wl_bound, teff_bound, specres, data_folder)[source]

Function for adding the petitCODE hot clear atmospheric models to the database.

Parameters:
  • input_path (str) – Folder where the data is located.
  • database (h5py._hl.files.File) – Database.
  • wl_bound (tuple(float, float)) – Wavelength range (micron).
  • teff_bound (tuple(float, float), None) – Effective temperature range (K).
  • specres (float) – Spectral resolution.
  • data_folder (str) – Path with input data.
Returns:

None

Return type:

NoneType

species.data.petitcode.add_petitcode_hot_cloudy(input_path, database, wl_bound, teff_bound, specres, data_folder)[source]

Function for adding the petitCODE hot cloudy atmospheric models to the database.

Parameters:
  • input_path (str) – Folder where the data is located.
  • database (h5py._hl.files.File) – Database.
  • wl_bound (tuple(float, float)) – Wavelength range (micron).
  • teff_bound (tuple(float, float), None) – Effective temperature range (K).
  • specres (float) – Spectral resolution.
  • data_folder (str) – Path with input data.
Returns:

None

Return type:

NoneType

species.data.queries module

Text

class species.data.queries.NoStdStreams(stdout=None, stderr=None)[source]

Bases: object

Text

species.data.queries.get_distance(target)[source]
Parameters:target (str) – Target name.
Returns:
  • str – SIMBAD name.
  • float – Distance (pc).
species.data.queries.get_simbad(name)[source]

Function for getting the SIMBAD identifier of an object.

Parameters:name (numpy.ndarray) –
Returns:SIMBAD name.
Return type:numpy.ndarray

species.data.spex module

Text

species.data.spex.add_spex(input_path, database)[source]

Function for adding the SpeX Prism Spectral Library to the database.

Parameters:
  • input_path (str) – Path of the data folder.
  • database (h5py._hl.files.File) – The HDF5 database.
Returns:

None

Return type:

NoneType

species.data.vega module

Text

species.data.vega.add_vega(input_path, database)[source]

Function for adding a Vega spectrum to the database.

Parameters:
  • input_path (str) – Path of the data folder.
  • database (h5py._hl.files.File) – Database.
Returns:

None

Return type:

NoneType

species.data.vlm_plx module

Text

species.data.vlm_plx.add_vlm_plx(input_path, database)[source]

Function for adding the Database of Ultracool Parallaxes to the database.

Parameters:
  • input_path (str) –
  • database (h5py._hl.files.File) –
Returns:

None

Return type:

NoneType

Module contents