Closed nbeliy closed 7 months ago
We can just check if
entity
matches withses
(orsub
, if there no session), and if it is, then modality is found. If not, the file in question is not inside the BIDS dataset.
that sounds like a reasonable assumption to make
I would also potentially add an extra check when 'use_schema', true
is used to check that the found modality matches one of those allowed in bids
feel free to open a PR if you have the bandwidth
Will do)
Is there an existing issue for this?
New feature
So far, the modality is the only field which is not retrieved by
bids.File
, which can cause difficulties in file names manipulations, for ex. when I want to cite a source file in derived one:the modality is missing and must be set manually.
As the way to retrieve modality, it can be done by analyzing
p.path
:We can just check if
entity
matches withses
(orsub
, if there no session), and if it is, then modality is found. If not, the file in question is not inside the BIDS dataset.