pyhiperta.waveform_indexing

Implements the indexing/mapping of waveforms from 1D array (hexagonal structure) to 2D square array.

The 1D array representation is suited for vectorization of “per-element” operations such as calibration, Hillas computation, etc. while the 2D square representation is faster for operations requiring neighbors look-up, such as the tail-cut cleaning. It is faster to copy the data from one representation to the other than to perform the cleaning with the 1D representation.

Functions

leakage_pixel_masks(pixel_positions)

Returns a mask (boolean array) that multiplied with waveforms (1D) puts all pixels except the outer rings to 0.

neighbors_only_stencil()

Return the stencil selecting __only the neighbors__ of a pixel in 2D array.

waveform1Dto2D(maps1D_to_2D, waveform[, ...])

Get the 2D array representation of waveform

waveform2Dto1D(maps1D_to_2D, waveform2D)

Get the 1D array representing the waveform from the 2D representation waveform2D.

waveform_1D_to_2D_maps(pixel_positions)

Create the 2D waveform array with "squared geometry" and 1D to 2D indices maps.