File indexing completed on 2026-04-09 07:49:05
0001
0002
0003 """
0004 QCerenkovTest.py
0005 ================
0006
0007 ::
0008
0009 QCerenkovTest
0010 ipython -i tests/QCerenkovTest.py
0011
0012 """
0013 import os, logging, numpy as np
0014 log = logging.getLogger(__name__)
0015 from opticks.ana.nload import stamp_
0016
0017
0018 class QCerenkovTest(object):
0019 BASE = os.path.expandvars("/tmp/$USER/opticks/QCerenkovTest")
0020 def __init__(self):
0021 pass
0022
0023 def test_lookup(self):
0024 fold = os.path.join(self.BASE, "test_lookup")
0025 names = os.listdir(fold)
0026 for name in filter(lambda n:n.endswith(".npy"),names):
0027 path = os.path.join(fold, name)
0028 stem = name[:-4]
0029 a = np.load(path)
0030 log.info(" %10s : %20s : %s : %s " % ( stem, str(a.shape), stamp_(path), path ))
0031 setattr( self, stem, a )
0032 globals()[stem] = a
0033 pass
0034 assert np.all( icdf_src == icdf_dst )
0035
0036
0037 if __name__ == '__main__':
0038 logging.basicConfig(level=logging.INFO)
0039 t = QCerenkovTest()
0040 t.test_lookup()
0041
0042
0043
0044