Type Ia Supernova Light-curve fitting code
Project description
PISCOLA
Supernova light-curve fitting code in python
Although the main purpose of PISCOLA is to fit type Ia supernovae, it can be used to fit other types of supernovae or even other transients.
Read the full documentation at: piscola.readthedocs.io. See below for a summary. Check https://github.com/temuller/piscola_templates for spectral templates of different types of supernovae.
Installation
PISCOLA can be installed in the usual way, via pip:
pip install piscola
or from source:
git clone https://github.com/temuller/piscola.git
cd piscola
pip install .
If you are using a Mac with M1 or M2 chip and you encounter RuntimeError: This version of jaxlib was built using AVX instructions, which your CPU and/or operating system do not support. You may be able work around this issue by building jaxlib from source.
, try installing jax
from anaconda (as suggested here):
pip uninstall jax jaxlib
conda install -c conda-forge jaxlib
conda install -c conda-forge jax
Requirements
The requirements can be found in the requirements.txt
file.
Tests
To run the tests, go to the parent directory and run the following command:
pytest -v
Using PISCOLA
PISCOLA can fit the supernova light curves and correct them in a few lines of code:
sn = piscola.call_sn(<sn_file>)
sn.fit()
The light-curve parameters are saved in a dictionary and can be accessed directly:
sn.lc_parameters # dictionary
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. (2022). See below for the bibtex format:
@ARTICLE{2022MNRAS.512.3266M,
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 = {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 = 2022,
month = may,
volume = {512},
number = {3},
pages = {3266-3283},
doi = {10.1093/mnras/stab3065},
archivePrefix = {arXiv},
eprint = {2110.11340},
primaryClass = {astro-ph.HE},
adsurl = {https://ui.adsabs.harvard.edu/abs/2022MNRAS.512.3266M},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
Contributing and raising an issue
The recommended way is to use the issues page or send a pull request. Otherwise, you can contact me directly.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file piscola-2.0.1.tar.gz
.
File metadata
- Download URL: piscola-2.0.1.tar.gz
- Upload date:
- Size: 22.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9937065ae7a7d9312e41a56a2c623aa031fa40cc858f5ad45efbbe8b7fe09ae5 |
|
MD5 | 29a3febe6587f230f75edb4636e22986 |
|
BLAKE2b-256 | b6c6f78166300cca4dd66635e84ea6b2c0be8b480f71ab47d7cd40a68e7252ac |
File details
Details for the file piscola-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: piscola-2.0.1-py3-none-any.whl
- Upload date:
- Size: 22.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e53eb042552e95833cd8640c602588ef35832e1d8c2c32c7a53b20ed2dfdc8b |
|
MD5 | a9115c694d342bea3ce0ed33e06b7dad |
|
BLAKE2b-256 | 8f16a669df63cdef3ee53659a835ded09340b063a3a1450e94c6a31940662dc3 |