Detector Calibration Package for NPAC
Project description
NPAC Detector Calibration
A suite of tools for the calibration of particle detectors using simulation data. This project is designed to process raw data, identify particle interaction peaks, perform Gaussian fits, and determine calibration constants.
Features
- Read and process particle detector simulation data.
- Identify particle interaction peaks in detector layers.
- Perform Gaussian fits on identified peaks.
- Determine calibration constants for energy calibration.
- Command-line interface for running calibration on all layers.
Installation
This project is managed with PDM.
-
Clone the repository:
git clone https://gitlab.in2p3.fr/informatique-des-deux-infinis/npac/2026/silver-wolf/calibration.git cd calibration
-
Install dependencies:
pdm install -
Add NPAC validator
To use the validator, install the npac_validator package in your PDM environment, edit the pyproject.toml file, and add:
[[tool.pdm.source]]
name = "npac_gitlab"
url = "https://gitlab.in2p3.fr/api/v4/projects/26344/packages/pypi/simple"
Usage
Here is a basic example of how to use the npac_calibration package to run the calibration on detector data.
from detector_calibration import DetectorCalibration
import pandas as pd
# Get path to event files
event_path = "data/electron_1GeV_Shower/event000000047-hits_digitised.csv"
# Read events into a pandas DataFrame
df = pd.read_csv(event_path)
# Initialize the detector calibration
calib = DetectorCalibration()
# Run calibration for all layers
all_results = calib.run_all_layers(df, save_csv=True)
# Get peak information for a specific layer
layer0_peaks = calib.get_peaks_info(layer=0)
print("Peaks found in layer 0:", layer0_peaks["x_peak"])
Contributing
Contributions are welcome! Please feel free to open an issue or submit a merge request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file npac_calibration-0.2.0.tar.gz.
File metadata
- Download URL: npac_calibration-0.2.0.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.26.2 CPython/3.12.12 Linux/5.14.0-503.15.1.el9_5.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dea313adfc947cf99c941795f702d666a4d04436eb4b1c8cb469454659d217dd
|
|
| MD5 |
ab22da6b2cb07766eec7c824960ef31d
|
|
| BLAKE2b-256 |
8b3bb4c96c5d1741ab99f3d96c376714d9cd33bdf77a34d7f4e693c646605280
|
File details
Details for the file npac_calibration-0.2.0-py3-none-any.whl.
File metadata
- Download URL: npac_calibration-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.26.2 CPython/3.12.12 Linux/5.14.0-503.15.1.el9_5.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c18f01833bf8e2d812ca88645bebf36cbcd76ef45996395453c1eb68ddeffe3
|
|
| MD5 |
83980dff7957614759fcec07df871d49
|
|
| BLAKE2b-256 |
842a83c77ece9920367c4959bcca482163a3f4e45b897b72e8403aba31fb5d89
|