pyhiperta.calibration
Calibration of R0 data: going from 2 gain ADC counts to number of photo-electrons.
Functions:
| Name | Description |
|---|---|
calibrate |
Apply pedestal and gain calibration to waveforms. |
select_channel |
Select values to use in waveforms high/low gain and corresponding gains and pedestals based on threshold. |
calibrate
Apply pedestal and gain calibration to waveforms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
waveform
|
ndarray
|
Batch or single video samples of the shower events. Shape: (N_batch, N_frames, N_pixels) |
required |
gains
|
ndarray
|
For each waveform, the gains to apply to each pixel. The same gain is applied for all frames of a shower pixel. Shape: (N_batch, N_pixels). |
required |
pedestals
|
ndarray
|
For each waveform, the pedestals to apply to each pixel. The same pedestal is applied for all frames of a shower pixel. Shape (N_batch, N_pixels) |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Calibrated waveforms (number of photo-electrons). Shape is identical to |
Source code in src/pyhiperta/calibration.py
select_channel
select_channel(waveform_high, waveform_low, gains, pedestals, window_integration_correction, threshold)
Select values to use in waveforms high/low gain and corresponding gains and pedestals based on threshold.
The choice is independent per shower and per pixel, but shared in time for a given pixel:
For each pixel, if any value of waveform_high is above threshold then the low gain and
corresponding waveform channel and pedestal is chosen. Otherwise the high gain is chosen.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
waveform_high
|
ndarray
|
R0 waveform high gain. Shape: (N_batch, N_frames, N_pixels) |
required |
waveform_low
|
ndarray
|
R0 waveform low gain. Shape: (N_batch, N_frames, N_pixels) |
required |
gains
|
ndarray
|
Per-pixel high and low gains. |
required |
pedestals
|
ndarray
|
Per-pixel pedestal for low and high gains. |
required |
window_integration_correction
|
ndarray
|
Array of shape (2,) containing the correction to apply after a windowed integration, for each gain. |
required |
threshold
|
float
|
Threshold to chose the waveform channel. A value above |
required |
Returns:
| Type | Description |
|---|---|
Tuple[ndarray, ndarray, ndarray, ndarray]
|
The waveform selected from each gains based on |