Sky¶
- class pysm3.Sky(nside=None, max_nside=None, preset_strings=None, component_config=None, component_objects=None, output_unit=Unit('uK_RJ'), map_dist=None)[source] [edit on github]¶
Bases:
Model
Sky is the main interface to PySM
Please read the ‘Best practices for model execution’ section in the documentation homepage before running PySM 3 models.
It accepts the configuration of the desired components in 3 different ways:
preset_strings
,component_config
orcomponent_objects
, see details below. Once a Sky object is created, all the sky components are initialized, i.e. loading the input templates. Then bandpass-integrated maps can be computed calling theget_emission
method. Check theapply_smoothing_and_coord_transform()
function for applying a beam and transform coordinates to the map arrays fromget_emission
. See the tutorials section of the documentation for examples.- Attributes:
- components: list(pysm.Model object)
List of
pysm.Model
objects.
Initialize Sky
- Parameters:
- nsideint
Requested output NSIDE, inputs will be degraded using
healpy.ud_grade()
- max_nside: int
Keeps track of the the maximum Nside this model is available at by default 512 like PySM 2 models
- preset_stringslist of str
List of strings identifiers for the models included in PySM 3, these are exactly the same models included in PySM 2, e.g.
["d2", "s1", "a1"]
, see the documentation for details about the available models.- component_configdict or TOML filename
Modify the configuration of one of the included components or create a new component based on a Python dictionary or a TOML filename, see for example the TOML configuration file for the
presets.cfg
file in thedata
folder of the package.- component_configlist of Model subclasses
List of component objects already initialized, typically subclasses of PySM.Model This is the most flexible way to provide a custom model to PySM
- output_unitastropy Unit or string
Astropy unit, e.g. “K_CMB”, “MJ/sr”
- map_dist: pysm.MapDistribution
Distribution object used for parallel computing with MPI
Methods Summary
add_component
(component)get_emission
(freq[, weights])This function returns the emission at a frequency, set of frequencies, or over a bandpass.
Methods Documentation
- add_component(component)[source] [edit on github]¶
- get_emission(freq, weights=None)[source] [edit on github]¶
This function returns the emission at a frequency, set of frequencies, or over a bandpass.