make_extinguished_grid¶
-
beast.physicsmodel.creategrid.
make_extinguished_grid
(spec_grid, filter_names, extLaw, avs, rvs, fAs=None, av_prior_model={'name': 'flat'}, rv_prior_model={'name': 'flat'}, fA_prior_model={'name': 'flat'}, chunksize=0, add_spectral_properties_kwargs=None, absflux_cov=False, filterLib=None)[source]¶ 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)
Parameters: - spec_grid: string or grid.SpectralGrid
if string: spec_grid is the filename to the grid file with stellar spectra the backend to load this grid will be the minimal invasive: ‘HDF’ if possible, ‘cache’ otherwise.
if not a string, expecting the corresponding SpectralGrid instance (backend already setup)
- filter_names: list
list of filter names according to the filter lib
- Avs: sequence
Av values to iterate over
- av_prior_model: list
list including prior model name and parameters
- Rvs: sequence
Rv values to iterate over
- rv_prior_model: list
list including prior model name and parameters
- fAs: sequence (optional)
f_A values to iterate over f_A can be omitted if the extinction Law does not use it or allow fixed values
- fA_prior_model: list
list including prior model name and parameters
- chunksize: int, optional (default=0)
number of extinction model variations to generate at each cycle. Note that this means len(spec_grid * chunksize) If default <= 0, all models will be returned at once.
- filterLib: str
full filename to the filter library hd5 file
- add_spectral_properties_kwargs: dict
keyword arguments to call
add_spectral_properties()
at each iteration to add model properties from the spectra into the grid property table- asbflux_cov: boolean
set to calculate the absflux covariance matrices for each model (can be very slow!!! But it is the right thing to do)
Returns: - g: grid.SpectralGrid
final grid of reddened SEDs and models