czbiohub-sf / iohub

Pythonic and parallelizable I/O for N-dimensional imaging data with OME metadata
https://czbiohub-sf.github.io/iohub/
BSD 3-Clause "New" or "Revised" License
29 stars 7 forks source link

get the zarr dataset size with iohub info verbose #247

Open edyoshikun opened 1 week ago

edyoshikun commented 1 week ago

Request: iohub info -v /test.zarr

should output in the summary the size of the dataset in GB. output:

Reading file:    test.zarr
Zarr hierarchy:
/
 └── plate
     └── 0
         ├── 0
            └── 0 (1, 6, 97, 2048, 2048) float32
=== Summary ===
Format:                  omezarr v0.4
Axes:                    T (time); C (channel); Z (space); Y (space); X (space); 
Channel names:           ['Phase3D', 'Deconvolved-Mem', 'Deconvolved-Nuc', 'BF', 'TRITC - 554~595', 'Cy5 - 635~730']
Row names:               ['plate']
Column names:            ['0']
Wells:                   1
Positions:               12
Total Size[GB]:  ((position_shape)*num_positions*dtype_bytes)/1e-9