Metadata-Version: 2.4
Name: benanalysis
Version: 4.1.3
Summary: Bentham Spectral Analysis and Calibration Utilities Library
Home-page: https://github.com/BenthamInstruments/BenAnalysis
Author: Bentham Instruments Ltd
Author-email: support@bentham.com
Description-Content-Type: text/markdown
Requires-Dist: numpy
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: summary

benanalysis
===========

Bentham Instruments spectral analysis library.

Compatibility
-------------

Wheels are built for python versions 3.12 - 3.13, for these systems:

- Windows: win32, amd64
- Linux: x86, x86_64
- MacOS >10.9, universal2 (combined x86_64, arm64, requires pip version > 20.6 on intel, >21.0.1 on Apple Silicon)

Note: Apple silicon build has not been tested.

Installation
------------

`pip install benanalysis`

Building from source
--------------------

For local development (building the C++ core + the Python extension + docs), see:

- `BenAnalysis/src/benanalysis-python/README.md` in the repository.

Usage
-----

```python
import benanalysis as ba

# Create scans from (wavelength, value) data
scan1 = ba.Scan([400, 410, 420], [1.0, 2.0, 3.0])
scan2 = ba.Scan([405, 415], [10.0, 20.0])

# Arithmetic operators are supported (scan-scan and scan-scalar)
scaled = 2.0 * scan1 + 1.0

# The wavelength grid of Scan/Scan operations depends on interpolation:
# - If interpolation is disabled on both scans, results use only shared wavelengths.
# - If either scan is interpolated, results are evaluated on wavelengths in the overlap
#   region where both scans can be evaluated without extrapolation.
scan1.interpolation = ba.Interpolation.LINEAR
scan2.interpolation = ba.Interpolation.LINEAR
combined = scan1 + scan2

print(combined.wavelengths())
```

