File indexing completed on 2026-04-09 07:48:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 """
0022 See also ana/geocache.bash
0023 """
0024 import os, logging, numpy as np
0025 log = logging.getLogger(__name__)
0026
0027 idp_ = lambda _:os.path.expandvars("$IDPATH/%s" % _ )
0028 idp2_ = lambda _:os.path.expandvars("$IDPATH2/%s" % _ )
0029
0030
0031
0032 def cflib(aa, bb):
0033 """
0034 Compare buffers between two geocache
0035 """
0036 assert aa.shape == bb.shape
0037 print aa.shape
0038
0039 for i in range(len(aa)):
0040 a = aa[i]
0041 b = bb[i]
0042 assert len(a) == 2
0043 assert len(b) == 2
0044
0045 g0 = a[0] - b[0]
0046 g1 = a[1] - b[1]
0047
0048 assert g0.shape == g1.shape
0049
0050 print i, g0.shape, "g0max: ", np.max(g0), "g1max: ", np.max(g1)
0051 pass
0052
0053
0054 def cflib_test():
0055
0056 rel = "GSurfaceLib/GSurfaceLib.npy"
0057
0058 aa = np.load(idp_(rel))
0059 bb = np.load(idp2_(rel))
0060 cflib(aa,bb)
0061
0062
0063
0064 if __name__ == '__main__':
0065 pass
0066 logging.basicConfig(level=logging.INFO)
0067
0068 assert 0, "ancient code depending in IDPATH"
0069