Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 9 additions & 0 deletions boxkit/api/_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
11 changes: 8 additions & 3 deletions boxkit/api/_regionprops.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down