SOPrecomputedCMB

class mapsims.SOPrecomputedCMB(iteration_num, nside=None, shape=None, wcs=None, lensed=True, aberrated=False, has_polarization=True, cmb_set=0, cmb_dir=None, input_units='uK_RJ', input_reference_frequency_GHz=None, pixel_indices=None)[source] [edit on github]

Bases: so_pysm_models.PrecomputedAlms

Return a CMB map from stored alm’s. This can be in HEALPix format (if nside is specified) or rectangular pixel format (if wcs and shape are specified). The lensed alm’s are pre-stored. If rectangular, it returns a stack of enmaps of shape (nfreqs, ncomp, ny, nx). If HEALPix, it will return a numpy array of shape (nfreqs, ncomp, npix)

Parameters:
iteration_num : int

integer specifying which sim iteration to use

input_units : string

Input unit strings as defined by pysm.convert_units, e.g. K_CMB, uK_RJ, MJysr

input_reference_frequency_GHz : float

If input units are K_RJ or Jysr, the reference frequency

nside : int

nside of healpix map to project alms to. If None, uses rectangular pixel geometry specified through shape and wcs.

shape : tuple of ints

shape of ndmap array (see pixell.enmap)

wcs : str

World Coordinate System for geometry of map (see pixell.enmap)

lensed : bool

Whether to load lensed or unlensed sims

aberrated : bool

Whether to load aberrated or unaberrated sims

pol : bool

If True, return ncomp=3 I,Q,U components, else just ncomp=1 I

cmb_set : int

Integer specifying which set of sims to use

cmb_dir : path

Override the default lensed alm directory path

nfreqs : int

Number of copies of the CMB sky to provide. When modulation is implemented, this argument will be changed to a frequency bandpass specification that applies frequency-dependent modulation to the sims.

Returns:
output

(nfreqs,ncomp,npix) HEALPix numpy array if nside is specified, else returns (nfreqs,ncomp,Ny,Nx) rectangular pixel ndmap.