TheAxonLab / hcph-sops

SOPs of the HCPh project
https://www.axonlab.org/hcph-sops/
Creative Commons Attribution 4.0 International
0 stars 6 forks source link

Generate the `_events.tsv` files for all acquired piloting sessions with fMRI #199

Closed oesteban closed 1 year ago

oesteban commented 1 year ago

Right after I generate the first datalad version of the dataset

celprov commented 1 year ago

@oesteban is this a problem we need to solve before the data collection?

oesteban commented 1 year ago

I think so. Having task files without events is a really risky business.

celprov commented 1 year ago

@esavary @oesteban I can help with this. I'm gonna meet with Sunjae (a colleague here) tomorrow, to get a sense of how to do this. Because right now, I have zero clue. Btw this '_events.tsv' should be extracted from the psychopy tasks right? not the physiological signal (that's why I removed the physio label).

esavary commented 1 year ago

For the most recent sessions, I've been working on debugging a code to extract data from the triggers recorded in the physiological data. For sessions where we were either sending messages to the Eye Tracker (ET) without triggers or had missing trigger data in the physiological records, I can manually write the file using the messages outputted by the ET. However, the challenge lies in the first sessions, where we lack both ET messages and triggers. In such cases, extracting events from the physiopy logs for those sessions might be possible. However, the logs are somewhat cryptic, and the documentation is limited. If he is familiar with interpreting these logs, that would be very helpful.

celprov commented 1 year ago

Let me describe here precisely what we want for the events.tsv file and how I think we can find those info from the psychopy log:

As a global comment, the onset of each instance is marked by {WORD SPECIFIC TO THE TASK} : autoDraw = True, and its end is marked as {WORD SPECIFIC TO THE TASK} : autoDraw = False. The fact that 'autoDraw' is the key word that determines onset and end of task instances is supported by the observation that its timing corresponds all the time to the field {WORD SPECIFIC TO THE TASK}.started and .stopped in the csv file.

celprov commented 1 year ago

Do we have to generate an event file for the new fixation_dwi and validation tasks?

oesteban commented 1 year ago

The fixation yes, but it has the issue of the calibration scans. The validation no

On Fri, Oct 20, 2023, 20:20 celprov @.***> wrote:

Do we have to generate an event file for the new fixation_dwi and validation tasks?

— Reply to this email directly, view it on GitHub https://github.com/TheAxonLab/hcph-sops/issues/199#issuecomment-1773194718, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAESDRX6S4MOW2IGRTVFCEDYAK6GNAVCNFSM6AAAAAA5AFDMACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTGE4TINZRHA . You are receiving this because you were mentioned.Message ID: @.***>

esavary commented 1 year ago

It appears that psychopy-bids strongly recommends Python 3.8 for optimal compatibility and doesn't guarantee support for higher Python versions. I think our current environment on the Psychopy laptop is Python 3.10. What are your thoughts on downgrading to 3.8? Personally, I believe the potential benefits don't outweigh the risks of changing python version in the middle of the acquisitions. I think Céline's code can already parse events correctly.

oesteban commented 1 year ago

yeah, I was also looking at it and I'm not sure it's going to save us much time - let's drop the idea. Thanks a lot for looking into it.