You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From §6.2 ("Genuine functional gaps") of a format-conformance review against FILE_FORMAT.md.
The gap
grep -r "ACQ_grad_matrix\|ACQ_GradientMatrix\|ACQ_patient_pos\|ACQ_slice_offset\|ACQ_read_offset\|ACQ_phase1_offset" brukerapi/
returns nothing. A fid or rawdata.jobN dataset therefore has no geometry
of any kind: raw k-space cannot be related to anatomy without re-parsing acqp by hand, even though every parameter needed is right there. §12's
PV5/PV6-vs-PV360 distinction is not modelled either.
With #156 a reconstructed 2dseq has a spec-correct patient-frame affine; the
acquisition side has nothing equivalent.
Proposal
Add an acquisition-side geometry derivation, mirroring the 2dseq one:
Gradient → magnet.ACQ_grad_matrix[i] is a 3×3 per object, read in
C-order (the review confirmed the order: orthonormality error 2.2e-16 in
C-order vs 0.994 in F-order). PV360 writes ACQ_GradientMatrix, which §12
says maps gradient → magnet directly.
Offsets and spacing.ACQ_slice_offset / ACQ_read_offset / ACQ_phase1_offset / ACQ_phase2_offset give the object centre; ACQ_slice_sepn / ACQ_slice_thick and ACQ_fov give spacing and extent.
API.Dataset.acquisition_affine(object=0) and Dataset.acquisition_affines() on fid/rawdata, returning the same
Visu/DICOM patient frame the 2dseq affine uses, so the two are directly
comparable. Objects are ordered by ACQ_obj_order exactly as the data is.
Acceptance test
For every experiment that also has a reconstruction, the derived first-voxel
position of object k should reproduce VisuCorePosition[k] of the matching 2dseq to within a fraction of a voxel. The review corpus offers ~1,400
fid/2dseq pairs, so this is checkable at scale rather than by inspection, and it
is the same oracle #156 was validated against.
Happy to take this on if the direction looks right.
From §6.2 ("Genuine functional gaps") of a format-conformance review against
FILE_FORMAT.md.The gap
grep -r "ACQ_grad_matrix\|ACQ_GradientMatrix\|ACQ_patient_pos\|ACQ_slice_offset\|ACQ_read_offset\|ACQ_phase1_offset" brukerapi/returns nothing. A
fidorrawdata.jobNdataset therefore has no geometryof any kind: raw k-space cannot be related to anatomy without re-parsing
acqpby hand, even though every parameter needed is right there. §12'sPV5/PV6-vs-PV360 distinction is not modelled either.
With #156 a reconstructed
2dseqhas a spec-correct patient-frame affine; theacquisition side has nothing equivalent.
Proposal
Add an acquisition-side geometry derivation, mirroring the
2dseqone:ACQ_grad_matrix[i]is a 3×3 per object, read inC-order (the review confirmed the order: orthonormality error 2.2e-16 in
C-order vs 0.994 in F-order). PV360 writes
ACQ_GradientMatrix, which §12says maps gradient → magnet directly.
ACQ_patient_posnegates and exchangesgradient axes (§12 spells out each case;
Foot_Supineis the identity).This stage must not be applied to PV360 — the
pv_versionpropertyadded in Fix the API surface: metadata groups, reports, CLI options, version gates (A5-A9, D9, D10, R7, R9, J6, J7) #164 makes that switch cheap.
ACQ_slice_offset/ACQ_read_offset/ACQ_phase1_offset/ACQ_phase2_offsetgive the object centre;ACQ_slice_sepn/ACQ_slice_thickandACQ_fovgive spacing and extent.Dataset.acquisition_affine(object=0)andDataset.acquisition_affines()onfid/rawdata, returning the sameVisu/DICOM patient frame the
2dseqaffine uses, so the two are directlycomparable. Objects are ordered by
ACQ_obj_orderexactly as the data is.Acceptance test
For every experiment that also has a reconstruction, the derived first-voxel
position of object k should reproduce
VisuCorePosition[k]of the matching2dseqto within a fraction of a voxel. The review corpus offers ~1,400fid/2dseq pairs, so this is checkable at scale rather than by inspection, and it
is the same oracle #156 was validated against.
Happy to take this on if the direction looks right.