def do_main(): print('Command :', ' '.join(sys.argv)) print('Arguments:') parser = argument_parser() args = parser.parse_args() for k, v in vars(args).items(): print(' %s: %s' % (k, str(v))) init_logger(args.loglev, fmt='[%(levelname).1s] L%(lineno)04d: %(message)s', datefmt='%Y-%m-%dT%H:%M:%S') from psana.pscalib.calibprod.DetRawDarkProc import detectors_dark_proc detectors_dark_proc(parser) print(usage()) sys.exit('END OF %s' % SCRNAME)
type=int, default=1, help="graphics control mode; 0-close window, 1-using keyboard keys") parser.add_argument('-n', '--nevents', type=int, default=100, help="number of non-empty events") args = parser.parse_args() print('Arguments of type %s as %s' % (type(args), type(vars(args)))) for k, v in vars(args).items(): print(' %12s : %s' % (k, str(v))) init_logger(args.loglev, fmt='[%(levelname).1s] L%(lineno)04d : %(message)s', datefmt='%Y-%m-%dT%H:%M:%S') #---------- #---------- #---------- #---------- import matplotlib.pyplot as plt ###plt.switch_backend('Qt5Agg') import numpy as np from psana import DataSource from psana.xtcav.LasingOnCharacterization import LasingOnCharacterization, cons, setDetectors from psana.pyalgos.generic.NDArrUtils import info_ndarr, print_ndarr