External – Third party modules

MICMAC uses some functions from the fgbuster <https://github.com/fgbuster/fgbuster> package, which are used as third party module instead of being imported from the package itself.

micmac.external.fgbuster module

Functions from fgbuster.observation_helpers used in the micmac package.

get_instrument(tag='')[source]

Get a pre-defined instrumental configuration

Parameters:
tag : string

name of the pre-defined experimental configurations. It can contain the name of multiple experiments separated by a space. Call the function with a random input to get the available instruments.

Returns:

instr – It contains the experimental configuration of the desired instrument(s).

Return type:

pandas.DataFrame

get_noise_realization(nside, instrument, unit='uK_CMB')[source]

Generate noise maps for the instrument

Parameters:
nside : int

Desired output healpix nside.

instrument

Object that provides the following as a key or an attribute.

  • frequency (required)

  • depth_p (required if noise=True)

  • depth_i (required if noise=True)

They can be anything that is convertible to a float numpy array. If only one of depth_p or depth_i is provided, the other is inferred assuming that the former is sqrt(2) higher than the latter.

unit : str

Unit of the output. Only K_CMB and K_RJ (and multiples) are supported.

sky : str of pysm3.Sky

Sky to observe. It can be a pysm3.Sky or a tag to create one.

noise : bool

If true, add Gaussian, uncorrelated, isotropic noise.

Returns:

observation – Shape is (n_freq, 3, n_pix).

Return type:

array

get_observation(instrument='', sky=None, noise=False, nside=None, unit='uK_CMB')[source]

Get a pre-defined instrumental configuration

Parameters:
instrument=''

It can be either a str (see get_instrument()) or an object that provides the following as a key or an attribute.

  • frequency (required)

  • depth_p (required if noise=True)

  • depth_i (required if noise=True)

They can be anything that is convertible to a float numpy array. If only one of depth_p or depth_i is provided, the other is inferred assuming that the former is sqrt(2) higher than the latter.

sky : str of pysm3.Sky

Sky to observe. It can be a pysm3.Sky or a tag to create one.

noise : bool

If true, add Gaussian, uncorrelated, isotropic noise.

nside : int

Desired output healpix nside. It is optional if sky is a pysm3.Sky, and required if it is a str or None.

unit : str

Unit of the output. Only K_CMB and K_RJ (and multiples) are supported.

Returns:

observation – Shape is (n_freq, 3, n_pix)

Return type:

array

get_sky(nside, tag='c1d0s0')[source]

Get a pre-defined PySM sky

Parameters:
nside : int

healpix nside of the sky templates

tag : string

See the pysm documentation for a complete list of available options. Default is ‘c1d0s0’, i.e. cmb (c1), dust with constant temperature and spectral index (d0), and synchrotron with constant spectral index (s0).

Returns:

sky – See the pysm documentation

Return type:

pysm3.Sky