MapSim

class mapsims.MapSim(channels, nside, num=0, unit='uK_CMB', output_folder='output', tag='mapsim', output_filename_template='simonsobs_{telescope}{band}_nside{nside}.fits', pysm_components_string=None, pysm_output_reference_frame='C', pysm_custom_components=None, other_components=None, instrument_parameters=None)[source] [edit on github]

Bases: object

Run map based simulations

MapSim executes PySM for each of the input channels with a sky defined by default PySM components in pysm_components_string and custom components in pysm_custom_components and rotates in Alm space to the reference frame pysm_output_reference_frame. Then for each of the channels specified, smoothes the map with the channel beam and finally adds the map generated by other_components, for example noise maps, and writes the outputs to disk.

Parameters
channelsstring

all/SO for all channels, LA for all Large Aperture channels, SA for Small, otherwise a single channel label, e.g. LA_27 or a list of channel labels, or “027” for “LA_27” and “SA_27”

nsideint

output HEALPix Nside

unitstr

Unit of output maps

output_folderstr

Relative or absolute path to output folder, string template with {nside} and {tag} fields

numint

Realization number, generally used as seed, default is 0, automatically padded to 4 digits

tagstr

String to describe the current simulation, for example its content, which is used into string interpolation for output_folder and output_filename_template

output_filename_templatestr

String template with {telescope} {channel} {nside} {tag} fields

pysm_components_stringstr

Comma separated string of PySM components, i.e. “s1,d4,a2”

pysm_output_reference_framestr

The output of PySM is in Galactic coordinates, rotate to C for Equatorial or E for Ecliptic, set to None to apply no rotation

pysm_custom_componentsdict

Dictionary of other components executed through PySM

other_componentsdict

Dictionary of component name, component class pairs, the output of these are not rotated, they should already be in the same reference frame specified in pysm_output_reference_frame.

instrument_parametersHDF5 file path or str

Instrument parameters in HDF5 format, each channel tag is a group, each group has attributes band, center_frequency_GHz, fwhm_arcmin, bandpass_frequency_GHz, bandpass_weight

Methods Summary

execute(self[, write_outputs])

Run map simulations

Methods Documentation

execute(self, write_outputs=False)[source] [edit on github]

Run map simulations

Execute simulations for all channels and write to disk the maps, unless write_outputs is False, then return them.