Skip to content

Include PV360's CMN_study_ parameters in the subject metadata group - #218

Merged
headmeister merged 1 commit into
isi-nmr:masterfrom
gdevenyi:fix/subject-group-cmn-study
Aug 24, 2026
Merged

Include PV360's CMN_study_ parameters in the subject metadata group#218
headmeister merged 1 commit into
isi-nmr:masterfrom
gdevenyi:fix/subject-group-cmn-study

Conversation

@gdevenyi

Copy link
Copy Markdown
Contributor

Fixes #217.

"subject": (("SUBJECT_", "CMN_study_"), ()),

ParaVision 360 writes two CMN_ parameters into the study's subject file next to SUBJECT_study_operator and SUBJECT_study_instrument_position (PV360 Programming & Administration Manual §3.5.2.2): CMN_study_use_ats, whether the Animal Transport System is used for the study, and CMN_study_bed, the name of the animal bed. With the ATS in use the coordinate origin is shifted, so a reader that wants to know which frame the geometry is in has to look at CMN_study_use_ats — and metadata["subject"], and with it report(add_parameters=["subject"]), dropped both silently.

Change

CMN_study_ becomes a second prefix of the subject group; the two appear as metadata["subject"]["use_ats"] and ["bed"]. The prefix is CMN_study_ rather than CMN_ on purpose: metadata scans every loaded parameter file, not just subject, and the study-level pair is the only CMN_ content the subject file is known to carry. PV5.1 and PV6 write neither, so nothing changes for them.

Test

test_subject_group_carries_the_pv360_study_level_cmn_parameters — a synthetic study whose subject carries CMN_study_use_ats=Yes and CMN_study_bed. Fails on master. The corpus cannot show the change: the PV360 standard dataset ships no study-level subject file.

Suite: 2251 passed, 4 skipped.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NHhfFXMNZKMuPm3ppdzFXe

METADATA_GROUPS selected the content of the study's subject file by the
single prefix SUBJECT_. ParaVision 360 also writes two CMN_ parameters into
that file, and they are study-level facts like everything else there:
CMN_study_use_ats, whether the Animal Transport System is used for the
study, and CMN_study_bed, the name of the animal bed. The PV360 manual
lists both under the SUBJECT_study group, next to SUBJECT_study_operator
and SUBJECT_study_instrument_position, and the 360.3.7 standard dataset
writes CMN_study_use_ats=Yes in its subject.

CMN_study_use_ats is the one that matters downstream: with the ATS in use
the coordinate origin is shifted, so a reader that wants to know which
frame the geometry is in has to look at it. Anything keyed on the subject
group -- report(add_parameters=["subject"]) included -- dropped it silently.

Add CMN_study_ as a second prefix of the group. It is narrower than CMN_ on
purpose: metadata scans every loaded parameter file, and the study-level
pair is the only CMN_ content the subject file is known to carry. They
appear as use_ats and bed. PV5.1 and PV6 write neither, so nothing changes
for them.

Closes isi-nmr#217

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NHhfFXMNZKMuPm3ppdzFXe
@headmeister
headmeister merged commit 95a0b07 into isi-nmr:master Aug 24, 2026
7 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.

subject metadata group omits PV360's CMN_study_use_ats / CMN_study_bed

2 participants