Skip to content
Snippets Groups Projects

Boz fix3

Merged Loïc Le Guyader requested to merge boz-fix3 into master
1 file
+ 6
4
Compare changes
  • Side-by-side
  • Inline
@@ -346,9 +346,9 @@ def find_rois(data_mean, threshold):
rois: dictionnary of rois
"""
# compute vertical and horizontal projection
pX = data_mean.sum(axis=0)
pX = data_mean.mean(axis=0)
pX = pX[:256] # half the ladder since there is a gap in the middle
pY = data_mean.sum(axis=1)
pY = data_mean.mean(axis=1)
# along X
lowX = int(np.argmax(pX[:64] > threshold)) # 1st occurrence returned
@@ -438,9 +438,9 @@ def inspect_rois(data_mean, rois, threshold=None, allrois=False):
matplotlib figure
"""
# compute vertical and horizontal projection
pX = data_mean.sum(axis=0)
pX = data_mean.mean(axis=0)
pX = pX[:256] # half the ladder since there is a gap in the middle
pY = data_mean.sum(axis=1)
pY = data_mean.mean(axis=1)
# Set up the axes with gridspec
fig = plt.figure(figsize=(5, 3))
@@ -605,6 +605,8 @@ def load_dssc_module(proposalNB, runNB, moduleNB=15,
arr[arr == 0] = 256
ppt = run[source, key][subset].data_counts()
# ignore train with no pulses, can happen in burst mode acquisition
ppt = ppt[ppt > 0]
tid = ppt.index.to_numpy()
ppt = np.unique(ppt)
Loading