Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lzkelley committed Apr 13, 2024
1 parent c2a20ef commit 8fe4a62
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions holodeck/librarian/combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,6 @@ def sam_lib_combine(path_output, log, path_pspace=None, recreate=False, gwb_only

# ---- load parameter space from save file

'''
if path_pspace is None:
# look for parameter-space save files
regex = "*" + holo.librarian.PSPACE_FILE_SUFFIX # "*.pspace.npz"
files = sorted(path_output.glob(regex))
num_files = len(files)
msg = f"found {num_files} pspace.npz files in {path_output}"
log.info(msg)
if num_files != 1:
log.exception(msg)
log.exception(f"{files=}")
log.exception(f"{regex=}")
raise RuntimeError(f"{msg}")
path_pspace = files[0]
pspace = _Param_Space.from_save(path_pspace, log)
'''
if path_pspace is None:
path_pspace = path_output
pspace, pspace_fname = libraries.load_pspace_from_path(path_pspace, log=log)
Expand Down Expand Up @@ -202,6 +185,11 @@ def sam_lib_combine(path_output, log, path_pspace=None, recreate=False, gwb_only

log.warning(f"Saved to {lib_path}, size: {holo.utils.get_file_size(lib_path)}")

with h5py.File(lib_path, 'r') as h5:
assert np.all(h5['fobs_cents'][()] > 0.0)
if has_gwb:
log.info(f"Checking library file: {holo.utils.stats(gwb)=}")

return lib_path


Expand Down

0 comments on commit 8fe4a62

Please sign in to comment.