Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:05

0001 #!/usr/bin/env python
0002 """
0003 QBndTest.py
0004 =============
0005 
0006 ::
0007  
0008    ./QBndTest.sh 
0009  
0010 
0011 """
0012 import os 
0013 import numpy as np
0014 
0015 from opticks.ana.fold import Fold
0016 
0017 #np.set_printoptions(suppress=True, precision=3, edgeitems=5 )
0018 
0019 
0020 def test_cf(src, dst):
0021     s = src
0022     d = dst.reshape(src.shape)
0023     assert np.allclose( s, d )
0024 
0025     ss = src.reshape(dst.shape)
0026     dd = dst
0027     assert np.allclose( ss, dd )
0028 
0029 
0030 
0031 if __name__ == '__main__':
0032     f = Fold.Load(symbol="f")
0033     print(repr(f))
0034 
0035     f.src[np.where(f.src == 1e9)] = 1e6 
0036     f.dst[np.where(f.dst == 1e9)] = 1e6 
0037 
0038     a = f.src    
0039     b = f.dst    
0040 
0041     assert( np.all( a == b ))
0042 
0043 
0044