Skip to content

HDF5 state format v0.2 - #55

Open
hexane360 wants to merge 8 commits into
developfrom
new-state
Open

HDF5 state format v0.2#55
hexane360 wants to merge 8 commits into
developfrom
new-state

Conversation

@hexane360

Copy link
Copy Markdown
Owner

Adds new features to HDF5 state format, including probe and object type (in support of parameterized probe/object) as well as probe, object, and scan metadata. This change is backwards compatible (can open old HDF5 states with new phaser) but not forwards compatible (can't open new HDF5 states with old phaser).

Comment thread phaser/hooks/__init__.py
@@ -118,34 +125,34 @@ class RandomObjectProps(Dataclass):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future? When reconstruction runs on a CUDA-backed array module and drop_nans removes at least one raster pattern, mask is a device array while scan_meta['raster_rows'] and raster_cols are NumPy arrays. Indexing those arrays with ~mask attempts to convert the device mask to NumPy and fails (for example, PyTorch reports that CUDA tensors cannot be converted directly), so NaN filtering breaks on GPU raster scans. Convert the mask to a host NumPy boolean array for the metadata indexing while retaining the backend mask for scan and pattern arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants