Skip to main content

pyPETaL: A Pipeline for Estimating AGN Time Lags

Documentation Status pre-commit Workflow Status License codecov

pypi-ver python-ver pypi-downloads

ascl:2401.004

pyPETaL is a time-series data analysis pipeline for AGN reverberation mapping (RM) data. It combines multiple different popular softwares using for AGN RM analysis, including PyCCF, PyZDCF, JAVELIN, and PyROA. This pipeline also implements outlier rejection using Damped Random Walk Gaussian proces fitting, and detrending through the LinMix algorithm. pyPetal implements a weighting scheme (for all modules) in order to mitigate aliasing in peaks of time lag distributions between light curves.

pyPetal is very flexible, with almost every argument for each module allowing user input. pyPetal is designed to work with any combination of modules being run, allowing it to scale from the simplest to the most complex of projects.

Installation

pyPetal

pyPetal is available on PyPI and can be installed with pip:

    pip install pypetal

Or, if you want to install the latest development version:

    git clone https://github.com/Zstone19/pypetal.git
    cd pypetal
    pip install .

PLIKE is an optional algorithm that is used in pyPetal. There is a script available in the main directory to install and compile PLIKE (assuming that gfortran is installed). To install PLIKE, run the following command:

    sh build_plike.sh

Detrending

pyPetal offers the option to detrend the input light curves via the LinMix algorithm. This package is not offered in the base version of pyPetal, but can be installed with pip:

    pip install "linmix @ git+https://github.com/jmeyers314/linmix.git"

Or with poetry:

    poetry install --with extra

MICA2

pyPetal also offers MICA2 as an optional module. This package is more complex to install than the others - to find out more, read the MICA2 installation guide.

poetry can help to install some easily-installable python dependencies for MICA2:

    poetry install --with extra

The functionality and inputs of the MICA2 module are identical to the original software, so the best way to learn how this module functions is to read the MICA2 documentation.

NOTE: Seeing as this is an optional module, pyPetal will still compile and run if MICA2's dependencies are not installed. Each pyPetal run will assume run_mica2=False.

pyPetal and JAVELIN

The JAVELIN software used in pyPetal runs on Python 2, though the bulk of pyPetal software relies on Python >=3.8. To circumvent this issue, pyPetal has a JAVELIN "module" (pypetal-jav) that can be installed as a separate package and used in conjunction with pyPetal, in a Python 2 environment.

External requirements (not installed by pip or setup.py):

    A Fortran compiler (>F90)

pyPetal-jav is available on PyPI and can be installed with pip:

    pip install --no-deps pypetal-jav
    pip install pypetal-jav

Or, if you want to install the latest development version:

    git clone https://github.com/Zstone19/pypetal-jav.git
    cd pypetal-jav
    pip install .

NOTE: The user may need to install NumPy before installing pyPetal-jav through pip or setup.py. This is because JAVELIN requires NumPy in order to be installed. This can be done with:

    pip install numpy

Citing pyPetal

To cite the pyPetal code itself, use the ASCL reference:

    Stone Z., 2024, version xxxx, Astrophysics Source Code Library, record ascl:2401.004

Cit the paper pyPetal was used in: Shen et al. (2023)

Metadata

Release files for pypetal 1.0.1

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

Source distribution (sdist)

Source distribution for pypetal 1.0.1
File Size Uploaded Provenance Actions
pypetal-1.0.1.tar.gz 69.3 kB Without provenance Details for pypetal-1.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 147.5 kB

Release files / pypetal-1.0.1.tar.gz

Download URL pypetal-1.0.1.tar.gz
Size 69.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f9de7c22f700578ac5ddc213eb7cc8d7d72336eec5b544b7f455bf6866d69820
BLAKE2b-256 checksum
How to use checksums
2c7ed7fc5a7dd39a87a73be91379816a9a548265cf90b7206e3fdff2fdf07073
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.8.8 Linux/4.18.0-477.27.2.el8_8.x86_64

Release files / pypetal-1.0.1-py3-none-any.whl

Download URL pypetal-1.0.1-py3-none-any.whl
Size 78.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f99b59ebf7a22ac6e0c34b2307e5cfa7d24cc7034522fc47a3cbd9e240b59dea
BLAKE2b-256 checksum
How to use checksums
6d6d7a4e678ecb4873a70be89f78dbdfb997c2239c79cb427519ff8a90989ab3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.8.8 Linux/4.18.0-477.27.2.el8_8.x86_64

Security for pypetal 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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