cobi.simulation.Noise

class Noise(nside, fsky, telescope, sim='NC', atm_noise=False, nsplits=2, aso=False, verbose=True)[source]

Instrumental noise simulator for Simons Observatory telescopes.

This class generates realistic noise realizations for SO LAT and SAT observations based on the v3.1.1 noise models. Supports white noise, atmospheric/1f noise, and correlated noise between detector pairs within the same optical tube.

Parameters:
  • nside (int) – HEALPix resolution parameter.

  • fsky (float) – Sky fraction for noise power calculation (0 < fsky ≤ 1).

  • telescope ({'LAT', 'SAT'}) – Telescope identifier (Large Aperture or Small Aperture).

  • sim ({'NC', 'TOD'}, default 'NC') – Simulation type: - ‘NC’: Noise curves from SO models (analytic) - ‘TOD’: Time-ordered data based simulations (uses SO products)

  • atm_noise (bool, default False) – Include atmospheric and 1/f noise components.

  • nsplits (int, default 2) – Number of data splits (for split-based null tests).

  • verbose (bool, default True) – Enable logging output.

  • aso (bool)

nside

HEALPix resolution.

Type:

int

lmax

Maximum multipole (3*nside - 1).

Type:

int

sensitivity_mode

SO sensitivity mode (2 = baseline).

Type:

int

atm_noise

Whether atmospheric noise is included.

Type:

bool

Nell

Noise power spectra for each frequency and cross-frequency.

Type:

dict

telescope

Telescope identifier.

Type:

str

get_map(idx, freqs, fwhm, tube)

Generate noise map realization for given configuration.

get_spectra(idx, freqs, fwhm, tube)

Get noise power spectra for given configuration.

Examples

LAT baseline noise with atmosphere:

noise = Noise(
    nside=512,
    fsky=0.4,
    telescope='LAT',
    sim='NC',
    atm_noise=True,
    nsplits=2
)

# Generate noise for 6 LAT frequencies
freqs = np.array([27, 39, 93, 145, 225, 280])
fwhm = np.array([7.4, 5.1, 2.2, 1.4, 1.0, 0.9])
tube = np.array([0, 0, 1, 1, 2, 2])

noise_maps = noise.get_map(idx=0, freqs=freqs, fwhm=fwhm, tube=tube)

SAT white noise only:

noise_sat = Noise(
    nside=512,
    fsky=0.1,
    telescope='SAT',
    sim='NC',
    atm_noise=False
)

freqs = np.array([27, 39, 93, 145, 225, 280])
noise_maps = noise_sat.get_map(idx=0, freqs=freqs, fwhm=None, tube=None)

Notes

  • Uses SO v3.1.1 noise models (baseline sensitivity)

  • Correlated noise between frequency pairs in same tube

  • Supports independent realizations via idx parameter

  • MPI-aware for parallel generation

  • Output in μK_CMB units

__init__(nside, fsky, telescope, sim='NC', atm_noise=False, nsplits=2, aso=False, verbose=True)[source]

Initializes the Noise class for generating noise maps with or without atmospheric noise.

Parameters: nside (int): HEALPix resolution parameter. atm_noise (bool, optional): If True, includes atmospheric noise. Defaults to False. nhits (bool, optional): If True, includes hit count map. Defaults to False. nsplits (int, optional): Number of data splits to consider. Defaults to 2.

Parameters:
Return type:

None

Methods

__init__(nside, fsky, telescope[, sim, ...])

Initializes the Noise class for generating noise maps with or without atmospheric noise.

atm_noise_maps(split, idx)

Generates atmospheric noise maps using Cholesky decomposition.

atm_noise_maps_freq(idx, freq)

Generates atmospheric noise maps using Cholesky decomposition.

noiseQU([idx])

Generates Q and U polarization noise maps based on the noise model.

noiseQU_NC(idx)

Generates Q and U polarization noise maps based on the noise model.

noiseQU_NC_freq(idx, freq)

