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.

seds

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

Type:

ndarray

lamb

1D float array of the wavelengths of the sed bands

Type:

ndarray

grid

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

Type:

Table

header

header information

Type:

dict

Parameters:
  • lamb (ndarray 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

  • seds (ndarray) – 2D float array of the seds

  • grid (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 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:
  • 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 SEDGrid instance. Otherwise returns None

Return type:

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

SEDGrid instance