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_numint

integer specifying which sim iteration to use

input_unitsstring

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

input_reference_frequency_GHzfloat

If input units are K_RJ or Jysr, the reference frequency

nsideint

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

shapetuple of ints

shape of ndmap array (see pixell.enmap)

wcsstr

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

lensedbool

Whether to load lensed or unlensed sims

aberratedbool

Whether to load aberrated or unaberrated sims

polbool

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

cmb_setint

Integer specifying which set of sims to use

cmb_dirpath

Override the default lensed alm directory path

nfreqsint

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.