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 import os, logging, numpy as np
0025 from opticks.ana.base import opticks_main
0026 from opticks.ana.cfh import CFH
0027 log = logging.getLogger(__name__)
0028 
0029 if __name__ == '__main__':
0030     ok = opticks_main(tag="1", src="torch", det="concentric")
0031 
0032     ctx = {'det':ok.det, 'tag':ok.tag }
0033 
0034     tagd = CFH.tagdir_(ctx)
0035 
0036     seq0s = os.listdir(tagd)
0037 
0038     seq0 = seq0s[0] 
0039   
0040     irec = len(seq0.split("_")) - 1
0041 
0042     ctx.update({'seq0':seq0, 'irec':str(irec) })
0043 
0044     log.info(" ctx %r " % ctx )
0045 
0046     for q in ok.qwn.replace(",",""):
0047 
0048         ctx.update({'qwn':q })
0049 
0050         h = CFH.load_(ctx)
0051 
0052         print h
0053 
0054 
0055