fill_negative_max¶
- ompy.fill_negative_max(array, window_size)[source]¶
Fill negative channels with positive counts from neighboring channels.
The idea is that the negative counts are somehow connected to the (γ-ray) resolution and should thus be filled from a channel within the resolution.
This implementation loops through the closest channels with maximum number of counts to fill the channle(s) with negative counts. Note that it can happen that some bins will remain with negative counts (if not enough bins with possitive counts are available within the window_size) .
The routine is performed for each Ex row independently.
- Parameters:
- Return type:
- Returns:
array with negative counts filled, where possible