File indexing completed on 2026-04-09 07:48:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 """
0022 tdefault_distrib.py
0023 =============================================
0024
0025
0026 """
0027 import os, sys, logging, numpy as np
0028 log = logging.getLogger(__name__)
0029
0030 try:
0031 import matplotlib.pyplot as plt
0032 plt.rcParams['figure.figsize'] = 18,10.2
0033 import matplotlib.gridspec as gridspec
0034 except ImportError:
0035 print "matplotlib missing : you need this to make plots"
0036 plt = None
0037
0038 from opticks.ana.base import opticks_main
0039 from opticks.ana.nbase import vnorm
0040 from opticks.ana.evt import Evt
0041 from opticks.ana.cf import CF
0042 from opticks.ana.cfplot import cfplot, qwns_plot, qwn_plot, multiplot
0043
0044
0045 if __name__ == '__main__':
0046 np.set_printoptions(precision=4, linewidth=200)
0047 args = opticks_main(tag="1", src="torch", det="default")
0048 log.info(" args %s " % repr(args))
0049 log.info("tag %s src %s det %s c2max %s " % (args.utag,args.src,args.det, args.c2max))
0050
0051 plt.ion()
0052 plt.close()
0053
0054 select = slice(1,2)
0055
0056
0057 try:
0058 cf = CF(tag=args.tag, src=args.src, det=args.det, select=select )
0059 except IOError as err:
0060 log.fatal(err)
0061 sys.exit(args.mrc)
0062
0063 cf.dump()
0064
0065 irec = 1
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075 binsx,ax,bx,lx = cf.rqwn("X",irec)
0076 binsy,ay,by,ly = cf.rqwn("Y",irec)
0077 binsz,az,bz,lz = cf.rqwn("Z",irec)
0078
0079
0080
0081
0082
0083
0084
0085
0086