Skip to content

feat: NDA Experimental ID from tsv#47

Open
WillForan wants to merge 2 commits into
bids-standard:masterfrom
WillForan:eid-pattern
Open

feat: NDA Experimental ID from tsv#47
WillForan wants to merge 2 commits into
bids-standard:masterfrom
WillForan:eid-pattern

Conversation

@WillForan

@WillForan WillForan commented Jul 11, 2025

Copy link
Copy Markdown
Contributor

I think the current ExperimentID in json sidecar solution is sufficient. But for our dataset, I do not want to update existing json file modification timestamps. I suspect this might be an unusual case not worth the extra code maintenance burden, but leaving here just in case. (Maybe if ExperimentID needs to be assigned to other files w/o a sidecar?)

Similar to #37, this provides a new argument --experimentid_tsv EXPERIMENTID_TSV to specify a tsv with ExperimentID and Pattern columns.

if file matches Pattern, the paired ExperimentID is added to the image03 dict.

When it exists, the JSON side car ExperimentID value is used instead of a pattern match.

Most of the changes are in their own new file bids2nda/experiment_id.py and tests in tests/test_eid.py.

The PR includes unit and integration test.
The integration test uses nibabel.data_dir / "standard.nii.gz" for input. The files has unknown for the xyzt measurement. units_dict was updated to handle this.

new argument to specify a tsv with ExperimentID and Pattern columns
if Pattern is matched, use paired ExperimentID for image03 input file
row

json side car ExperimentID value used over pattern match if it exists

includes unit and integratoin test
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.

1 participant