Skip to content
Snippets Groups Projects
Commit 6ccdf587 authored by Philipp Schmidt's avatar Philipp Schmidt
Browse files

Only use bad pixels from darks in agipdutils.baseline_correct_via_stripes

parent af8b57d6
No related branches found
No related tags found
1 merge request!573[AGIPD] Only use bad pixels from darks in agipdutils.baseline_correct_via_stripes
...@@ -135,6 +135,16 @@ def baseline_correct_via_stripe(d, g, m, frac_high_med): ...@@ -135,6 +135,16 @@ def baseline_correct_via_stripe(d, g, m, frac_high_med):
:param m: bad pixel mask :param m: bad pixel mask
""" """
# Restrict the mask to those bad pixels obtained from darks.
# This has ben introduced since the BadPixelsFF constants can add
# additional masking that causes the baseline correction to fail due
# to the abort conditions len(idx) < 3 below.
# (see calibration/planning#96)
m = m & (BadPixels.OFFSET_OUT_OF_THRESHOLD |
BadPixels.NOISE_OUT_OF_THRESHOLD |
BadPixels.OFFSET_NOISE_EVAL_ERROR |
BadPixels.NO_DARK_DATA)
dd = copy.copy(d) dd = copy.copy(d)
dd[g != 0] = np.nan # only high gain data dd[g != 0] = np.nan # only high gain data
dd[m != 0] = np.nan # only good pixels dd[m != 0] = np.nan # only good pixels
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment