Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add decompressed OME-Zarr dataset size to iohub info #248

Merged
merged 7 commits into from
Nov 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions iohub/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,15 @@ def print_info(path: StrOrBytesPath, verbose=False):
print("Zarr hierarchy:")
reader.print_tree()
positions = list(reader.positions())
total_GB = len(positions) * (positions[0][1][0].nbytes) / 1e9
msgs.append(f"Positions:\t\t {len(positions)}")
msgs.append(f"Chunk size:\t\t {positions[0][1][0].chunks}")
msgs.append(f"Store Size [GB]:\t\t {total_GB:.2f}")
edyoshikun marked this conversation as resolved.
Show resolved Hide resolved
else:
total_GB = reader["0"].nbytes / 1e9
msgs.append(f"(Z, Y, X) scale (um):\t {tuple(reader.scale[2:])}")
msgs.append(f"Chunk size:\t\t {reader['0'].chunks}")
msgs.append(f"Size [GB]:\t\t {total_GB:.2f}")
if verbose:
msgs.extend(
[
Expand Down
Loading