neighbor_average_maximum#
- ctapipe.image.extractor.neighbor_average_maximum(waveforms, neighbors_indices, neighbors_indptr, local_weight, broken_pixels)[source]#
 Obtain the average waveform built from the neighbors of each pixel
- Parameters:
 - waveformsndarray
 Waveforms stored in a numpy array. Shape: (n_channels, 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.- local_weightint
 Weight of the local pixel (0: peak from neighbors only, 1: local pixel counts as much as any neighbor)
- broken_pixelsndarray
 Mask of broken pixels. Broken pixels are ignored in the sum over the neighbors. Shape: (n_channels, n_pix)
- Returns:
 - average_wfndarray
 Average of neighbor waveforms for each pixel. Shape: (n_channels, n_pix)