Skip to content
Snippets Groups Projects

Feat/dss cimprove master rebasing

Closed Andrey Samartsev requested to merge feat/DSSCimproveMasterRebasing into feat/DSSCdarksImprove
4 files
+ 84
60
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -106,7 +106,7 @@ def plot_badpix_3d(data, definitions, title=None, rebin_fac=2, azim=22.5):
def create_constant_overview(constant, name, cells, vmin=None, vmax=None,
entries=3, out_folder=None, infix=None,
badpixels=None, gmap=None):
badpixels=None, gmap=None, marker=None):
"""
Create a step plot for constant data across memory cells for requested
gain entries
@@ -127,10 +127,14 @@ def create_constant_overview(constant, name, cells, vmin=None, vmax=None,
:param gmap: A list with len equal to number of gain entires.
if not supported, a default would be used for 3 entries.
['High gain', 'Medium gain', 'Low gain']
:param marker: A list of line markers for each gain entry.
default: ['']*entries
:return:
"""
if gmap is None:
gmap = ['High gain', 'Medium gain', 'Low gain']
if marker is None:
marker = ['']*entries
fig = plt.figure(figsize=(10, 5))
ax = fig.add_subplot(111)
for g in range(entries):
@@ -155,7 +159,7 @@ def create_constant_overview(constant, name, cells, vmin=None, vmax=None,
np.nanstd(d)])
ax.step(np.arange(cells), np.nanmean(d, axis=(0,1)),
label=f'{gmap[g]}', color=f'C{g}')
label=gmap[g], color=f'C{g}', marker=marker[g])
# Plotting good pixels only if bad-pixels were given
if dbp is not None:
ax.step(np.arange(cells), np.nanmean(dbp, axis=(0, 1)),
Loading