Metadata-Version: 2.4
Name: D47crunch
Version: 3.0.0a2
Summary: Standardization and analytical error propagation of Δ47 and Δ48 clumped-isotope measurements
Author: Mathieu Daëron
Author-email: Mathieu Daëron <mathieu@daeron.fr>
License-Expression: MIT
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: numpy>=1.21
Requires-Dist: scipy>=1.7.0
Requires-Dist: matplotlib>=3.4.2
Requires-Dist: lmfit>=1.0.2
Requires-Dist: typer>=0.17
Requires-Dist: rich
Requires-Dist: typing-extensions>=4.15.0
Requires-Dist: pymc>=6.0
Requires-Dist: coloraide>=8.10
Requires-Dist: sympy>=1.14.0
Requires-Python: >=3.12
Project-URL: Home, https://github.com/mdaeron/D47crunch
Project-URL: Documentation, https://mdaeron.github.io/D47crunch
Description-Content-Type: text/markdown

# D47crunch

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4314550.svg)](https://doi.org/10.5281/zenodo.4314550)
<!--[![PyPI Version](https://img.shields.io/pypi/v/D47crunch.svg)](https://pypi.python.org/pypi/D47crunch)-->
[![PyPI Version](https://img.shields.io/badge/pypi-3.0.0a2-orange)](https://pypi.python.org/pypi/D47crunch)
![License](https://img.shields.io/pypi/l/D47crunch)
[![docs](https://shields.io/badge/docs-D47crunch-success?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOTIiIGhlaWdodD0iMTkyIj48cGF0aCBkPSJNNjcuODA3IDIzLjI0NGMtMTguMDMyIDUuNTIzLTI0LjI3MyA5LjQxMS0zMy4xOTMgMTYuMTY5UzE5LjQwNyA1MS4xMjUgOS4zNCA2OS43NkMzLjI3IDgwLjk5Ni44MjcgOTkuMjcxIDEgMTExLjY3OWMuMTE0IDguMTY5IDIuMTg4IDEzLjU1OSAyLjE4OCAxMy41NTlTNDIuMzI2IDI0Ny4yNyAyMC40MzUgMjc4LjEwNWMtMTAuNDg4IDE0Ljc3MyA4NC40MjIgMjcuM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yNDggMTAuMTcxYy02Ljg3OCAxLjk3My05Ljk3NCAzLjM4OC0xNC44ODggMy42NnMtMTAuODY4LTEuODY5LTEwLjg2OC0xLjg2OWwtMi4zNDIgOC42MzNjMi4xOTcuOTQ0IDkuOTY5IDIuMzkgMTQuNzU2IDIuNTkyczE1LjU4Mi0yLjQ2IDE1LjU4Mi0yLjQ2bDI3LjQ3MS03LjUzNGMxLjk1MS00LjcwOSAzLjQzMi05LjIzOCA0LjUzNy0xMy4xOTN6IiBmaWxsPSIjZTc4MzYxIi8+PC9zdmc+)](https://mdaeron.github.io/D47crunch)

Python library for processing and standardizing carbonate clumped-isotope analyses, from low-level data out of a dual-inlet mass spectrometer to final, “absolute” Δ<sub>47</sub>, Δ<sub>48</sub> and  Δ<sub>49</sub> values with fully propagated analytical error estimates.

This also provides a command-line interface making it possible to process a multi-session Δ<sub>47</sub> (and potentially Δ<sub>48</sub>, Δ<sub>49</sub>) dataset by simply calling `D47crunch rawdata.csv`. See the [CLI documentation](https://mdaeron.github.io/D47crunch/#3-command-line-interface-cli) for more options.

> **Warning**
The upcoming version 3 of D47crunch will break backwards-compatibility. This is motivated by the need to accomodate different standardization approaches (least squares "pooled" standardization vs Bayesian standardization allowing for reference materials having nominal Δ4x values with non-zero uncertainties).

> **Note**
The new Bayesian standardization approach introduced in the upcoming version 3 of D47crunch works well, to the first order, but has not been extensively tested yet. To test this upcoming version without affecting your existing Python setup, use `uv` and start with the demo code available [here](https://github.com/mdaeron/D47crunch/tree/bayes/examples).

```sh
mkdir testD47crunch         # create new working directory
cd testD47crunch            # enter the working directory
uv init                     # initialize a new uv project
uv add D47crunch==3.0.0a2   # install the new version of D47crunch
uv run bayes-demo.py        # run the demo code
```



## Documentation

For the full API and a short tutorial, see [https://mdaeron.github.io/D47crunch].

[https://mdaeron.github.io/D47crunch]: https://mdaeron.github.io/D47crunch

## Installation

This should do the trick:

```bash
pip install D47crunch
```

Alternatively:

1. download the [dev branch] or the [latest release] and unzip it
2. rename the resulting directory to `D47crunch`
3. chose one of one of the following options:
	+ move the `D47crunch` directory to somewhere in your Python path
	+ move the `D47crunch` directory to your desired working directory
	+ move the `D47crunch` directory to any other location (e.g., `/foo/bar`) and include the following code snippet in your scripts:

```py
import sys
sys.path.append('/foo/bar')
```
Having done any of the above you should now be able to `import D47crunch`, with the following requirements: [Python 3], [numpy], [matplotlib], [scipy], [lmfit], and [typer].

[Python 3]: https://www.python.org
[numpy]: https://numpy.org
[lmfit]: https://lmfit.github.io
[matplotlib]: https://matplotlib.org
[scipy]: https://www.scipy.org
[typer]: https://typer.tiangolo.com
[dev branch]: https://github.com/mdaeron/D47crunch/archive/dev.zip
[latest release]: https://github.com/mdaeron/D47crunch/releases/latest

## Contact

All questions and suggestions are welcome and should be directed at [Mathieu Daëron](mailto:daeron@lsce.ipsl.fr?subject=[D47crunch]).

