Fix PALA convert.py against current pinned zea - #29
Open
RegAItool wants to merge 1 commit into
Open
Conversation
Two runtime failures when running the example as documented: - zea.data.convert.verasonics is not imported by the parent package, so the attribute access in convert() raises AttributeError; import the submodule explicitly. - The zea scan spec now requires time_to_next_transmit with shape (n_frames, n_tx) or (n_timing_intervals,); passing a scalar raises ValueError in spec validation. Broadcast the scalar 1/PRF instead. Verified end-to-end on RF_002: convert to zea format (616.5 MB) and 800-frame DAS reconstruction via reconstruct.py both succeed. Co-Authored-By: Claude Fable 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.
Running the PALA example as documented (
uv sync, thenuv run python examples/pala-ulm-ratbrain/convert.py --download) fails at two points against thezeaversion pinned inuv.lock:AttributeError: module 'zea.data.convert' has no attribute 'verasonics'— theverasonicssubmodule is not imported by the parent package, so the attribute accesszea.data.convert.verasonics.bs100bw_to_iq(...)inconvert()fails. Fixed by importing the submodule explicitly.ValueError: In field 'scan': time_to_next_transmit has shape (), expected one of: ('n_frames', 'n_tx'), ('n_timing_intervals',)— the spec no longer accepts a scalar. Fixed by broadcasting the scalar1/PRFto an(n_frames, n_tx)float32 array.Verified end-to-end on
RF_002.hdf5(macOS arm64, JAX CPU backend): conversion writespala_sample.hdf5(616.5 MB) andreconstruct.pybeamforms all 800 frames to the expected rat-brain B-mode.Unrelated observation while reproducing, in case it's worth a follow-up: single-stream downloads from Zenodo were heavily throttled (~0.2 MB/s) and
_download_if_absenttreats any existing partial file as complete, so an interrupted download silently produces a corrupt zip on the next run. Happy to file separately.🤖 Generated with Claude Code