pyhiperta.waveform_indexing.leakage_pixel_masks¶
- pyhiperta.waveform_indexing.leakage_pixel_masks(pixel_positions: ndarray) ndarray [source]¶
Returns a mask (boolean array) that multiplied with waveforms (1D) puts all pixels except the outer rings to 0.
- Parameters:
pixel_positions (np.ndarray) – 2D array (shape: (2, N_pixels)) containing the pixels x and y coordinates. This should be the actual pixels positions in the camera. It is important that the referential in which the position are measured has equal metrics on both axis (1m in the real world is 1 on x _and_ y axis)
- Returns:
leakage_mask – Mask array with values True at the indices of pixels on the outermost rings, False otherwise. The shape is (2, nb_pixels). leakage_mask[0, :] selects the pixels of the outermost ring (leakage 1) while leakage[1:] selects the pixels of the 1st and 2nd outermost ring (leakage 2).
- Return type:
np.ndarray