Generates Q and U polarization noise maps for a specific frequency band.

noiseQU_TOD(idx)

noiseQU_TOD_freq(idx, freq)

noiseQU_TOD_lat(idx)

noiseQU_TOD_lat_band(idx, freq)

noiseQU_TOD_sat(idx)

noiseQU_TOD_sat_band(idx, freq)

noiseQU_freq(idx, freq)

Generates Q and U polarization noise maps for a specific frequency band.

white_noise_maps()

white_noise_maps_freq(freq)

Generates white noise maps for a specific frequency band.

Attributes

cholesky_matrix_elements

Computes the Cholesky matrix elements for the noise model.

rand_alm

Generates random spherical harmonic coefficients (alm) with a specified power spectrum.

__init__(nside, fsky, telescope, sim='NC', atm_noise=False, nsplits=2, aso=False, verbose=True)[source]

Initializes the Noise class for generating noise maps with or without atmospheric noise.

Parameters: nside (int): HEALPix resolution parameter. atm_noise (bool, optional): If True, includes atmospheric noise. Defaults to False. nhits (bool, optional): If True, includes hit count map. Defaults to False. nsplits (int, optional): Number of data splits to consider. Defaults to 2.

Parameters:
Return type:

None

property rand_alm: numpy.ndarray

Generates random spherical harmonic coefficients (alm) with a specified power spectrum.

Returns: np.ndarray: A complex array of spherical harmonic coefficients.

property cholesky_matrix_elements: Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray]

Computes the Cholesky matrix elements for the noise model.

Returns: Tuple of nine np.ndarray elements representing the Cholesky matrix components.

white_noise_maps()[source]
Return type:

numpy.ndarray

white_noise_maps_freq(freq)[source]

Generates white noise maps for a specific frequency band.

Returns: np.ndarray: An array of white noise maps for the specified frequency band.

Parameters:

freq (str)

Return type:

numpy.ndarray

atm_noise_maps_freq(idx, freq)[source]

Generates atmospheric noise maps using Cholesky decomposition.

Returns: np.ndarray: An array of atmospheric noise maps for different frequency bands.

Parameters:
Return type:

numpy.ndarray

atm_noise_maps(split, idx)[source]

Generates atmospheric noise maps using Cholesky decomposition.

Returns: np.ndarray: An array of atmospheric noise maps for different frequency bands.

Return type:

numpy.ndarray

noiseQU_NC(idx)[source]

Generates Q and U polarization noise maps based on the noise model.

Returns: np.ndarray: An array of Q and U noise maps.

Return type:

numpy.ndarray

noiseQU_NC_freq(idx, freq)[source]

Generates Q and U polarization noise maps for a specific frequency band.

Returns: np.ndarray: An array of Q and U noise maps for the specified frequency band.

Parameters:
Return type:

numpy.ndarray

noiseQU_TOD_sat(idx)[source]
Parameters:

idx (int)

Return type:

numpy.ndarray

noiseQU_TOD_lat(idx)[source]
Parameters:

idx (int)

Return type:

numpy.ndarray

noiseQU_TOD_sat_band(idx, freq)[source]
Parameters:
Return type:

numpy.ndarray

noiseQU_TOD_lat_band(idx, freq)[source]
Parameters:
Return type:

numpy.ndarray

noiseQU_TOD(idx)[source]
Parameters:

idx (int)

Return type:

numpy.ndarray

noiseQU_TOD_freq(idx, freq)[source]
Parameters:
Return type:

numpy.ndarray

noiseQU(idx=None)[source]

Generates Q and U polarization noise maps based on the noise model.

Returns: np.ndarray: An array of Q and U noise maps.

Parameters:

idx (int | None)

Return type:

numpy.ndarray

noiseQU_freq(idx, freq)[source]

Generates Q and U polarization noise maps for a specific frequency band.

Returns: np.ndarray: An array of Q and U noise maps for the specified frequency band.

Parameters:
Return type:

numpy.ndarray