CMM.preset.preset_components module

class CMM.preset.preset_components.PresetComponents(preset_tools, preset_qubic, seed)[source]

Bases: object

Preset Components.

Instance to initialize the Components Map-Making. It defines the Foregrounds variables and methods.

Parameters:
  • seed_noise (int) – Seed for random CMB noise generation.

  • preset_tools (object) – Class containing tools and simulation parameters.

  • preset_qubic (object) – Class containing qubic operator and variables and methods.

params_cmb

Dictionary containing the parameters associated with CMB.

Type:

dict

params_foregrounds

Dictionary containing the parameters associated with foregrounds.

Type:

dict

seed

Seed for random CMB noise generation.

Type:

int

skyconfig

Dictionary containing the wanted sky configuration for PySM.

Type:

dict

components_model

List containing the FGBuster instance relative to the wanted components.

Type:

list

components_name

List containing the name of the components.

Type:

list

components

Components maps according to chosen model.

Type:

array_like

components_convolved

Convolved components maps.

Type:

array_like

components_iter

Initilize array on which we will iterate to reconstruct components maps.

Type:

array_like

nu_co

Frequency of the monochromatic emission, None if not chosen.

Type:

int

Methods

get_components(skyconfig)

Components maps.

get_sky_config(key)

Sky configuration.

give_cl_cmb([r, Alens])

\(C_{\ell}^{BB}\) CMB.

polarized_I(m, nside[, polarization_fraction])

Polarized intensity map.

get_components(skyconfig)[source]

Components maps.

Read configuration dictionary which contains every compoenent and their associated model. The CMB is randomly generated from a specific seed. Astrophysical foregrounds come from PySM 3.

Parameters:

skyconfig (dict) – Dictionary containing the configuration for each component.

Returns:

  • components (array_like) – Components maps according to chosen model.

  • components_convolved (array_like) – Convolved components maps.

  • components_iter (array_like) – Initilize array on which we will iterate to reconstruct components maps.

Raises:

TypeError – Raises if the chosen model does not exist.

get_sky_config(key)[source]

Sky configuration.

Method to define the sky model used by PySM3 to generate a fake sky.

Parameters:

key (str) – The key to access the specific parameters in the prest configuration. Can be either “in” or “out”.

Returns:

skyconfig – Dictionary containing the sky model configuration.

Return type:

dict

Example

sky = {‘cmb’: 42, ‘Dust’: ‘d0’}

give_cl_cmb(r=0, Alens=1.0)[source]

\(C_{\ell}^{BB}\) CMB.

Generates the CMB BB power spectrum with optional lensing and tensor contributions.

Parameters:
  • r (int, optional) – Tensor-to-scalar ratio, by default 0

  • Alens (float, optional) – Lensing amplitude, by default 1.0

Returns:

power_spectrum – CMB power spectrum according to r and Alens.

Return type:

array_like

polarized_I(m, nside, polarization_fraction=0)[source]

Polarized intensity map.

Calculates the polarized intensity map.

Parameters:
  • m (array_like) – Input map to be polarised

  • nside (int) – Nside parameter of the HEALPix map.

  • polarization_fraction (float, optional) – Fraction of polarization, by default 0

Returns:

p_map – Array containing the polarized intensity map with cosine and sine components.

Return type:

array_like