Presentation log conversion to BIDS

Dear community,
we are working with fMRI experiments using the presentation software of neurobehavioral systems for the stimulus presentation. We would like to convert the presentation log file to the BIDS format.
I would like to ask you whether you have a suitable automatized python- or shell-based solution for this conversion?
Best and thanks for the help,
Christian

2 Likes

Hey,

Was actually thinking about this last week.
Not aware of anything like this but in python but I know that fieldtrip can do some of that in matlab.

https://www.fieldtriptoolbox.org/getting_started/bids/#writing-data-to-a-bids-dataset
https://www.fieldtriptoolbox.org/example/bids_behavioral/#presentation-log-files

I have not tested it though.

Hi Christian,

In this notebook, there is a function (get_timings) that I wrote to parse timings from the logs. Part of the function is specific to my task, but removing a few things and changing some variables should do the job just fine. Let me know if you have any issues with it.

Best
Andrea

1 Like

Dear Andrea, dear Remi-Gau,
thanks a lot for your help!
Best wishes
Christian

1 Like

Hi @christian.schmitz

would you mind sharing your code with us? We wonder if you came up with a generic function that can handle the commonly used CIMH-paradigms?

Cheers,

Hannes

Hi all,

earlier this year I had a chat with @costantinoai who kindly adapted his scripts for my purposes (an fMRI study with multiple subjects and two runs/tasks).

I have adapted it further and share here the version which worked for me: helenahartmann/Presentation_Logfiles_to_BIDS · GitHub :slight_smile: The script loops through many subjects and two log files/tasks and extracts all the events that I need. Importantly, this is very specific to my study and might have to be adapted further to fit your needs. I adapted only the Matlabfile and left the Python file untouched, as Andrea sent it to me. The Pythonfile doesn’t yet save any data.

Hope it helps someone else!

Best,
Helena

1 Like