I have an BIDS compatible dataset, which I want to load using BIDSPath.
bids_path = BIDSPath(subject=subject_id,session="01", task='act', run=1,
This is the example naming for the files within the dataset:
Note there, that for run the 1 is specified. As in my code above I have specified run=1, so theoretically it should work. However mne-bids seems to add an automatic-zero padding for the run number and expects:
Now my questions is whether I have to rename all data within the dataset or do the filename encoding by myself. Or maybe there is an option were I can disable the zero padding.
Hello @carlo711 and welcome to the forum!
To me this seems like a problem we need to fix in MNE-BIDS. I don’t think there’s currently a workaround to avoid this problem, sorry.
You definitely shouldn’t have to rename your files.
yes, if we can replicate this issue, we should fix it! Could you please open an issue on the GitHub repo @carlo711?
just a thought, maybe specifying
run as a str works:
part of the reported behavior is also documented, see: https://github.com/mne-tools/mne-bids/blob/781fc577dc0da0419f7eb5c40d537b51834cb802/mne_bids/path.py#L879-L880
Thank you the method with as string worked
However I got the issue
Please use HDF reader for matlab v7.3 files, e.g. h5py
I resolved it by installing
pip install mat73
pip install pymatreader