Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:48:46

0001 #!/usr/bin/env python
0002 #
0003 # Copyright (c) 2019 Opticks Team. All Rights Reserved.
0004 #
0005 # This file is part of Opticks
0006 # (see https://bitbucket.org/simoncblyth/opticks).
0007 #
0008 # Licensed under the Apache License, Version 2.0 (the "License"); 
0009 # you may not use this file except in compliance with the License.  
0010 # You may obtain a copy of the License at
0011 #
0012 #   http://www.apache.org/licenses/LICENSE-2.0
0013 #
0014 # Unless required by applicable law or agreed to in writing, software 
0015 # distributed under the License is distributed on an "AS IS" BASIS, 
0016 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
0017 # See the License for the specific language governing permissions and 
0018 # limitations under the License.
0019 #
0020 
0021 """
0022 ::
0023 
0024     In [14]: evt.rpost_(slice(0,5)).shape
0025     Out[14]: (500000, 5, 4)
0026 
0027 
0028 """
0029 import os, sys, logging, numpy as np
0030 log = logging.getLogger(__name__)
0031 
0032 from opticks.ana.base import opticks_main
0033 from opticks.ana.evt import Evt
0034 
0035 if __name__ == '__main__':
0036 
0037     args = opticks_main(tag="1",src="natural", det="g4live", pfx="OKG4Test", doc=__doc__)
0038     np.set_printoptions(suppress=True, precision=3)
0039 
0040     print("pfx:%s" % args.pfx ) 
0041 
0042     a = Evt(tag=args.tag, src=args.src, det=args.det, pfx=args.pfx, seqs=[], args=args)
0043     print("a")
0044     print(a)
0045 
0046     #a2 = Evt(tag=args.tag, src=args.src, det=args.det, pfx="source", seqs=[], args=args)
0047     #print("a2")
0048     #print(a2)
0049  
0050 
0051     b = Evt(tag="-%s"%args.tag, src=args.src, det=args.det, pfx=args.pfx, seqs=[], args=args)
0052     print("b")
0053     print(b)
0054 
0055     print("a")
0056     a.history_table(slice(0,5))
0057     #print("a2")
0058     #a2.history_table(slice(0,5))
0059 
0060     print("b")
0061     b.history_table(slice(0,5))
0062        
0063