Package: pypetal
pyPETaL: A Pipeline for Estimating AGN Time LagspyPETaL 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.InstallationpyPetalpyPetal is available on PyPI and can be installed with pip:pip install pypetalOr, 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 thatgfortranis installed). To install PLIKE, run the following command:sh build_plike.shDetrendingpyPetal offers the option to detrend the input light curves via theLinMixalgorithm. 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 withpoetry:poetry install --with extraMICA2pyPetal also offersMICA2as an optional module. This package is more complex to install than the others - to find out more, read theMICA2 installation guide.poetrycan help to install some easily-installable python dependencies for MICA2:poetry install --with extraThe 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 assumerun_mica2=False.pyPetal and JAVELINThe 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 bypiporsetup.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-javOr, 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 installNumPybefore installing pyPetal-jav throughpiporsetup.py. This is becauseJAVELINrequiresNumPyin order to be installed. This can be done with:pip install numpyCiting pyPetalTo cite the pyPetal code itself, use theASCL reference:Stone Z., 2024, version xxxx, Astrophysics Source Code Library, record ascl:2401.004Cit the paper pyPetal was used in:Shen et al. (2023)