SpectralGrid¶
-
class
beast.physicsmodel.grid.SpectralGrid(*args, **kwargs)[source]¶ Bases:
beast.physicsmodel.grid.ModelGridGenerate a grid that contains spectra. It provides an access to integrated photometry function getSEDs.
- Attributes
- Parameters
- lambndarray 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
- sedsndarray
2D
floatarray of the seds- grid
Table table of properties associated to each sed
- headerdict
if provided, update the grid table header
- aliasesdict
if provided, update the grid table aliases
- backendstr or
GridBackendsubclass, optional if str corresponding backend class ‘memory’ = MemoryBackend, ‘cache’ = CacheBackend, ‘disk’ = DiskBackend
- lambndarray or str or
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
- extLawextinction.ExtinctionLaw
apply extinction law if provided
- inplacebool
if set, do not copy the grid and apply on it
- **kwargs
extra keywords will be forwarded to extLaw
- Returns
- g
SEDGridinstance or None if not inplace, returns a new
SEDGridinstance. Otherwise returnsNone
- g
-
getSEDs(filter_names, absFlux=True, extLaw=None, inplace=False, filterLib=None, **kwargs)[source]¶ Extract integrated fluxes through filters
- Parameters
- filter_nameslist
list of filter names according to the filter lib or filter instances (no mixing between name and instances)
- absFluxbool, optional
returns absolute fluxes if set [capability should be removed]
- extLawextinction.ExtinctionLaw, optional
apply extinction law if provided
- inplacebool, optional
if set, do not copy the grid and apply extinction on it
- filterLibstr, optional
full filename to the filter library hd5 file
- **kwargs extra keywords will be forworded to extLaw
- Returns
- memgrid
SEDGridinstance grid info with memory backend
- memgrid