Allow plotting of multiple beamline scans (quickfix)

This commit is contained in:
rasmusvt 2022-05-10 17:29:22 +02:00
parent d30c9c3b16
commit 8d8cad966d
2 changed files with 4 additions and 1 deletions

View file

@ -59,7 +59,7 @@ def integrate_1d(data, options={}, index=0):
# Get image array from filename if not passed
if 'image' not in data.keys():
if 'image' not in data.keys() or not data['image']:
data['image'] = get_image_array(data['path'][index])
# Instanciate the azimuthal integrator from pyFAI from the calibrant (.poni-file)

View file

@ -75,6 +75,9 @@ def plot_diffractogram(data, options={}):
data['diffractogram'][index] = diffractogram
data['wavelength'][index] = wavelength
# FIXME This is a quick fix as the image is not reloaded when passing multiple beamline datasets
data['image'] = None
# Sets the xlim if this has not bee specified
if not options['xlim']:
options['xlim'] = [data['diffractogram'][0][options['x_vals']].min(), data['diffractogram'][0][options['x_vals']].max()]