Physics Model

Stars

beast.physicsmodel.stars.stellib Module

Stellib class

Intent to implement a generic module to manage stellar library from various sources.

The interpolation is implemented from the pegase.2 fortran converted algorithm. (this may not be pythonic though)

Classes

Stellib(*args, **kargs)

Basic stellar library class

CompositeStellib(osllist, *args, **kwargs)

Generates an object from the union of multiple individual libraries

Kurucz([filename])

The stellar atmosphere models by Castelli and Kurucz 2004 or ATLAS9

Tlusty([filename])

Tlusty O and B stellar atmospheres

BTSettl([medres])

BT-Settl Library

Munari(*args, **kwargs)

ATLAS9 stellar atmospheres providing higher res than Kurucz medium resolution (1 Ang/pix) in optical (2500-10500 Ang)

Elodie(*args, **kwargs)

Elodie 3.1 stellar library derived class

BaSeL(*args, **kwargs)

BaSeL 2.2 (This library is used in Pegase.2)

Aringer(*args, **kwargs)

Aringer C+M+K giants Library

Class Inheritance Diagram

Inheritance diagram of beast.physicsmodel.stars.stellib.Stellib, beast.physicsmodel.stars.stellib.CompositeStellib, beast.physicsmodel.stars.stellib.Kurucz, beast.physicsmodel.stars.stellib.Tlusty, beast.physicsmodel.stars.stellib.BTSettl, beast.physicsmodel.stars.stellib.Munari, beast.physicsmodel.stars.stellib.Elodie, beast.physicsmodel.stars.stellib.BaSeL, beast.physicsmodel.stars.stellib.Aringer

beast.physicsmodel.stars.isochrone Module

Isochrone class

Intent to implement a generic module to manage isochrone mining from various sources.

Classes

Isochrone([name])

padova2010()

pegase()

ezIsoch(source[, interp])

Trying to make something that is easy to manipulate This class is basically a proxy to a table (whatever format works best) and tries to keep things coherent.

PadovaWeb([Zref, modeltype, filterPMS, ...])

MISTWeb([Zref, rotation])

Class Inheritance Diagram

Inheritance diagram of beast.physicsmodel.stars.isochrone.Isochrone, beast.physicsmodel.stars.isochrone.padova2010, beast.physicsmodel.stars.isochrone.pegase, beast.physicsmodel.stars.isochrone.ezIsoch, beast.physicsmodel.stars.isochrone.PadovaWeb, beast.physicsmodel.stars.isochrone.MISTWeb

Dust

beast.physicsmodel.dust.extinction Module

Extinction Curves

Classes

ExtinctionLaw()

Extinction Law Template Class

Cardelli89()

Cardelli89 Milky Way R(V) dependent Extinction Law

Fitzpatrick99()

Fitzpatrick99 Milky Way R(V) dependent Extinction Law

Gordon03_SMCBar()

Gordon03 SMCBar extinction curve

Gordon16_RvFALaw()

Gordon16 RvFA extinction law

Generalized_RvFALaw([ALaw, BLaw])

Generalized RvFA extinction law

Generalized_DustExt([curve])

Generalized extinction curve class to import classes from dust_extinction package.

Class Inheritance Diagram

Inheritance diagram of beast.physicsmodel.dust.extinction.ExtinctionLaw, beast.physicsmodel.dust.extinction.Cardelli89, beast.physicsmodel.dust.extinction.Fitzpatrick99, beast.physicsmodel.dust.extinction.Gordon03_SMCBar, beast.physicsmodel.dust.extinction.Gordon16_RvFALaw, beast.physicsmodel.dust.extinction.Generalized_RvFALaw, beast.physicsmodel.dust.extinction.Generalized_DustExt

beast.physicsmodel.dust.extinction_extension Module

Classes

F19_D03_extension([Rv])

dust_extinction.parameter_averages.F19 model extended to shorter wavelengths using the dust_extinction.grain_models.D03 models.

G03_SMCBar_WD01_extension(*args[, meta, name])

dust_extinction.averages.G03_SMCBar model extended to shorter wavelengths using the dust_extinction.grain_models.WD01 SMCBar model.

Class Inheritance Diagram

Inheritance diagram of beast.physicsmodel.dust.extinction_extension.F19_D03_extension, beast.physicsmodel.dust.extinction_extension.G03_SMCBar_WD01_extension

Weights

Priors are implemented as weights to allow for fast integration. Handling the grid spacing is done with grid weights allowing the priors values to be independent of the grid spacing.

beast.physicsmodel.priormodel Module

Classes

PriorModel(model[, allowed_models])

Compute the priors as weights given the input grid

PriorDustModel(model)

Prior model for dust parameters with specific allowed models.

PriorAgeModel(model)

Prior model for age parameter with specific allowed models.

PriorMassModel(model)

Prior model for mass parameter with specific allowed models.

PriorMetallicityModel(model)

Prior model for metallicity parameter with specific allowed models.

PriorDistanceModel(model)

