SpectralGrid¶
- class beast.physicsmodel.grid.SpectralGrid(*args, **kwargs)[source]¶
Bases:
ModelGridGenerate a grid that contains spectra. It provides an access to integrated photometry function getSEDs.
- grid¶
table with columns providing the model parameters and other characteristics of the grid
- Type:
- Parameters:
lamb (ndarray or str or
GridBackendsubclass) –if ndarray: wavelength of the SEDs (requires seds and grid arguments)
if str: filename to the grid
if backend: ref to the given grid
seds (ndarray) – 2D
floatarray of the sedsgrid (
Table) – table of properties associated to each sedheader (dict) – if provided, update the grid table header
aliases (dict) – if provided, update the grid table aliases
backend (str or
GridBackendsubclass, optional) – if str corresponding backend class ‘memory’ = MemoryBackend, ‘cache’ = CacheBackend, ‘disk’ = DiskBackend
Methods Summary
applyExtinctionLaw(extLaw[, inplace])Apply an extinction law to the model grid
getSEDs(filter_names[, absFlux, extLaw, ...])Extract integrated fluxes through filters
Methods Documentation
- applyExtinctionLaw(extLaw, inplace=False, **kwargs)[source]¶
Apply an extinction law to the model grid
- Parameters:
extLaw (extinction.ExtinctionLaw) – apply extinction law if provided
inplace (bool) – if set, do not copy the grid and apply on it
**kwargs – extra keywords will be forwarded to extLaw
- Returns:
g – if not inplace, returns a new
SEDGridinstance. Otherwise returnsNone- Return type:
SEDGridinstance or None
- getSEDs(filter_names, absFlux=True, extLaw=None, inplace=False, filterLib=None, **kwargs)[source]¶
Extract integrated fluxes through filters
- Parameters:
filter_names (list) – list of filter names according to the filter lib or filter instances (no mixing between name and instances)
absFlux (bool, optional) – returns absolute fluxes if set [capability should be removed]
extLaw (**kwargs extra keywords will be forworded to) – apply extinction law if provided
inplace (bool, optional) – if set, do not copy the grid and apply extinction on it
filterLib (str, optional) – full filename to the filter library hd5 file
extLaw
- Returns:
memgrid – grid info with memory backend
- Return type:
SEDGridinstance