Skip to content

Commit

Permalink
Avoid useless warning from rare empty pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
moralejo committed Dec 18, 2024
1 parent c8c47de commit 2913357
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lstchain/image/cleaning.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ def find_tailcuts(input_dir, run_number):
median_pix_charge_dev = median_abs_deviation(charges_pedestals,

Check warning on line 147 in lstchain/image/cleaning.py

View check run for this annotation

Codecov / codecov/patch

lstchain/image/cleaning.py#L146-L147

Added lines #L146 - L147 were not covered by tests
axis=0,
nan_policy='omit')
# Avoid later warnings from empty pixels:
median_pix_charge_dev = np.where(median_pix_charge_dev > 0,

Check warning on line 151 in lstchain/image/cleaning.py

View check run for this annotation

Codecov / codecov/patch

lstchain/image/cleaning.py#L151

Added line #L151 was not covered by tests
median_pix_charge_dev, np.nan)
# Just a cut to remove outliers (pixels):
outliers = (np.abs(charges_pedestals - median_pix_charge) /

Check warning on line 154 in lstchain/image/cleaning.py

View check run for this annotation

Codecov / codecov/patch

lstchain/image/cleaning.py#L154

Added line #L154 was not covered by tests
median_pix_charge_dev) > mad_max
Expand Down

0 comments on commit 2913357

Please sign in to comment.