API Reference#

Main functions#

sbm.c2d(cl[, ell_start])

The function to convert \(C_{l}\) to \(D_{l}\) i.e.

sbm.d2c(dl[, ell_start])

The function to convert \(D_{l}\) to \(C_{l}\) i.e.

sbm.elliptical_beam(nside, fwhm, q)

Calculate elliptical beam profile.

sbm.forecast(cl_syst[, n_el, fsky, lmax, ...])

This function estimates the bias on the tensor-to-scalar ratio due to pointing systematics This function based on the paper: https://academic.oup.com/ptep/article/2023/4/042F01/6835420, P88, Sec.

sbm.generate_cmb(nside[, r, cmb_seed])

This function generates the CMB map used in the map base simulation of litebird_sim.

sbm.generate_maps(mbs, config[, lock])

Generate the maps with the lock file

sbm.get_cmap()

This function generates color scheme which is often used Planck paper.

sbm.get_instrument_table(imo[, imo_version])

This function generates DataFrame which is used for FGBuster as instrument from IMo.

sbm.load_fiducial_cl(r[, lmax])

This function loads the fiducial CMB power spectrum used in the map base simulation of litebird_sim.

sbm.read_scanfiled(file_path)

Read the scan fields data of a detector from a HDF5 file

sbm.sim_bandpass_mismatch(config, syst, ...)

Simulate the bandpass mismatch systematics.

sbm.sim_diff_gain_per_ch(config, syst, mbsparams)

Simulate the differential gain systematics for each channel The map-making is performed for each detector in the channel

sbm.sim_diff_pointing_per_ch(config, syst, ...)

Simulate the differential pointing systematics for each channel The map-making is performed for each detector in the channel

sbm.sim_noise_per_ch(config, syst)

Simulate the noise for each channel

Classes#

sbm.Configlation(imo, channel)

Configuration class for the simulation.

sbm.Convolver(alm, nside, spin_k[, use_hwp])

Convolver class for spin map convolution

sbm.Field(field, spin_n, spin_m)

Class to store the field data of detectors

sbm.ScanFields()

Class to store the scan fields data of detectors

sbm.SignalFields(*fields)

Class to store the signal fields data of detectors

sbm.Systematics()

Systematics class for the simulation

Methods#

sbm.Convolver.get_blk(k)

Calculate \(b_{lk}\) values for convolution integrals.

sbm.Convolver.get_clm(blk, k)

Calculate spherical harmonic expansion coefficients for spin k maps.

sbm.Convolver.to_spin()

Convert \(E\) and \(B\) convention to spin convention.

sbm.Field.conj()

Get the complex conjugate of the field

sbm.ScanFields.create_covmat(spin_n_basis, ...)

Get the covariance matrix of the detector in mdim`x`mdim matrix form

sbm.ScanFields.generate_noise(spin_n_basis, ...)

Generate observed noise map with the noise PDF.

sbm.ScanFields.generate_noise_pdf([imo, ...])

Generate probability density function (PDF) of the noise.

sbm.ScanFields.get_xlink(spin_n, spin_m)

Get the cross-link of the detector for a given spin number

sbm.ScanFields.initialize(mdim)

Initialize the scan fields data

sbm.ScanFields.load_channel(channel[, ...])

Load the scan fields data of a channel from the directory containing the HDF5 files

sbm.ScanFields.load_det(det_name[, base_path])

Load the scan fields data of a detector from a HDF5 file

sbm.ScanFields.load_full_FPU(channel_list[, ...])

Load the scan fields data of all the channels in the FPU from the directory containing the HDF5 files

sbm.ScanFields.load_hdf5(file_path)

Load the scan fields data of a detector from a HDF5 file

sbm.ScanFields.map_make(signal_fields[, ...])

Get the output map by solving the linear equation \(Ax=b\) This operation gives us an equivalent result of the simple binning map-making approach.

sbm.ScanFields.t2b()

Transform Top detector cross-link to Bottom detector cross-link It assume top and bottom detector make a orthogonal pair.

sbm.SignalFields.abs_pointing_field(...)

Get the absolute pointing field of the detector

sbm.SignalFields.bandpass_mismatch_field(...)

Get the bandpass mismatch field of the detector The formalism is based on the paper by Duc Thuong Hoang et al., 2017, JCAP, DOI: 10.1088/1475-7516/2017/12/015, Sec.

sbm.SignalFields.build_linear_system(fields)

Build the information to solve the linear system of map-making This method has to be called before ScanFields.map_make() method.

sbm.SignalFields.circular_pointing_field(...)

Get the absolute pointing field of the detector

sbm.SignalFields.diff_gain_field(scan_field, ...)

Get the differential gain field of the detector

sbm.SignalFields.diff_pointing_field(...)

Get the differential pointing field of the detector

sbm.SignalFields.elliptical_beam_field(...)

Get the elliptical beam convolved field

sbm.SignalFields.extract_iqu()

Extract I, Q and U maps from the signal fields

sbm.SignalFields.get_coupled_field(...[, ...])

Multiply the scan fields and signal fields to get the detected fields by given cross-linking

sbm.SignalFields.get_field(spin_n, spin_m)

Get the field of the given spin moment

sbm.SignalFields.hwp_ip_field(scan_field, ...)

Get the HWP instrumental polarization field of the detector

sbm.Systematics.set_bandpass_mismatch(detectors)