<jupyter_start><jupyter_text>Model dataIn this tutorial we will inspect how the different models are defined in pysm3 and how you can inspect the templates.The notebook cell with all `import` statements is hidden, see the "Getting started" tutorial.<jupyter_code>import pysm3
import pysm3.units as u
import healpy as hp
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

import warnings
warnings.filterwarnings("ignore")
sky = pysm3.Sky(nside=128, preset_strings=["d1"])
sky.components[0].__class__
print(pysm3.models.dust.ModifiedBlackBody.__init__.__doc__)<jupyter_output>This function initializes the modified black body model.

        The initialization of this model consists of reading in emission
        templates from file, reading in spectral parameter maps from
        file.

        Parameters
        ----------
        map_I, map_Q, map_U: `pathlib.Path` object
            Paths to the maps to be used as I, Q, U templates.
        unit_* : string or Unit
            Unit string or Unit object for all input FITS maps, if None, the input file
            should have a unit defined in the FITS header.
        freq_ref_I, freq_ref_P: Quantity or string
            Reference frequencies at which the intensity and polarization
            templates are defined. They should be a astropy Quantity object
            or a string (e.g. "1500 MHz") compatible with GHz.
        map_mbb_index: `pathlib.Path` object or scalar value
            Path to the map to be used as the power law index for the dust
            opacity in a modified blackbody model, fo[...]<jupyter_text>Details of a model are defined in `presets.cfg` at https://github.com/healpy/pysm3/blob/main/pysm3/data/presets.cfg, for example:```[d1]class = "ModifiedBlackBody"map_I = "pysm_2/dust_t_new.fits"map_Q = "pysm_2/dust_q_new.fits"map_U = "pysm_2/dust_u_new.fits"unit_I = "uK_RJ"unit_Q = "uK_RJ"unit_U = "uK_RJ"map_mbb_index = "pysm_2/dust_beta.fits"map_mbb_temperature = "pysm_2/dust_temp.fits"unit_mbb_temperature = "K"freq_ref_I = "545 GHz"freq_ref_P = "353 GHz"```The filenames refer to another Github repository: https://github.com/healpy/pysm3-data/tree/master/pysm_2pysm3 3 automatically downloads and caches those data using the `astropy.utils.data` facilities. Therefore the first time you use `d1` it downloads all the templates and caches them in your home folder, next will load from there. Inspect model inputsModel templates are stored as attributes of the model class and can be inspected and even modified in place.<jupyter_code>dust = sky.components[0]
hp.mollview(dust.mbb_index, title="Dust spectral index", unit=dust.mbb_index.unit)
hp.mollview(dust.mbb_temperature, title="Dust temperature", unit=dust.mbb_temperature.unit)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07907979870596693, 'fraction_numerical': 0.012221423436376708, 'mean_word_length': 3.9607843137254903, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '260141', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 903, 'n_tokens_neox': 857, 'n_words': 293, 'path': 'docs/model_data.ipynb', 'repo_name': 'bthorne93/pysm', 'size': '2782'}