Open JojoVh opened 2 years ago
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴🏽♂️
Hello @JonathanVHoecke and thanks for getting in touch!
The issue here is that, like you said, all additional columns are kind of arbitrary – the standard allows users to name them however they like. Hence, we wouldn't really know where and how to store that info.
What I'd therefore recommend is simply using pandas
to read the information contained in this file. Would that be sufficient for your use case?
My small suggestion would be to create a new property: raw.set_scans_info( )
Could you elaborate on what you'd imagine this command to do? I thought you were only asking about reading scans.tsv
before, no?
Best wishes,
Richard
@sappelhoff Do you think we should have a property BIDSPath.scans
that returns a DataFrame
of scans.tsv
?
Edit: No, actually, it should only return a Series
or dict
with the data from the scans.tsv
line that applies to the current recording, right?
I generally agree that a consistent way to access extra columns in BIDS TSV files would be a good idea (not just, but also scans.tsv) :+1:
Perhaps BIDSPath.as_data_frame()?
Where it only works for tsv files?
Since scans.tsv
provides metadata that's specific to individual recordings, I think the BIDSPath
of an individual recording should allow easy access to those metadata (i.e., one row of scans.tsv
)
There can (and probably should) of course be a separate generic "give me $FILENAME.tsv contents` function, too
Dear mne_bids team.
I am an inexperienced user, but I found out that this has not been reported yet to the best of my knowledge: In the scans.tsv the filename and acq_time are being read in correctly. However, additional columns with (optional) recording-specific information are so far being ignored, despite this being a BIDS feature (https://bids-specification.readthedocs.io/en/stable/03-modality-agnostic-files.html#scans-file). Columns could be "medication_status", "UPDRS" or other custom-column names relevant to the experiment.
The cause of this unexpected behavior I found to be originating here:
https://mne.tools/mne-bids/stable/_modules/mne_bids/read.html
in the source code for mne_bids.read under the definition _handle_scans_reading(scans_fname, raw, bids_path) I noticed that the acq_time is extracted, but no further extractions are made.
My small suggestion would be to create a new property: raw.set_scans_info( )
Thank you very much in advance for your help Best wishes Jonathan Vanhoecke ICN lab - Charité Berlin