FMatrix

class mesmer.FMatrix(components)[source] [edit on github]

Bases: object

Class to construct the foreground mixing matrix. This class models foreground SEDs of the different components of the sky model. This is an implementation of Equation (10) in 1608.00551, for a single set of spectral parameters.

Examples

>>> from mesmer.seds import FMatrix
>>> fmatrix = FMatrix(['cmb', 'syncpl', 'dustmbb'])
>>> pars = {
...     'nu': np.array([1, 100, 1000]),
...     'nu_ref_d' : 100.,
...     'nu_ref_s' : 100.,
...     'beta_s' : -3.,
...     'beta_d' : 1.5,
...     'T_d' : 20.,
... }
>>> print(fmatrix(**pars).shape)
(3, 3)

Once instantiated this function evaluates the component SEDs with which this class was instantiated.

As it is used in a variety of contexts, the mesmer.seds.FMatrix can be called in a variety of ways. It must ultimately be passed the arguments for all of the component functions. This is usually done through keyword arguments, however, the frequency can be passed as the only positional argument.

Parameters
components: list(str)

List of function names. These functions, evaluated at a list of frequencies, will give the mixing matrix, F.

Returns
ndarray

Array of shape (ncomps, nfreqs), representing the component SEDs evaluated for the requested frequencies.

Methods Summary

__call__(*args, **parameters)

Methods Documentation

__call__(*args, **parameters)numpy.ndarray[source] [edit on github]