pema 0.7.0
Peak matching for XENON simulations
Requires Python: >=3.9

# PEMA: Peak matching for clustering and classification
[![Test package](https://github.com/XENONnT/pema/actions/workflows/pytest.yml/badge.svg?branch=master)](https://github.com/XENONnT/pema/actions/workflows/pytest.yml)
[![CodeFactor](https://www.codefactor.io/repository/github/xenonnt/pema/badge)](https://www.codefactor.io/repository/github/xenonnt/pema)
[![Coverage Status](https://coveralls.io/repos/github/XENONnT/pema/badge.svg?branch=master)](https://coveralls.io/github/XENONnT/pema?branch=master)
[![Documentation Status](https://readthedocs.org/projects/pema/badge/?version=latest)](https://pema.readthedocs.io/en/latest/?badge=latest)

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5594916.svg)](https://doi.org/10.5281/zenodo.5594916)
[![PyPI version shields.io](https://img.shields.io/pypi/v/pema.svg)](https://pypi.python.org/pypi/pema/)
[![Python Versions](https://img.shields.io/pypi/pyversions/pema.svg)](https://pypi.python.org/pypi/pema)
[![PyPI downloads](https://img.shields.io/pypi/dm/pema.svg)](https://pypistats.org/packages/pema)

## PeakMatching
Peak clustering and classification validation using the WFsim


# Installation
To install `pema`, one can easily get the latest version via Pipy. For increased usability one needs some XENONnT credentials, see [this page](https://straxen.readthedocs.io/en/latest/setup.html).
```bash
pip install pema
```


## Test installation
```bash
python -c "import pema ; print(pema.__version__) ; print('great succes')
```


0.7.0 / 2024-01-15
------------------
* `np.float` is deprecated by @dachengx in https://github.com/XENONnT/pema/pull/341
* Update RTD configuration by @dachengx in https://github.com/XENONnT/pema/pull/342
* Move simulation context to wfsim by @dachengx in https://github.com/XENONnT/pema/pull/344

**Full Changelog**: https://github.com/XENONnT/pema/compare/v0.6.5...v0.7.0


0.6.5 / 2023-09-12
------------------
* Trying to fix touching_windows bug by @FaroutYLq in https://github.com/XENONnT/pema/pull/333


0.6.4 / 2022-10-18
------------------
* Add test for event matching customization by @JoranAngevaare in https://github.com/XENONnT/pema/pull/241
* Update ax by @JoranAngevaare in https://github.com/XENONnT/pema/pull/259

**Full Changelog**: https://github.com/XENONnT/pema/compare/v0.6.3...v0.6.4


0.6.3 / 2022-06-08
------------------
* allow kwargs to context by @JoranAngevaare in https://github.com/XENONnT/pema/pull/227
* Test notebooks by @JoranAngevaare in https://github.com/XENONnT/pema/pull/228
* Add plotting tweak by @JoranAngevaare in https://github.com/XENONnT/pema/pull/233
* Bump nbsphinx from 0.8.8 to 0.8.9 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/230
* Bump strax from 1.2.2 to 1.2.3 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/231
* Bump straxen from 1.7.1 to 1.8.1 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/232

**Full Changelog**: https://github.com/XENONnT/pema/compare/v0.6.2...v0.6.3


0.6.0 / 2022-05-30
------------------
* simplify matching - keep multiple columns and fix + test chunking artefacts by @JoranAngevaare in https://github.com/XENONnT/pema/pull/225

**Full Changelog**: https://github.com/XENONnT/pema/compare/v0.5.2...v0.6.0


0.5.0 / 2022-05-29
------------------
* Extend match_acceptance_extended with peak level info by @JoranAngevaare in https://github.com/XENONnT/pema/pull/224

**Full Changelog**: https://github.com/XENONnT/pema/compare/v0.4.4...v0.5.0


0.4.4 / 2022-05-29
------------------
* Update requirements by @JoranAngevaare in https://github.com/XENONnT/pema/pull/211
* Bump typing-extensions from 4.1.1 to 4.2.0 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/212
* Bump straxen from 1.6.1 to 1.6.2 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/214
* Bump straxen from 1.6.2 to 1.7.0 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/216
* Test with latest strax by @JoranAngevaare in https://github.com/XENONnT/pema/pull/217
* Bump straxen from 1.7.0 to 1.7.1 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/218
* Bump scipy from 1.8.0 to 1.8.1 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/219
* Update dependabot.yml by @JoranAngevaare in https://github.com/XENONnT/pema/pull/221
* cmt_version by @JoranAngevaare in https://github.com/XENONnT/pema/pull/222
* test with  wfsim pre release by @JoranAngevaare in https://github.com/XENONnT/pema/pull/223

**Full Changelog**: https://github.com/XENONnT/pema/compare/v0.4.3...v0.4.4


0.4.3 / 2022-04-12
------------------
* Bump utilix from 0.6.6 to 0.6.7 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/194
* Bump actions/checkout from 2 to 3 by @dependabot in https://github.com/XENONnT/pema/pull/193
* Bump xarray from 0.21.1 to 2022.3.0 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/192
* Bump straxen by @JoranAngevaare in https://github.com/XENONnT/pema/pull/195
* Bump uproot from 4.2.0 to 4.2.1 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/197
* Bump pytest from 7.0.1 to 7.1.0 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/198
* Bump uproot from 4.2.1 to 4.2.2 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/201
* Bump tqdm from 4.63.0 to 4.63.1 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/203
* Bump pytest from 7.1.0 to 7.1.1 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/200
* Bump dask from 2022.2.1 to 2022.3.0 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/199
* Bump sphinx from 4.4.0 to 4.5.0 in /extra_requirements by @dependabot in https://github.com/XENONnT/pema/pull/202
* remote dependabot by @JoranAngevaare in https://github.com/XENONnT/pema/pull/204
* WFSim bump by @JoranAngevaare in https://github.com/XENONnT/pema/pull/208
* Fix logger classes in pema by @JoranAngevaare in https://github.com/XENONnT/pema/pull/210

**Full Changelog**: https://github.com/XENONnT/pema/compare/v0.4.2...v0.4.3


0.4.2 / 2022-03-02
------------------
- ignore raises on testing (#189)
- Test with straxen v1.4.0 (#190)


0.4.1 / 2022-02-16
------------------
- Fix for new versions (#180)


0.4.0 / 2022-02-11
------------------
- Field usage updates (#173)
- Update docs requirements (#155)
- Bump straxen (#167)
- Only allow py>3.8 (#165)

Notes:
 - updates to peak matching based on S2s, lineages changes


0.3.6 / 2021-12-10
------------------
- Use raw_area_trigger for reconstruction bias (#123)
- add gitattributes, fix #132 (#133)
- test making docs (#137)
- Requirements (many)


0.3.5 / 2021-12-10
------------------
- Fix bias to #112 (#122)


0.3.4 / 2021-12-10
------------------
- Fix bias plots (#112)
- Bump WFSim (#121)
- Pin pymongo (#116)


0.3.3 / 2021-11-08
------------------
 - Add rr matrix (#96, #101)


0.3.2 / 2021-11-08
------------------
- Several tweaks to v0.3.1 (ec3f2821eab059c812db9fec2e723da6c5cbfc8e, 9d5bae41b91855041dc61717594da70cae5e8292, 437677c301003f4e9812420603390b8b3b93f27b, 437677c301003f4e9812420603390b8b3b93f27b)


0.3.1 / 2021-11-03
------------------
 - use overlap window for matching, include events (#86)


0.3.0 / 2021-10-24
------------------
 - New wfsim inst (#67)
 - Increase the coverage (#65, #66)
 - Make compatible with strax(en) -1.0.0rc (#44)


0.2.2 / 2021-08-10
------------------
 - Fix master for strax, straxen, wfsim == 0.16.1, 0.19.3, 0.5.6 (#23)
 - Fix docs requirements (#34, #32)
 - Create codeql-analysis.yml (#35)
 - Fix saving as SVG (#21)
 - Register from module (#22)
 - Less pinned requirements (#32)


0.2.1 / 2021-60-17
------------------
- Allow plot dump to pickle (#20)
- minor commits


0.2.0 / 2021-05-21
------------------
- Increased testing, faster matching (#17)
- Update notebooks to be more plug and play (#13)
- Use actions for testing (#15)


0.1.0 / 2021-04-10
--------------------
- Restructured code into plugins
- Arbitrary acceptance to allow for penalty factors
- Install CI:
  - CodeFactor
  - Coveralls
  - Automated documentation
  - Testing


0.0.1 / 2020-11-25
--------------------
- Further prepare the package and prepare for deployment

0.0.0 / 2020-11-23
--------------------
- Initial commits