Loading pysen/plot/nseplotlib.py +4 −4 Original line number Diff line number Diff line Loading @@ -448,7 +448,7 @@ def plot_echo(hdfile, iecho=None, **kwargs): tbin2 = kwargs.pop('tbin2',None) # min_counts = kwargs.pop('min_counts', 10.0) max_chi2 = kwargs.pop('max_chi2' ,500.0) max_chi2 = kwargs.pop('max_chi2') #min_amp = kwargs.pop('min_amp' , 0.20) # absy = kwargs.pop('absy', 0) Loading Loading @@ -615,9 +615,6 @@ def plot_echo(hdfile, iecho=None, **kwargs): phasesens=phasesens, phase_pf=phase_ef0, incoherent=incoherent) (phase_ef, phase_err), (xef, yef), res = res # if res['chi2']>max_chi2: continue fres = 2*res['amplitude'][0]/(upave - dnave) #if abs(fres)<min_amp: # continue Loading @@ -628,6 +625,9 @@ def plot_echo(hdfile, iecho=None, **kwargs): plot_single_echo(ax, (cur, y, ey), (nph,n_idx['up']), fit=(xef, yef), res=res, label=f'({i},{j})', only_echo=only_echo, fmt='.', lw=2, ms=1) # if max_chi2 and res['chi2']>max_chi2: ax.set_facecolor('orange') if fres<0: ax.set_facecolor('yellow') if absy: 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__ = "2.1" __release__ = "b8" __date__ = "May 8, 2025" __release__ = "b9" __date__ = "May 28, 2025" def version(full=False): "get pysen version number" Loading pysen/ui/nseplot.py +4 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,8 @@ def add_echo_options(subparser, parents=None): aliases=['ec'], help='plot echo (.echo or .h5 files)', description='create echo plot(s)') pars.set_defaults(center_only=True, resolution_plot=False, absy=0, npix=4, taus=None) pars.set_defaults(center_only=True, resolution_plot=False, absy=0, npix=4, taus=None, max_chi2=300.0) pars.add_argument('file', metavar='filename', help='file to process', nargs='+') add_extend_argument(pars, '--tau', dest='taus', metavar='tau', type=int, nargs='*', help='select list of taus') Loading @@ -126,6 +127,8 @@ def add_echo_options(subparser, parents=None): help='set pixel binning (default=%(default)s)') pars.add_argument('--resolution', '-R', dest='resolution_plot', action='store_true', help='plot resolution vs tau') pars.add_argument('--max-chi2', dest='max_chi2', type=float, help='set max chi-square (default=%(default)s)') def add_atari_options(subparser, parents=None): "atari options" Loading Loading
pysen/plot/nseplotlib.py +4 −4 Original line number Diff line number Diff line Loading @@ -448,7 +448,7 @@ def plot_echo(hdfile, iecho=None, **kwargs): tbin2 = kwargs.pop('tbin2',None) # min_counts = kwargs.pop('min_counts', 10.0) max_chi2 = kwargs.pop('max_chi2' ,500.0) max_chi2 = kwargs.pop('max_chi2') #min_amp = kwargs.pop('min_amp' , 0.20) # absy = kwargs.pop('absy', 0) Loading Loading @@ -615,9 +615,6 @@ def plot_echo(hdfile, iecho=None, **kwargs): phasesens=phasesens, phase_pf=phase_ef0, incoherent=incoherent) (phase_ef, phase_err), (xef, yef), res = res # if res['chi2']>max_chi2: continue fres = 2*res['amplitude'][0]/(upave - dnave) #if abs(fres)<min_amp: # continue Loading @@ -628,6 +625,9 @@ def plot_echo(hdfile, iecho=None, **kwargs): plot_single_echo(ax, (cur, y, ey), (nph,n_idx['up']), fit=(xef, yef), res=res, label=f'({i},{j})', only_echo=only_echo, fmt='.', lw=2, ms=1) # if max_chi2 and res['chi2']>max_chi2: ax.set_facecolor('orange') if fres<0: ax.set_facecolor('yellow') if absy: 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__ = "2.1" __release__ = "b8" __date__ = "May 8, 2025" __release__ = "b9" __date__ = "May 28, 2025" def version(full=False): "get pysen version number" Loading
pysen/ui/nseplot.py +4 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,8 @@ def add_echo_options(subparser, parents=None): aliases=['ec'], help='plot echo (.echo or .h5 files)', description='create echo plot(s)') pars.set_defaults(center_only=True, resolution_plot=False, absy=0, npix=4, taus=None) pars.set_defaults(center_only=True, resolution_plot=False, absy=0, npix=4, taus=None, max_chi2=300.0) pars.add_argument('file', metavar='filename', help='file to process', nargs='+') add_extend_argument(pars, '--tau', dest='taus', metavar='tau', type=int, nargs='*', help='select list of taus') Loading @@ -126,6 +127,8 @@ def add_echo_options(subparser, parents=None): help='set pixel binning (default=%(default)s)') pars.add_argument('--resolution', '-R', dest='resolution_plot', action='store_true', help='plot resolution vs tau') pars.add_argument('--max-chi2', dest='max_chi2', type=float, help='set max chi-square (default=%(default)s)') def add_atari_options(subparser, parents=None): "atari options" Loading