Skip to content
Snippets Groups Projects

[AGIPD][TESTs]test_agipdlib AGIPDCtrl and get_bias_voltage for AGIPD1M and AGIPD500K

Merged Karim Ahmed requested to merge test/test_agipdlib into master
1 file
+ 9
0
Compare changes
  • Side-by-side
  • Inline
@@ -130,6 +130,15 @@ def get_shadowed_stripe(data, threshold, fraction):
npx_sh = np.count_nonzero(data < threshold, axis=1)
rows_to_use = npx_sh / npx_all > fraction
# TODO: is this necessary?
# The previous code excludes the first and last rows that would otherwise
# be considered shadowed, with no explanation of why.
# For now, I'll preserve the behaviour. -TK
row_idxs = np.nonzero(rows_to_use)[0]
if len(row_idxs) > 0:
rows_to_use[row_idxs[0]] = False
rows_to_use[row_idxs[-1]] = False
# Ignore rows with double-width pixels
rows_to_use[64:512:64] = False
rows_to_use[63:511:64] = False
Loading