SpectralGrid

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

Bases: ModelGrid

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

Attributes:
sedsndarray

2D float array (# models, # bands) giving the seds

lambndarray

1D float array of the wavelengths of the sed bands

gridTable

table with columns providing the model parameters and other characteristics of the grid

headerdict

header information

Parameters:
lambndarray or str or GridBackend subclass
  • 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 float array of the seds

gridTable

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 GridBackend subclass, 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:
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:
gSEDGrid instance or None

if not inplace, returns a new SEDGrid instance. Otherwise returns None

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:
memgridSEDGrid instance

grid info with memory backend