*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit bb84cfbc authored by Patrick Kappl's avatar Patrick Kappl
Browse files

Calculate standard error of mean if not in HDF5 file

parent 4204f4da
No related branches found
No related tags found
No related merge requests found
......@@ -31,12 +31,12 @@ file_names = []
# file_names.append("jackknife_U4_b2_w16_n1e4_n4iwf20_2019-07-05_12-58-01.hdf5")
# file_names.append("jackknife_U4_b2_w16_n1e4_n4iwf20_2019-07-05_14-20-41.hdf5")
# file_names.append("U4_b2_w4_n64e3_n4iwf20_2019-07-11_14-49-57.hdf5")
# file_names.append("U4_b2_w8_n32e3_n4iwf20_2019-07-11_14-50-20.hdf5")
# file_names.append("U4_b2_w16_n16e3_n4iwf20_2019-07-11_10-50-56.hdf5")
# file_names.append("U4_b2_w32_n8e3_n4iwf20_2019-07-11_10-51-25.hdf5")
file_names.append("U4_b2_w4_n64e3_n4iwf20_2019-07-11_14-49-57.hdf5")
file_names.append("U4_b2_w8_n32e3_n4iwf20_2019-07-11_14-50-20.hdf5")
file_names.append("U4_b2_w16_n16e3_n4iwf20_2019-07-11_10-50-56.hdf5")
file_names.append("U4_b2_w32_n8e3_n4iwf20_2019-07-11_10-51-25.hdf5")
file_names.append("U4_b2_w50_n5120_n4iwf20_2019-07-18_17-13-41.hdf5")
# file_names.append("U4_b2_w64_n4e3_n4iwf20_2019-07-11_10-51-47.hdf5")
file_names.append("U4_b2_w64_n4e3_n4iwf20_2019-07-11_10-51-47.hdf5")
file_names.append("U4_b2_w80_n3200_n4iwf20_2019-07-18_17-13-12.hdf5")
......@@ -53,11 +53,9 @@ file_names.append("U4_b2_w80_n3200_n4iwf20_2019-07-18_17-13-12.hdf5")
file_paths = [os.path.join(directory, name) for name in file_names]
files = [h5py.File(path, "r") for path in file_paths]
means = np.array([np.array(f["mean"][...]) for f in files])
errors = np.array([np.array(f["standard_error_of_mean"][...]) for f in files])
transformed_input_means = np.array([np.array(f["transformed_input_mean"][...])
for f in files])
try:
# TODO: Check why this doesn't work and fix it
n_meas = np.array([f[".config"].attrs["qmc.nmeas"] for f in files])
print(n_meas)
n_worm_samples = np.array([f[".config"].attrs["n_samples"] for f in files])
......@@ -65,6 +63,18 @@ try:
except Exception as e:
print("Could not read file attributes")
print(e)
try:
errors = np.array([np.array(f["standard_error_of_mean"][...])
for f in files])
except:
try:
errors = np.array([np.array(f["standard_deviation"][...])
for f in files])
dimensions = np.ones(errors.ndim, int)
dimensions[0] = errors.shape[0]
errors /= np.sqrt(np.reshape(n_worm_samples, dimensions))
except Exception as e:
print(e)
try:
samples = np.array([np.array([np.array(f["output_samples"][str(i)][...])
for i in range(n - 1)])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment