Skip to content
Snippets Groups Projects
Commit cf219033 authored by Gröne, Tjark Leon Raphael's avatar Gröne, Tjark Leon Raphael
Browse files

Update file maxwell_integrate_to_h5.py

parent eee0de89
No related branches found
No related tags found
No related merge requests found
......@@ -102,6 +102,7 @@ def integrate_ims_in_dir(path_im, path_int, dtype_im=".tif", dtype_int=".dat"):
for fname_im in subdir_fnames:
pool.apply_async(integration_thread, (fname_im, subdir_path_int))
print(f"Integrating {fname_im}.")
pool.close()
pool.join()
......@@ -112,6 +113,7 @@ def integrate_ims_in_dir(path_im, path_int, dtype_im=".tif", dtype_int=".dat"):
subdir_name = os.path.basename(os.path.normpath(subdir_path_int))
results_df.to_csv(os.path.join(subdir_path_int, f"{subdir_name}.csv"), index=False)
results_df.to_hdf(os.path.join(subdir_path_int, f"{subdir_name}.h5"), key='data', mode='w')
print(f"Results for subdirectory {subdir_name} saved to CSV and HDF5 files.")
del results_df
else:
print(f"No images were integrated in subdirectory {subdir}. No results DataFrame created.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment