Files
aare/docs/src/pycalibration.rst
Erik Fröjdh 5de402f91b added docs
2025-07-23 11:05:44 +02:00

1.0 KiB

Calibration

Functions for applying calibration to data.

import aare

# Load calibration data for a single JF module (512x1024 pixels)
calibration = aare.load_calibration('path/to/calibration/file.bin')

raw_data = ...  # Load your raw data here
pedestal = ...  # Load your pedestal data here

# Apply calibration to raw data to convert from raw ADC values to keV
data = aare.apply_calibration(raw_data, pd=pedestal, cal=calibration)

# If you pass a 2D pedestal and calibration only G0 will be used for the conversion
# Pixels that switched to G1 or G2 will be set to 0
data = aare.apply_calibration(raw_data, pd=pedestal[0], cal=calibration[0])

apply_calibration

load_calibration

calculate_pedestal

calculate_pedestal_float

calculate_pedestal_g0

calculate_pedestal_g0_float

count_switching_pixels