Include PV360's CMN_study_ parameters in the subject metadata group - #218
Merged
Merged
Conversation
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
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.
Fixes #217.
ParaVision 360 writes two
CMN_parameters into the study'ssubjectfile next toSUBJECT_study_operatorandSUBJECT_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, andCMN_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 atCMN_study_use_ats— andmetadata["subject"], and with itreport(add_parameters=["subject"]), dropped both silently.Change
CMN_study_becomes a second prefix of thesubjectgroup; the two appear asmetadata["subject"]["use_ats"]and["bed"]. The prefix isCMN_study_rather thanCMN_on purpose:metadatascans every loaded parameter file, not justsubject, and the study-level pair is the onlyCMN_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 whosesubjectcarriesCMN_study_use_ats=YesandCMN_study_bed. Fails on master. The corpus cannot show the change: the PV360 standard dataset ships no study-levelsubjectfile.Suite: 2251 passed, 4 skipped.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NHhfFXMNZKMuPm3ppdzFXe