class pysm3.Sky(nside=None, preset_strings=None, component_config=None, component_objects=None, output_unit=Unit('uK_RJ'), map_dist=None)[source] [edit on github]

Bases: pysm3.Model

Sky is the main interface to PySM

It accepts the configuration of the desired components in 3 different ways: preset_strings, component_config or component_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 the get_emission method. Check the apply_smoothing_and_coord_transform() function for applying a beam and transform coordinates to the map arrays from get_emission. See the tutorials section of the documentation for examples.

components: list(pysm.Model object)

List of pysm.Model objects.

Initialize Sky


Requested output NSIDE, inputs will be degraded using healpy.ud_grade()

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`_

.. _presets:
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


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.