Commit a81a9ba8 authored by Dion Haefner's avatar Dion Haefner

remove trivial dimensions from field

parent 4bae15af
......@@ -14,14 +14,14 @@ from dorie.utilities.text_to_bool import text_to_bool
def evaluate(iniinfo,runtime):
h5_path = iniinfo["generator.fft.outputPath"] + "/YField.h5"
with h5py.File(h5_path, 'r') as f:
y_data = np.array(f.get("/YField"), dtype=np.float64)
y_data = np.squeeze(np.array(f.get("/YField"), dtype=np.float64))
print("Operating on file: {}".format(h5_path))
# Calculate autocorrelation and correlation lengths
ac = statistics.autocorrelation(y_data)
rank = y_data.ndim
dx = np.array(iniinfo["generator.extensions"].split(), dtype=float) / y_data.shape
dx = np.array(iniinfo["generator.extensions"].split(), dtype=np.float) / y_data.shape
assert(len(dx) == rank)
cl = [integrate.simps(ac,dx=dxi,axis=i).flat[0] for i, dxi in enumerate(dx)][::-1]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment