pyhiperta.leakage.leakage¶
- pyhiperta.leakage.leakage(waveforms: ndarray, intensity: ndarray, leakage_mask: ndarray) ndarray [source]¶
Compute the leakage 1 and 2, and their intensity.
The leakage 1, respectively 2, is the number of pixels that are not 0 after cleaning on the outermost, respectively 2nd outermost, ring of the camera. The leakage intensity is the charge of the leakage pixels, so leakage 1, resp. 2, intensity is the sum of the signal in all pixels of the outermost, resp. 2nd outermost, ring of the camera.
- Parameters:
waveforms (np.ndarray) – 1D shower image(s). If a single image is provided the shape must be (N_pixels,). If a batch of images is provided, the shape should be (N_batch, N_pixels). Shape: ([N_batch,] N_pixels)
intensity (np.ndarray) – Total charge of each waveform. Shape: ([B_batch,] 1)
leakage_mask (np.ndarray) – Boolean array with value True for pixels on the outermost rings of the camera, False otherwise. leakage_mask[0, :] selects the outermost ring (leakage 1) while leakage_mask[1, :] selects the second outermost ring (leakage 2). Shape: (2, N_pixels)
- Returns:
Leakage array. This is a 1D array with shape (4,) if a single image was provided, or a 2D array with shape (N_batch, 4) if a batch of images was provided. The parameters are ordered like so: leakage[…, 0]: leakage 1: number of pixels with signal on the outermost ring of the camera, normalized by
the number of pixels with signal.
- leakage[…, 1]: leakage 2: number of pixels with signal on the 1st and 2nd outermost ring of
the camera, normalized by the number of pixels with signal.
- leakage[…, 3]: leakage 1 intensity: Waveform charge contained in the outermost ring of the camera,
normalized by the total charge in the camera
- leakage[…, 4]: leakage 2 intensity: Waveform charge contained in the 1st and 2nd outermost ring of the camera,
normalized by the total charge in the camera
- Return type:
np.ndarray