Metadata-Version: 2.4
Name: treat2p
Version: 0.1.11
Summary: Treatment pipeline for suite2p extracted fluorescent traces over time.
Project-URL: repository, https://gitlab.pasteur.fr/haisslab/analysis-packages/treat2p
Project-URL: pypi, https://pypi.org/project/treat2p/
Project-URL: documentation, https://haisslab.pages.pasteur.fr/analysis-packages/treat2p/
Author-email: Timothe Jost-Mousseau <timothe.jost-mousseau@pasteur.fr>
License: MIT
Requires-Python: <3.15,>=3.8
Requires-Dist: joblib>=1.1
Requires-Dist: numpy>=1.23
Requires-Dist: scipy>=1.9
Requires-Dist: tqdm>=4.67.3
Description-Content-Type: text/markdown

# [Treat2p](https://haisslab.pages.pasteur.fr/analysis-packages/treat2p/)

Made to be used with [suite2p](https://pypi.org/project/suite2p/), to extend it's capabilities with treatment ones, on top of the nice roi signal extraction features of suite2p.

**Made after the matlab developments of Pierre [Pierre Marie Gardères](https://www.linkedin.com/in/pierre-marie-gard%C3%A8res-065ab5246/)**

## Getting started

To install this package, you simply need to hop into your own virtual environment and run :

```
pip install treat2p
```
or 
```
uv add treat2p
```

## How to use :

In short, to treat some plane/channel data that suite2p extracted already:

```python
import treat2p
suite2p_path = r"C:\Users\yourname\Desktop\suite2p"
outputs, stats, ops = treat2p.run_treat2p(suite2p_path, plane = 0, chan = 1)
```

``run_treat2p`` takes all the arguments that goes into the various stages of the pipeline, registers, them, and stores them in the ``ops.npy`` file under the `treat2p` key. 

- [neuropil factor](https://haisslab.pages.pasteur.fr/analysis-packages/treat2p/neuropil_factor/#treat2p.calculations.neuropil_factor_ARDSIP) estimation (and correction)
- [slow trend](https://haisslab.pages.pasteur.fr/analysis-packages/treat2p/neuropil_factor/#treat2p.calculations.neuropil_factor_ARDSIP) estimation (and correction)
    - [deltaF/F0 normalization](https://haisslab.pages.pasteur.fr/analysis-packages/treat2p/normalization/#treat2p.normalisation.delta_over_F) normalisation or
    - ["mean centered"](https://haisslab.pages.pasteur.fr/analysis-packages/treat2p/normalization/#treat2p.normalisation.center_normalize) normalization

For a bit more explanations, please see the jupyter notebook tutorial [here](https://gitlab.pasteur.fr/haisslab/analysis-packages/treat2p/-/blob/main/notebooks/treat2p_tuto.ipynb).