Skip to content
Snippets Groups Projects
Commit 435b2018 authored by Loïc Le Guyader's avatar Loïc Le Guyader
Browse files

Add unpumped data on plot azimuthal integral

parent 0332557d
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
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