Getting started — so_pysm_models v0.4.dev231

so_pysm_models:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- so_pysm_models v0.4.dev231 »
- Getting started

# Getting started

## Installation

Requirements:

- PySM PySM

- healpy

Clone the repository:

    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(target_nside = 16)

Create a PySM sky and add this component:

    sky = pysm.Sky({})
    sky.add_component("gaussian_synch", gaussian_synch)

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

    m_synch = sky.gaussian_synch(2.3)

see example notebooks:

- Example Gaussian Synchrotron

- Example Gaussian Dust

- Example InterpolatingComponent

- Example Websky Extragalactic