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 inpysm_custom_components
and rotates in Alm space to the reference framepysm_output_reference_frame
. Then for each of the channels specified, smoothes the map with the channel beam and finally adds the map generated byother_components
, for example noise maps, and writes the outputs to disk.Parameters: - channels : str
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”
- nside : int
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
- unit : str
Unit of output maps
- output_folder : str
Relative or absolute path to output folder, string template with {nside} and {tag} fields
- num : int
Realization number, generally used as seed, default is 0, automatically padded to 4 digits
- nsplits : int
Number of noise splits, see the documentation of
SONoiseSimulator
- tag : str
String to describe the current simulation, for example its content, which is used into string interpolation for
output_folder
andoutput_filename_template
- output_filename_template : str
String template with {telescope} {channel} {nside} {tag} fields
- pysm_components_string : str
Comma separated string of PySM components, i.e. “s1,d4,a2”
- pysm_output_reference_frame : str
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_components : dict
Dictionary of other components executed through PySM
- other_components : dict
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_parameters : HDF5 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
(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.