Repository navigation
Add OpenH-RF (zea) to UFF converter with ULMShare example - #81
Merged
Merged
Conversation
- openhrf_to_uff.m: reads zea HDF5 plane-wave acquisitions into uff.channel_data. Maps zea t0_delays/initial_times to the USTB origin-referenced plane-wave model (wave.delay = initial_times - t_origin). - openhrf_download_subset.py: streams a frame range of an OpenH-RF file from the Hugging Face Hub (Blosc) into a small gzip HDF5 that MATLAB can read. - ULMShare_openhrf_to_uff_example.m: mouse 10 / acquisition 1, buffer 50, DAS B-mode and SVD-filtered power Doppler on the ULMShare grid. Validated against zea's own DAS on the same frame (envelope correlation 0.91; 0.43 with the delay sign flipped). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ULMShare_ULM_example.m: per 400-frame buffer, USTB DAS on the GPU, SVD clutter filter, lag-1 autocorrelation and ulm.ULM radial-symmetry localization + tracking; tracks are saved per buffer (resumable) and rendered into a density map and an up/down flow map. Defaults to mouse 16, acquisition 1 (Grade A, ULMShare paper Fig. 5), buffers 50-149. - openhrf_download_subset.py: --n-files downloads consecutive buffers with the source opened once, and remote reads use an LRU block cache. The default read-ahead cache refetched a 64 MB block on every chunk-index lookup; a buffer now streams in ~20 s instead of several minutes. Outputs are written to a .partial file and renamed when complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the reverse direction of the existing USTB → OpenH-RF converter in
sandbox/OpenHRF/: reading OpenH-RF (zea HDF5) plane-wave data intouff.channel_data. Tested on the ULMShare dataset (mouse 10, acquisition 1).openhrf_to_uff.m: zea HDF5 →uff.channel_data(probe, plane-wave sequence, IQ data, metadata). Optional'frames'and'uff_file'arguments. Supports plane waves only for now and stops with an error on focused or diverging transmits.openhrf_download_subset.py: streams a frame range from the Hugging Face Hub into a small local HDF5 file. The ULMShare files are 60–370 GB each and Blosc-compressed, which MATLAB can't read without a plugin, so the subset is rewritten with gzip. One 400-frame buffer is 473 MB.ULMShare_openhrf_to_uff_example.m: DAS on the ULMShare reference grid (25 µm, F#1.4), B-mode and SVD-filtered power Doppler.README.md: new "Reading OpenH-RF data into USTB" section.Timing convention
zea stores per-element
t0_delays(min 0) andinitial_times; USTB references plane-wave delays to the wavefront crossing the origin. The converter useswave.delay = initial_times - t_origin, the same convention as@verasonics/create_cpw_channeldata.m.Validation
.uffwrite and read-back: data identical; delays differ by ~7 fs (single-precision storage).ULM example (second commit)
ULMShare_ULM_example.m: full ULM on ULMShare mouse 16, acquisition 1 (Grade A, Fig. 5 of the ULMShare paper). Per 400-frame buffer: USTB DAS on the GPU, SVD clutter filter, lag-1 autocorrelation,ulm.ULMradial-symmetry localization and tracking. Tracks are saved per buffer (resumable) and rendered into a density map and an up/down flow map. A 100-buffer run (40,000 frames, 92,559 tracks) reproduces the vascular layout of ULMShare's reference map.openhrf_download_subset.py:--n-filesdownloads consecutive buffers with the source opened once, and remote reads use an LRU block cache (the default read-ahead cache refetched a 64 MB block on every chunk-index lookup). A buffer now streams in ~20 s instead of several minutes. Outputs go to a.partialfile and are renamed when complete.Notes
h5py hdf5plugin huggingface_hub numpy.🤖 Generated with Claude Code