Prior model for distance parameter with specific allowed models.

Class Inheritance Diagram

Inheritance diagram of beast.physicsmodel.priormodel.PriorModel, beast.physicsmodel.priormodel.PriorDustModel, beast.physicsmodel.priormodel.PriorAgeModel, beast.physicsmodel.priormodel.PriorMassModel, beast.physicsmodel.priormodel.PriorMetallicityModel, beast.physicsmodel.priormodel.PriorDistanceModel

beast.physicsmodel.grid_weights_stars Module

Grid Weights

The use of a non-uniformly spaced grid complicates the marginalization step as the trick of summation instead of integration is used. But this trick only works when the grid is uniformly spaced in all dimensions.

If the grid is not uniformly spaced, weights can be used to correct for the non-uniform spacing.

Functions

compute_distance_grid_weights(dists)

Computes the distance weights to set a uniform prior on linear distance

compute_age_grid_weights(logages)

Computes the age weights to set a uniform prior on linear SFR

compute_mass_grid_weights(masses)

Computes the mass weights to set a uniform prior on linear mass

compute_metallicity_grid_weights(mets)

Computes the metallicity weights to set a uniform prior on linear metallicity

compute_bin_boundaries(tab)

Computes the boundaries of bins

beast.physicsmodel.grid_and_prior_weights Module

Grid and Prior Weights

The use of a non-uniformly spaced grid complicates the marginalization step as the trick of summation instead of integration is used. But this trick only works when the grid is uniformaly spaced in all dimensions.

If the grid is not uniformally spaced, weights can be used to correct for the non-uniform spacing.

Basically, we want the maginalization using these grid weights to provide flat priors on all the fit parameters. Non-flat priors will be implemented with prior weights.

Functions

compute_age_mass_metallicity_weights(_tgrid, ...)

Computes the age-mass-metallicity grid and prior weights on the BEAST model spectra grid Grid and prior weight columns updated by multiplying by the age-mass-metallicity weight.

compute_distance_age_mass_metallicity_weights(_tgrid)

Computes the distance and age-mass-metallicity grid and prior weights on the BEAST model spectra grid

Grid

beast.physicsmodel.grid Module

SED/spectral grids

Classes

ModelGrid(*args, **kwargs)

Generic class

SEDGrid(*args, **kwargs)

Generate a grid that the full observational model (SEDs).

SpectralGrid(*args, **kwargs)

Generate a grid that contains spectra.

Class Inheritance Diagram

Inheritance diagram of beast.physicsmodel.grid.ModelGrid, beast.physicsmodel.grid.SEDGrid, beast.physicsmodel.grid.SpectralGrid

beast.physicsmodel.helpers.gridbackends Module

Backends to handle the model grids different ways

Multiple backends are available to reduce the memory footprint for a performance cost as small as possible.

Implemented Backends
MemoryBackend:

Load everything into memory. Can initiate from variables, a filename, CacheBackend, and DiskBackend.

CacheBackend:

Load data only at the first request. You can work using only seds or only model properties without the overhead of loading both. (works with FITS and HDF files). Offers also dropping part of the data.

DiskBackend:

Works directly with an h5py support, ie., on disk. Cache and reading are allowed through any way offered by h5py, which becomes very handy for very low-memory tasks such as doing single star figures.

Classes

GridBackend(*args, **kwargs)

How the content of a grid is handled.

MemoryBackend(lamb[, seds, grid, cov_diag, ...])

Instanciate a grid object that has no physical storage

CacheBackend(fname, *args, **kwargs)

Load content from a file only when needed

DiskBackend(fname, *args, **kwargs)

Reads the data from disk when it is accessed.

Class Inheritance Diagram

Inheritance diagram of beast.physicsmodel.helpers.gridbackends.GridBackend, beast.physicsmodel.helpers.gridbackends.MemoryBackend, beast.physicsmodel.helpers.gridbackends.CacheBackend, beast.physicsmodel.helpers.gridbackends.DiskBackend

beast.physicsmodel.creategrid Module

Create extinguished grid more segmented dealing with large grids with enough memory

All functions are now transformed into generators. As a result, any function allows computation of a grid in an arbitrary number of chunks. This offers the possibility to generate grids that cannot fit in memory.

Note

  • dependencies have also been updated accordingly.

  • likelihood computations need to be updated to allow computations even if the full grid does not fit in memory

Functions

gen_spectral_grid_from_stellib_given_points(...)

Generator that reinterpolates a given stellar spectral library on to

make_extinguished_grid(spec_grid, ...[, ...])

Extinguish spectra and extract an SEDGrid through given series of filters (all wavelengths in stellar SEDs and filter response functions are assumed to be in Angstroms)

add_spectral_properties(specgrid[, ...])

Addon spectral calculations to spectral grids to extract in the fitting routines

calc_absflux_cov_matrices(specgrid, sedgrid, ...)

Calculate the absflux covariance matrices for each model Must be done on the full spectrum of each model to account for the changing combined spectral response due to the model SED and the filter response curve.