Metadata-Version: 2.4
Name: easy_pues
Version: 0.1.0
Summary: An easy package for understanding emission spectroscopy.
Author-email: Christophe Van Neste <christophe.vanneste@plantentuinmeise.be>
License: MIT License
        
        Copyright (c) 2026 Botanic Garden Meise
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/AgentschapPlantentuinMeise/easy_pues
Project-URL: Source, https://github.com/AgentschapPlantentuinMeise/easy_pues
Project-URL: Issues, https://github.com/AgentschapPlantentuinMeise/easy_pues/issues
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pandas
Dynamic: license-file

### easy_pues
*A lightweight toolkit for processing, cleaning, and interpreting ICP-OES analytical data.*

easy_pues provides a set of convenience classes to streamline the workflow around ICP-OES data. It focuses on reading raw exports, cleaning and harmonizing element measurements, applying LOD/LOQ rules, and preparing results for downstream analysis or reporting.

The package is designed to be simple, predictable, and easy to integrate into existing Python data pipelines.

![Easy Pues Mascot](docs/images/easy_pues_mascot.png)

---

## 🌱 Features

- **Load Agilent 5800 result files** into tidy pandas DataFrames  
- **Automatic type conversion** (strings → floats, numeric cleanup, NA handling)  
- **LOD/LOQ masking**  
  - < LOD formatting  
  - > LOD formatting  
  - Optional flagging mode (*, **)  
- **Element-wise operations** with proper alignment of LOD/LOQ tables  
- **Helpers for MultiIndex structures**  
- **Utility functions** for common analytical workflows

---

## 📦 Installation

```bash
pip install easy_pues
```

Or install directly from GitHub:

```bash
pip install git+https://github.com/AgentschapPlantentuinMeise/easy_pues
```

---

## 🚀 Quick Start

```python
import easy_pues as ep
import pandas as pd

# Load results and LOD/LOQ tables
project = ep.ICPOES("results.csv")

# Apply masking
masked = project.apply_lod_loq_mask(project.results, project.lodq)

# Or apply flagging instead
flagged = project.apply_lod_loq_flags(project.results, project.lodq, flag = True)
```

---

## 🔬 LOD/LOQ Handling

easy_pues implements the standard interpretation rules:

| Condition | Output (mask mode) | Output (flag mode) |  
|----------|---------------------|---------------------|  
| value < LOD | < LOD | value* |  
| LOD ≤ value < LOQ | > LOD | value** |  
| value ≥ LOQ | numeric | numeric |

All operations are vectorized and align element names automatically.

---

## 📁 Typical Workflow

1. Export raw ICPOES data  
2. Load into Python using easy_pues  
3. Clean and harmonize element columns  
4. Apply LOD/LOQ rules  
5. Export masked or flagged results

## Disclaimer

Developed together with Copilot AI
