Skip to main content

Type Ia Supernova Light-curve fitting code

Project description

PISCOLA: Python for Intelligent Supernova-COsmology Light-curve Analysis

Type Ia Supernova Light-curve fitting code in python

repo documentation status license ci Python Version PyPI Conda Version

Read the full documentation at: piscola.readthedocs.io. See below for a summary.


Installation

PISCOLA can be installed in the usual ways, via pip:

pip install piscola

or from source:

git clone https://github.com/temuller/piscola.git

cd piscola

pip install .

SFD dust maps

PISCOLA uses the dust maps from the sfddata repository. These can be downloaded and moved into the directory where PISCOLA looks for them by default, by using the download_dustmaps.py script included in this repository (this script relies on wget):

python download_dustmaps.py piscola

Recommended installation

Here is an easy way of installing and making PISCOLA work:

conda create -n pisco pip  # creates an environment called pisco with pip
conda activate pisco
pip install piscola
wget https://raw.githubusercontent.com/temuller/piscola/master/download_dustmaps.py
python download_dustmaps.py piscola

Using PISCOLA

PISCOLA can fit the supernova light curves and correct them in a few lines of code:

sn = piscola.call_sn(<sn_name>)

sn.normalize_data()
sn.fit_lcs()
sn.mangle_sed()
sn.calculate_lc_params()

or if you are OK with using the default parameters, you can do magic:

sn = piscola.call_sn(<sn_name>)
sn.do_magic()

You can find an example of input file in the data directory.

Citing PISCOLA

If you make use of PISCOLA in your projects, please cite Müller-Bravo et al. (2021). See below for the bibtex format:

@ARTICLE{2021MNRAS.tmp.2778M,
       author = {{M{\"u}ller-Bravo}, Tom{\'a}s E. and {Sullivan}, Mark and {Smith}, Mathew and {Frohmaier}, Chris and {Guti{\'e}rrez}, Claudia P. and {Wiseman}, Philip and {Zontou}, Zoe},
	title = "{PISCOLA: a data-driven transient light-curve fitter}",
      journal = {\mnras},
     keywords = {software: data analysis, supernovae: general, cosmology: observations, distance scale, Astrophysics - High Energy Astrophysical Phenomena, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Solar and Stellar Astrophysics},
	 year = 2021,
	month = oct,
	  doi = {10.1093/mnras/stab3065},
archivePrefix = {arXiv},
       eprint = {2110.11340},
 primaryClass = {astro-ph.HE},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2021MNRAS.tmp.2778M},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

Contributing and raising an issue

The recommended way is to use the issues page. Otherwise, you can contact me directly.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

piscola-0.1.7.tar.gz (11.1 MB view hashes)

Uploaded Source

Built Distribution

piscola-0.1.7-py3-none-any.whl (11.4 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page