Skip to main content

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.

repo documentation status license Build and Tests Coverage Python Version PyPI ADS -  2022MNRAS.512.3266M

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.

Metadata

Release files for piscola 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for piscola 3.1.0
File Size Uploaded
piscola-3.1.0.tar.gz 1.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for piscola 3.1.0
File Interpreter ABI Platform
piscola-3.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.0 MB

Release files / piscola-3.1.0.tar.gz

Download URL piscola-3.1.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
eee513e33ca3547c6af282b438f3c87d5ece5ca9f2c59e372c7768e0a818ffcf
BLAKE2b-256 checksum
How to use checksums
3d64a8a8895a4dbb931dcc9a3fb28e66957edf7dbaea4779cb1d9652203f7217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.0

Release files / piscola-3.1.0-py3-none-any.whl

Download URL piscola-3.1.0-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
60e88c6b75c7968f5f8f3beeb142b33464991ee270d0802f031fd769bf19d575
BLAKE2b-256 checksum
How to use checksums
2d3cedf80a3c0690d91eeb3ab175a864ca2a53ab591a0221aa0735ee92de0ed8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.0

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page