Skip to content

Fix VisuCoreWordType spelling for 8-bit unsigned 2dseq (_8BIT_UNSGN_INT)#38

Merged
headmeister merged 1 commit into
isi-nmr:masterfrom
gdevenyi:fix/2dseq-8bit-unsigned-wordtype
Jul 22, 2026
Merged

Fix VisuCoreWordType spelling for 8-bit unsigned 2dseq (_8BIT_UNSGN_INT)#38
headmeister merged 1 commit into
isi-nmr:masterfrom
gdevenyi:fix/2dseq-8bit-unsigned-wordtype

Conversation

@gdevenyi

@gdevenyi gdevenyi commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Problem

config/properties_2dseq_core.json selects the numpy dtype for 8-bit unsigned 2dseq data by matching VisuCoreWordType == "_8BIT_USGN_INT". That spelling is wrong — ParaVision spells the enum _8BIT_UNSGN_INT (with the N):

  • RECO_WORDTYPE in prog/include/recotyp.h: { _32BIT_SGN_INT, _16BIT_SGN_INT, _8BIT_UNSGN_INT, _32BIT_FLOAT }
  • real visu_pars files store ##$VisuCoreWordType=_8BIT_UNSGN_INT

Because the stored value never matches _8BIT_USGN_INT, no numpy_dtype branch fires, the property is never set, and Schema.__init__ raises MissingProperty("numpy_dtype") — an 8-bit-unsigned 2dseq cannot be loaded. The 2dseq numpy_dtype selection has no ACQ_sw_version gate, so the failure is version-independent and depends only on VisuCoreWordType.

Fix

Correct both occurrences (little- and big-endian branches) to _8BIT_UNSGN_INT. The signed 16/32-bit and float branches were already correct.

Public dataset that reproduces it

The MRIReco.jl Bruker test data contains a reconstruction stored as 8-bit unsigned:

  • Download (public, no login): https://media.tuhh.de/ibi/mrireco/MRIRecoTestData.tar.gz  (sha256 c5a421aab7f3ea3fb20c469704db33c17b659861d9d77dbd29e353db2d5c8fc7)
  • Inside the archive: BrukerFile/2D_FLASH/pdata/7/ — its visu_pars has ##$VisuCoreWordType=_8BIT_UNSGN_INT and ##$VisuCoreByteOrder=littleEndian.
from brukerapi.dataset import Dataset
Dataset("<extracted>/BrukerFile/2D_FLASH/pdata/7/2dseq")
# before this change: MissingProperty: numpy_dtype
# after:  loads as a uint8 array

🤖 Generated with Claude Code

The 2dseq word-type config matched `_8BIT_USGN_INT`, but ParaVision's
RECO_WORDTYPE enum (prog/include/recotyp.h) and the on-disk `VisuCoreWordType`
value are spelled `_8BIT_UNSGN_INT`. As written, an 8-bit unsigned 2dseq matches
no numpy_dtype branch, so the property is never set and loading fails with
MissingProperty.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 22, 2026 16:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@headmeister
headmeister merged commit 3d711d9 into isi-nmr:master Jul 22, 2026
8 checks passed
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.

3 participants