Getting started

Installation

Requirements:

  • PySM 3 PySM

  • healpy

Install with pip from Github:

pip install https://github.com/simonsobs/so_pysm_models/archive/master.zip

Development installation

Clone from Github and install:

git clone https://github.com/simonsobs/so_pysm_models
cd so_pysm_models
pip install -e .

Run unit tests:

python setup.py test -V

Build docs:

python setup.py build_docs -w

Example Usage

This repository implements new models for PySM that can be added as additional components.

For example, create and configure a component:

from so_pysm_models import GaussianSynchrotron
synchrotron = GaussianSynchrotron(nside = 16)

Create a PySM sky and add this component:

sky = pysm.Sky(nside=64, component_objects=[synchrotron])

Then get a map at a specific frequency in GHz with standard PySM functionalities:

import astropy.units as u
m_synch = sky.get_emission(2.3 * u.GHz)

see example notebooks: