View on GitHub

sncosmo

A Python Library for Supernova Cosmology

SNCosmo is a Python library for simulating, fitting and typing supernova light curves, built on NumPy, SciPy and AstroPy.

Example

Generate observed photometric data from a light curve model:

>>> import sncosmo
>>> model = sncosmo.Model(source='salt2')
>>> model.set(x0=1.e-7, x1=0.5, c=0.05, z=1.0, t0=55100.)
>>> model.bandmag('sdssr', 'ab', times=[55075., 55100., 55140.])
array([ 27.1180182 ,  25.68243714,  28.28456537])

Install

Assuming you have already installed the astropy package:

$ pip install sncosmo

The documentation contains more details on installing and using the package.

To report bugs and request features, please use the issue tracker. To contact me directly, please use kylebarbary [at] gmail dot com.

We welcome comments and contributions. To follow the development and get a copy of the latest development code, visit the GitHub repository page.