MapSim

class mapsims.MapSim(channels, nside=None, num=0, nsplits=1, unit='uK_CMB', output_folder='output', tag='mapsim', output_filename_template='simonsobs_{tag}_{telescope}_{band}_nside{nside}_{split}_of_{nsplits}.fits', pysm_components_string=None, pysm_output_reference_frame='C', pysm_custom_components=None, other_components=None, instrument_parameters='simonsobs_instrument_parameters_2020.06')[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
channelsstr

If “all”, all channels are included. Otherwise a list of channel tags: LT1_UHF1 and LT0_UHF1 = “LT1_UHF1,LT0_UHF1” Otherwise, provide a string with: * a key, e.g. tube or telescope * : * comma separated list of desider values e.g. all SAT channels = “telescope:SA” LT1 and LT2 tubes = “tube:LT1,LT2”

nsideint

output HEALPix Nside, if None, automatically pick the default resolution of the first channel, see https://github.com/simonsobs/mapsims/tree/master/mapsims/data/so_default_resolution.csv

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

nsplitsint

Number of noise splits, see the documentation of SONoiseSimulator

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

A string (without .h5 extension) specifies an instrument parameters file included in the package data/ folder A path or a string containing a path to an externally provided HDF5 file with the expected format. By default the latest Simons Observatory parameters 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([write_outputs])

Run map simulations

Methods Documentation

execute(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.