Metadata-Version: 2.5
Name: linx-bbn
Version: 0.1.4
Summary: A fast, differentiable, and extensible Big Bang Nucleosynthesis package in JAX
Project-URL: Homepage, https://github.com/cgiovanetti/LINX
Project-URL: Documentation, https://linx.readthedocs.io
Project-URL: Issues, https://github.com/cgiovanetti/LINX/issues
Project-URL: Paper, https://arxiv.org/abs/2408.14538
Author: Cara Giovanetti, Mariangela Lisanti, Hongwan Liu, Siddharth Mishra-Sharma, Joshua T. Ruderman
License-Expression: MIT
License-File: LICENSE.txt
Keywords: BBN,big bang nucleosynthesis,cosmology,differentiable,jax
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.11
Requires-Dist: diffrax==0.7.1
Requires-Dist: equinox>=0.12.0
Requires-Dist: interpax>=0.3.1
Requires-Dist: jax>=0.4.38
Requires-Dist: jaxlib>=0.4.38
Requires-Dist: numpy>=2.0
Requires-Dist: optimistix==0.0.11
Description-Content-Type: text/markdown

<h1 align="center">
LINX<!-- omit from toc -->
</h1>

<h4 align="center">

[![License: MIT](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT)
[![arXiv](https://img.shields.io/badge/arXiv-2408.14538%20-green.svg)](https://arxiv.org/abs/2408.14538)
[![Run Tests](https://github.com/cgiovanetti/LINX/actions/workflows/test.yml/badge.svg)](https://github.com/cgiovanetti/LINX/actions/workflows/test.yml)
</h4>

Light Isotope Nucleosynthesis with JAX (LINX) is a fast, differentiable, extensible code that can be used to predict primordial light element abundances during Big Bang Nucleosynthesis (BBN).  LINX is written in python using JAX, and is readable, accessible, and well-documented.  Full documentation is available at [https://linx.readthedocs.io/en/latest/](https://linx.readthedocs.io/en/latest/).

## Contents<!-- omit from toc -->

- [Installation](#installation)
- [Repository structure](#repository-structure)
- [Issues](#issues)
- [Citation](#citation)
- [References](#references)
</center>

## Installation
It is strongly recommended that you create a clean conda environment with the latest python. All of the requirements are included in `requirements.txt`.  In summary, run
```
conda create --name linx
conda activate linx
pip install -r requirements.txt
```
(Include `path/to/requirements.txt` if you're in a different directory.)  This will install the minimum set of dependencies, with the latest versions of your packages available with your selected python version.

If you are running with python <= 3.10, or if you are willing to tolerate old JAX versions for **2x faster runtimes**, instead run 

```
conda create --name linx
conda activate linx
pip install -r requirements-fast.txt
python -m pip install --no-deps interpax==0.3.1
```

Finally, `requirements-other.txt` provides all auxiliary packages needed to run all notebooks and analyses in this repo.

## Repository structure

Modules of the code are contained in the `linx` directory, along with the various sets of BBN reaction rates that ship with LINX.   `example_notebooks` contains a set of pedagogical Jupyter noteboooks for users familiarizing themselves with LINX. `scripts` contains a suite of scripts for testing and using LINX.  Finally, `pytest` contains brief pytest scripts for continuous checking of this repository.


## Issues
Please feel free to open up an issue if you notice something is amiss in LINX.

## Citation
If you use LINX, we suggest you cite both LINX and the other public codes that provide a foundation for LINX: nudec_BSM (https://arxiv.org/abs/1812.05605, https://arxiv.org/pdf/2001.04466), PRIMAT (http://www2.iap.fr/users/pitrou/primat.htm), and PRyMordial (https://arxiv.org/abs/2307.07061).  

The suggested language for citation is "LINX [linx], which uses methods and tables from Refs. [nudecBSM1,nudecBSM2,PRIMAT,PRyM]".  All of these citations are included below.

```
@article{linx,
  title={{LINX}: A Fast, Differentiable, and Extensible Big Bang Nucleosynthesis Package}, 
  author = {Giovanetti, Cara and Lisanti, Mariangela and Liu, Hongwan and Mishra-Sharma, Siddharth and Ruderman, Joshua T.},
  journal = {Phys. Rev. D},
  volume = {112},
  issue = {6},
  pages = {063531},
  numpages = {33},
  year = {2025},
  month = {Sep},
  publisher = {American Physical Society},
  doi = {10.1103/f3tj-r882},
  url = {https://link.aps.org/doi/10.1103/f3tj-r882}
}

@article{nudecBSM1,
   title={Neutrino decoupling beyond the {S}tandard {M}odel: {CMB} constraints on the Dark Matter mass with a fast and precise {N}eff evaluation},
   volume={2019},
   ISSN={1475-7516},
   url={http://dx.doi.org/10.1088/1475-7516/2019/02/007},
   DOI={10.1088/1475-7516/2019/02/007},
   number={02},
   journal={Journal of Cosmology and Astroparticle Physics},
   publisher={IOP Publishing},
   author={Escudero, Miguel},
   year={2019},
   month=feb, pages={007–007} }

@article{nudecBSM2,
   title={Precision early universe thermodynamics made simple:{N}eff and neutrino decoupling in the {S}tandard {M}odel and beyond},
   volume={2020},
   ISSN={1475-7516},
   url={http://dx.doi.org/10.1088/1475-7516/2020/05/048},
   DOI={10.1088/1475-7516/2020/05/048},
   number={05},
   journal={Journal of Cosmology and Astroparticle Physics},
   publisher={IOP Publishing},
   author={Abenza, Miguel Escudero},
   year={2020},
   month=may, pages={048–048} }

@article{PRIMAT,
   title={Precision big bang nucleosynthesis with improved {H}elium-4 predictions},
   volume={754},
   ISSN={0370-1573},
   url={http://dx.doi.org/10.1016/j.physrep.2018.04.005},
   DOI={10.1016/j.physrep.2018.04.005},
   journal={Physics Reports},
   publisher={Elsevier BV},
   author={Pitrou, Cyril and Coc, Alain and Uzan, Jean-Philippe and Vangioni, Elisabeth},
   year={2018},
   month=sep, pages={1–66} }

@article{PRyM,
    author = "Burns, Anne-Katherine and Tait, Tim M. P. and Valli, Mauro",
    title = "{PRyMordial: the first three minutes, within and beyond the Standard Model}",
    eprint = "2307.07061",
    archivePrefix = "arXiv",
    primaryClass = "hep-ph",
    reportNumber = "UCI-HEP-TR-2023-07, YITP-SB-2023-16",
    doi = "10.1140/epjc/s10052-024-12442-0",
    journal = "Eur. Phys. J. C",
    volume = "84",
    number = "1", pages = "86",
    year = "2024" }
```

## References
A detailed reference outlining the structure and philosophy of LINX and including examples of how to use it with gradient-assisted methods is available at [https://arxiv.org/abs/2408.14538](https://arxiv.org/abs/2408.14538).

An example of an analysis that can be performed with LINX, where LINX is used with CLASS to perform an analysis with a joint CMB and BBN likelihood, is available at [https://arxiv.org/abs/2408.14531](https://arxiv.org/abs/2408.14531).
