From 435b2018928ff211907f9ee53dabc20bea56342e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Le=20Guyader?= <loic.le.guyader@xfel.eu> Date: Sun, 27 Oct 2019 01:35:18 +0200 Subject: [PATCH] Add unpumped data on plot azimuthal integral --- DSSC.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/DSSC.py b/DSSC.py index eeea314..856ba47 100644 --- a/DSSC.py +++ b/DSSC.py @@ -533,27 +533,29 @@ class DSSC: inputs: kind: (str) either 'difference' or 'relative' to change the type of plot. """ - fig, [ax1, ax2] = plt.subplots(nrows=2, sharex=True, sharey=True) + fig, [ax1, ax2, ax3] = plt.subplots(nrows=3, sharex=True, sharey=True) xr.plot.imshow(self.azimuthal.pumped, ax=ax1, vmin=0, robust=True) ax1.set_title('pumped') - ax1.set_xlabel(self.scan_vname) - + + xr.plot.imshow(self.azimuthal.unpumped, ax=ax2, vmin=0, robust=True) + ax2.set_title('unpumped') + if kind == 'difference': val = self.azimuthal.pumped - self.azimuthal.unpumped - ax2.set_title('pumped - unpumped') + ax3.set_title('pumped - unpumped') elif kind == 'relative': val = (self.azimuthal.pumped - self.azimuthal.unpumped)/self.azimuthal.unpumped - ax2.set_title('(pumped - unpumped)/unpumped') + ax3.set_title('(pumped - unpumped)/unpumped') else: raise ValueError('kind should be either difference or relative') if lim is None: - xr.plot.imshow(val, ax=ax2, robust=True) + xr.plot.imshow(val, ax=ax3, robust=True) else: - xr.plot.imshow(val, ax=ax2, vmin=lim[0], vmax=lim[1]) + xr.plot.imshow(val, ax=ax3, vmin=lim[0], vmax=lim[1]) - ax2.set_xlabel(self.scan_vname) + ax3.set_xlabel(self.scan_vname) fig.suptitle(f'{self.plot_title}') def plot_azimuthal_line_cut(self, data, qranges, qwidths): -- GitLab