From b40624cf5562853ee05762077dd0e861efce013b Mon Sep 17 00:00:00 2001 From: gac-x03da Date: Mon, 21 Jan 2019 15:58:39 +0100 Subject: [PATCH] Script execution --- script/XPSSpectrum.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/script/XPSSpectrum.py b/script/XPSSpectrum.py index 805edc44..913e1d9c 100644 --- a/script/XPSSpectrum.py +++ b/script/XPSSpectrum.py @@ -106,10 +106,17 @@ try: if xdata is None: xdata = Scienta.spectrumX p.getSeries(0).setData(xdata, ydata) - #eb_axis = p.chart.plot.getDomainAxis(1) - #eb1 = Eph.take(100) - Scienta.lowEnergy.take(100) - 4.5 - #eb2 = Eph.take(100) - Scienta.highEnergy.take(100) - 4.5 - #eb_axis.setRange(eb2, eb1) + + eb_axis = p.chart.plot.getDomainAxis(1) + ephot = Eph.take(100) + elo = Scienta.lowEnergy.take(100) + ehi = Scienta.highEnergy.take(100) + workfunc = 4.5 + if ephot is not float or ephot < 0.: + ephot = ehi + eb1 = ephot - elo - workfunc + eb2 = ephot - ehi - workfunc + eb_axis.setRange(eb2, eb1) if save_scienta_image: image_array = Scienta.dataMatrix.read()