Loading scripts/plot_transmission.py +12 −4 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ def run(filenames, args, spectrum_only=False): plt.subplot(2,1,2) _,(w0,c0) = tcounts.popitem(last=False) for s,(w,c) in list(tcounts.items()): if args.echodet: tfac = c0/c else: tfac = c/c0 tavg = np.average(tfac) print("%s: %g" % (s, np.average(tfac))) Loading @@ -68,9 +71,14 @@ def main(): help="plot in semilogy") parser.add_argument('--spectrum-only', '-w', dest='spectrum_only', action='store_true', help="plot in semilogy") parser.add_argument('--tmin', '-t', type=int, dest='tmin') parser.add_argument('--tmax', '-T', type=int, dest='tmax') parser.add_argument('--save', '-s', dest='plotfile') parser.add_argument('--tmin', '-t', type=int, dest='tmin', help='set min TOF channel (default=%(default)s)') parser.add_argument('--tmax', '-T', type=int, dest='tmax', help='set max TOF channel (default=%(default)s)') parser.add_argument('--save', '-s', dest='plotfile', help='save plot to a file') parser.add_argument('--echodet', '-e', dest='echodet', action='store_true', help='report transmission for echodet 1/T') parser.add_argument('--version', action='version', version='%(prog)s pysen={version}'.format(version=version())) Loading Loading
scripts/plot_transmission.py +12 −4 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ def run(filenames, args, spectrum_only=False): plt.subplot(2,1,2) _,(w0,c0) = tcounts.popitem(last=False) for s,(w,c) in list(tcounts.items()): if args.echodet: tfac = c0/c else: tfac = c/c0 tavg = np.average(tfac) print("%s: %g" % (s, np.average(tfac))) Loading @@ -68,9 +71,14 @@ def main(): help="plot in semilogy") parser.add_argument('--spectrum-only', '-w', dest='spectrum_only', action='store_true', help="plot in semilogy") parser.add_argument('--tmin', '-t', type=int, dest='tmin') parser.add_argument('--tmax', '-T', type=int, dest='tmax') parser.add_argument('--save', '-s', dest='plotfile') parser.add_argument('--tmin', '-t', type=int, dest='tmin', help='set min TOF channel (default=%(default)s)') parser.add_argument('--tmax', '-T', type=int, dest='tmax', help='set max TOF channel (default=%(default)s)') parser.add_argument('--save', '-s', dest='plotfile', help='save plot to a file') parser.add_argument('--echodet', '-e', dest='echodet', action='store_true', help='report transmission for echodet 1/T') parser.add_argument('--version', action='version', version='%(prog)s pysen={version}'.format(version=version())) Loading