neighbor_average_waveform

ctapipe.image.extractor.neighbor_average_waveform(waveforms, neighbors_indices, neighbors_indptr, lwt)[source]

Obtain the average waveform built from the neighbors of each pixel

Parameters
waveformsndarray

Waveforms stored in a numpy array. Shape: (n_pix, n_samples)

neighbors_indicesndarray

indices of a scipy csr sparse matrix of neighbors, i.e. ctapipe.instrument.CameraGeometry.neighbor_matrix_sparse.indices.

neighbors_indptrndarray

indptr of a scipy csr sparse matrix of neighbors, i.e. ctapipe.instrument.CameraGeometry.neighbor_matrix_sparse.indptr.

lwt: int

Weight of the local pixel (0: peak from neighbors only, 1: local pixel counts as much as any neighbor)

Returns
average_wfndarray

Average of neighbor waveforms for each pixel. Shape: (n_pix, n_samples)