diff --git a/boxkit/api/_create.py b/boxkit/api/_create.py index 3b2eec73..22e19f38 100644 --- a/boxkit/api/_create.py +++ b/boxkit/api/_create.py @@ -56,6 +56,15 @@ def create_dataset(storage=None, **attributes): (self.zmax - self.zmin) / (self.nblockz * self.nzb), ] + if self.dx == 0: + self.dx = 1 + + if self.dy == 0: + self.dy = 1 + + if self.dz == 0: + self.dz = 1 + blocklist = [] for lblock in range(self.nblockx * self.nblocky * self.nblockz): diff --git a/boxkit/api/_regionprops.py b/boxkit/api/_regionprops.py index 004c59c4..29eb392f 100644 --- a/boxkit/api/_regionprops.py +++ b/boxkit/api/_regionprops.py @@ -58,8 +58,13 @@ def skimage_props_blk(block, lsetkey, labelkey): listprops = skimage_measure.regionprops(block[labelkey].astype(int)) - listprops = [ - {"area": props["area"] * block.dx * block.dy * block.dz} for props in listprops - ] + # proplist = ["area", "centroid", "equivalent_diameter_area"] + proplist = ["area"] + + # listprops = [ + # {"area": props["area"] * block.dx * block.dy * block.dz} for props in listprops + # ] + + listprops = [{key: props[key] for key in proplist} for props in listprops] return listprops diff --git a/paper/paper.md b/paper/paper.md index 16a6f6ab..5e60afa0 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -34,7 +34,7 @@ Non-Uniform Memory Access (NUMA) and distributed computing architectures. Simulation sofware instruments like Flash-X [@DUBEY2022] store output in the form of Hierarchical Data Format (HDF5) datasets. Each dataset is often gigabytes (GB) in size and requires cache efficient techniques to enable its -integration with Python packages. BoxKit datastructures act as a wrapper around +integration with Python packages. BoxKit data structures act as a wrapper around simulation output stored in HDF5 files and provide metadata for AMR blocks that describe the simulation domain. The wrapper objects are lightweight in nature and represent chunks of data stored on disk, acting as array like input for Python