Metadata-Version: 2.4
Name: spectrum-builder-db
Version: 1.0.7
Summary: Standalone gamma spectrum database and sampling API for OASYS and Python
Author-email: Konstantinos Karafasoulis <ckaraf@gmail.com>
License: MIT
Project-URL: Repository, https://github.com/ckaraf/spectrum-builder/
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pandas
Dynamic: license-file

# spectrum-builder-db

Standalone detector event pools and Python API for OASYS. No Streamlit or plotting dependencies.

Install from this source directory with `python -m pip install .` (or publish to PyPI and install `spectrum-builder-db`).

```python
from spectrum_builder import get_spectrum, get_spectrum_dataframe, list_detectors, list_isotopes
print(list_detectors())
print(list_isotopes("NaI"))
spectrum = get_spectrum(detector="NaI", isotope="Xe-133", number_of_bins=1024,
    number_of_signal_events=5000, number_of_background_events=5000,
    normalization_type=0, random_seed=42, energy_range=(0, 3000))
print(spectrum.shape)  # (1024, 2): energy centers in keV, spectrum values
```

Normalization: `0` raw counts; `1` counts/s (set `acquisition_time_s`); `2` unit area.
`get_spectrum_dataframe` returns Energy_keV, Signal_counts, Background_counts, Total_counts, Total_norm.

The included datasets come from the uploaded archive's `data_lite` directory. If the complete original datasets are required, replace the six CSVs under `spectrum_builder/data/` before building/publishing. The two distributions `spectrum-builder` and `spectrum-builder-db` must not be installed together in their original forms because both own the `spectrum_builder` Python module. To retain the Streamlit UI, refactor its distribution to depend on this database package without bundling the core module twice.
