SpectralGrid

class beast.physicsmodel.grid.SpectralGrid(*args, **kwargs)[source]

Bases: beast.physicsmodel.grid.ModelGrid

Generate a grid that contains spectra. It provides an access to integrated photometry function getSEDs

Parameters:

*args and **kwargs are directly forwarded to the backend constructor

lamb: ndarray or str or GridBackend

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[dtype=float, ndim=2]

array of seds

grid: eztable.Table

table of properties associated to each sed

header: dict

if provided, update the grid table header

aliases: dict

if provided, update the grid table aliases

backend: str or GridBackend class or subclass

corresponding backend class

‘memory’: MemoryBackend, ‘cache’: CacheBackend, ‘hdf’: HDFBackend, ‘generic’: GridBackend

Methods Summary

applyExtinctionLaw(extLaw[, inplace]) Apply an extinction law to the model grid
getSEDs(filter_names[, absFlux, extLaw, inplace]) 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 forwrded to extLaw

getSEDs(filter_names, absFlux=True, extLaw=None, inplace=False, **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

returns absolute fluxes if set

extLaw: extinction.ExtinctionLaw

apply extinction law if provided

inplace:bool

if set, do not copy the grid and apply extinction on it

**kwargs extra keywords will be forwrded to extLaw

Returns:

memgrid: MemoryGrid instance

grid of SEDs