Loading pysen/inout/reader.py +1 −0 Original line number Diff line number Diff line Loading @@ -507,6 +507,7 @@ def read_echo(filename): _log.warning('read %s=%d/%d failed (%s), skipping it...', sparam, act_slength, slength, str(exc)) act_slength = act_slength -1 continue # skip this # PAZ - FIXME - allow for incomplete runs except StopIteration: act_slength = act_slength -1 break Loading pysen/plot/qplot.py +20 −23 Original line number Diff line number Diff line Loading @@ -285,8 +285,7 @@ def plot_diffrun(axis, filenames, **kwargs): noqerr = t1 is None or t2 is None nfiles = len(filenames) axis0 = None axis1 = None ylabel = None for _i, filename in enumerate(filenames): res = read_diffrun(filename) # Loading Loading @@ -356,45 +355,43 @@ def plot_diffrun(axis, filenames, **kwargs): if 'up' in selection: _make_plot(axis, (q0, cup, ecup ), marker='^', lbl='up') axis0 = axis if 'down' in selection: _make_plot(axis, (q1, cdn, ecdn ), marker='v', lbl='down') axis0 = axis if 'coherent' in selection: _make_plot(axis, (qmean, coherent, ecoherent ), marker='^', lbl='C') axis0 = axis if 'incoherent' in selection: _make_plot(axis, (qmean, incoherent, eincoherent ), marker='v', lbl='I') axis0 = axis if 'average' in selection: average = (coherent+incoherent)/2 eaverage = sqrt(ecoherent**2+eincoherent**2) _make_plot(axis, (qmean, average, eaverage), marker='s', lbl='<A>') axis0 = axis # ratios if 'flip_ratio' in selection: #fratio = np.where(fratio>1.0, fratio, 1.0/fratio) if axis1 is None: axis1 = axis.twinx() _make_plot(axis1, (qmean, fratio, eratio ), marker='o', lbl='FR') #if axis1 is None: # axis1 = axis.twinx() _make_plot(axis, (qmean, fratio, eratio ), marker='o', lbl='FR') ylabel = 'Flip Ratio' if 'coherent_ratio' in selection: cratio = (2*fratio - 1)/3 ecratio = (2*eratio)/3 if axis1 is None: axis1 = axis.twinx() #if axis1 is None: # axis1 = axis.twinx() _make_plot(axis, (qmean, cratio, ecratio), marker='s', lbl='C/I') ylabel = 'Coherent/Incoherent Ratio' if axis0 is not None: axis0.set_yscale('log' if logscale else 'linear') axis0.legend(loc='best') axis0.grid(True, which='both') axis0.set_ylabel('Count Rate [counts/s] at %.1f MW' % power) if axis1 is not None: axis1.set_yscale('log' if logscale else 'linear') axis1.legend(loc='best') axis1.grid(True, which='both') axis1.set_ylabel('Ratio') axis.set_yscale('log' if logscale else 'linear') axis.legend(loc='best') axis.grid(True, which='both') if ylabel: axis.set_ylabel(ylabel) else: axis.set_ylabel('Count Rate [counts/s] at %.1f MW' % power) #if axis1 is not None: # axis1.set_yscale('log' if logscale else 'linear') # axis1.legend(loc='best') # axis1.grid(True, which='both') # axis1.set_ylabel('Ratio') if noqerr: axis.set_xlabel(r'$Q_{min}$ $\AA^{-1}$') Loading pysen/revision.py +2 −2 Original line number Diff line number Diff line Loading @@ -3,8 +3,8 @@ PySEN revision module """ import sys __version__ = "1.3" __release__ = "rc2" __date__ = "Feb 14, 2023" __release__ = "beta1" __date__ = "Feb 17, 2023" def version(full=False): "get pysen version number" Loading pysen/ui/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ UISRC=NSEMainWindow.ui \ FileMonMainWindow.ui \ QTauMainWindow.ui \ SillyEchoSimulator.ui SimpleEchoSimulator.ui PYSRC=${UISRC:%.ui=ui_%.py} Loading pysen/ui/SillyEchoSimulator.py→pysen/ui/SimpleEchoSimulator.py +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ from matplotlib.figure import Figure from ..constants import ANGSTROM, OMEGA_N from ..echo.fit import flux_weighted_eshape as echo_shape #pylint: disable=import-error from .ui_SillyEchoSimulator import Ui_SillyEchoSimMainWindow as Ui_MainWindow from .ui_SimpleEchoSimulator import Ui_SimpleEchoSimMainWindow as Ui_MainWindow MICRO=1e-6 Loading Loading
pysen/inout/reader.py +1 −0 Original line number Diff line number Diff line Loading @@ -507,6 +507,7 @@ def read_echo(filename): _log.warning('read %s=%d/%d failed (%s), skipping it...', sparam, act_slength, slength, str(exc)) act_slength = act_slength -1 continue # skip this # PAZ - FIXME - allow for incomplete runs except StopIteration: act_slength = act_slength -1 break Loading
pysen/plot/qplot.py +20 −23 Original line number Diff line number Diff line Loading @@ -285,8 +285,7 @@ def plot_diffrun(axis, filenames, **kwargs): noqerr = t1 is None or t2 is None nfiles = len(filenames) axis0 = None axis1 = None ylabel = None for _i, filename in enumerate(filenames): res = read_diffrun(filename) # Loading Loading @@ -356,45 +355,43 @@ def plot_diffrun(axis, filenames, **kwargs): if 'up' in selection: _make_plot(axis, (q0, cup, ecup ), marker='^', lbl='up') axis0 = axis if 'down' in selection: _make_plot(axis, (q1, cdn, ecdn ), marker='v', lbl='down') axis0 = axis if 'coherent' in selection: _make_plot(axis, (qmean, coherent, ecoherent ), marker='^', lbl='C') axis0 = axis if 'incoherent' in selection: _make_plot(axis, (qmean, incoherent, eincoherent ), marker='v', lbl='I') axis0 = axis if 'average' in selection: average = (coherent+incoherent)/2 eaverage = sqrt(ecoherent**2+eincoherent**2) _make_plot(axis, (qmean, average, eaverage), marker='s', lbl='<A>') axis0 = axis # ratios if 'flip_ratio' in selection: #fratio = np.where(fratio>1.0, fratio, 1.0/fratio) if axis1 is None: axis1 = axis.twinx() _make_plot(axis1, (qmean, fratio, eratio ), marker='o', lbl='FR') #if axis1 is None: # axis1 = axis.twinx() _make_plot(axis, (qmean, fratio, eratio ), marker='o', lbl='FR') ylabel = 'Flip Ratio' if 'coherent_ratio' in selection: cratio = (2*fratio - 1)/3 ecratio = (2*eratio)/3 if axis1 is None: axis1 = axis.twinx() #if axis1 is None: # axis1 = axis.twinx() _make_plot(axis, (qmean, cratio, ecratio), marker='s', lbl='C/I') ylabel = 'Coherent/Incoherent Ratio' if axis0 is not None: axis0.set_yscale('log' if logscale else 'linear') axis0.legend(loc='best') axis0.grid(True, which='both') axis0.set_ylabel('Count Rate [counts/s] at %.1f MW' % power) if axis1 is not None: axis1.set_yscale('log' if logscale else 'linear') axis1.legend(loc='best') axis1.grid(True, which='both') axis1.set_ylabel('Ratio') axis.set_yscale('log' if logscale else 'linear') axis.legend(loc='best') axis.grid(True, which='both') if ylabel: axis.set_ylabel(ylabel) else: axis.set_ylabel('Count Rate [counts/s] at %.1f MW' % power) #if axis1 is not None: # axis1.set_yscale('log' if logscale else 'linear') # axis1.legend(loc='best') # axis1.grid(True, which='both') # axis1.set_ylabel('Ratio') if noqerr: axis.set_xlabel(r'$Q_{min}$ $\AA^{-1}$') Loading
pysen/revision.py +2 −2 Original line number Diff line number Diff line Loading @@ -3,8 +3,8 @@ PySEN revision module """ import sys __version__ = "1.3" __release__ = "rc2" __date__ = "Feb 14, 2023" __release__ = "beta1" __date__ = "Feb 17, 2023" def version(full=False): "get pysen version number" Loading
pysen/ui/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ UISRC=NSEMainWindow.ui \ FileMonMainWindow.ui \ QTauMainWindow.ui \ SillyEchoSimulator.ui SimpleEchoSimulator.ui PYSRC=${UISRC:%.ui=ui_%.py} Loading
pysen/ui/SillyEchoSimulator.py→pysen/ui/SimpleEchoSimulator.py +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ from matplotlib.figure import Figure from ..constants import ANGSTROM, OMEGA_N from ..echo.fit import flux_weighted_eshape as echo_shape #pylint: disable=import-error from .ui_SillyEchoSimulator import Ui_SillyEchoSimMainWindow as Ui_MainWindow from .ui_SimpleEchoSimulator import Ui_SimpleEchoSimMainWindow as Ui_MainWindow MICRO=1e-6 Loading