Commit 9a6d7209 authored by Thomas Vincent's avatar Thomas Vincent

print measured data with dash outside ROI

parent 5dfeeea0
......@@ -297,22 +297,35 @@ class FitView(Qt.QMainWindow):
plot.clearMarkers()
plot.setGraphTitle('{0} ({1})'.format(title, name))
plot.addCurve(xAcq, yAcq, legend='measured', color='blue')
plot.addCurve(xAcq, yAcq,
legend='measured',
color='blue',
linestyle=':')
roiIndices = np.nonzero(np.in1d(xAcq, xFit, assume_unique=True))[0]
if len(roiIndices) != len(xFit):
roiIndices = None
_logger.error(
"Cannot retrieve ROI: cannot display ROI information")
else:
plot.addCurve(xAcq[roiIndices], yAcq[roiIndices],
legend='measured (ROI)',
color='blue',
linestyle='-')
background = None
if backgroundMode != BackgroundTypes.NONE: # Display background
indices = np.nonzero(np.in1d(xAcq, xFit, assume_unique=True))[0]
if len(indices) != len(xFit):
if roiIndices is None:
_logger.error(
"Cannot retrieve ROI: cannot display background")
else:
background = background_estimation(backgroundMode,
yAcq[indices])
yAcq[roiIndices])
plot.addCurve(
xFit,
background,
legend='background',
linestyle=':',
linestyle='--',
color='black')
plotter.plotFit(plot, xFit, peakParams, background)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment