Skip to content

Adding functionality fo RS Rio task#6

Open
gabrielblancogomez wants to merge 7 commits intomainfrom
q1k_gabe
Open

Adding functionality fo RS Rio task#6
gabrielblancogomez wants to merge 7 commits intomainfrom
q1k_gabe

Conversation

@gabrielblancogomez
Copy link
Collaborator

@gabrielblancogomez gabrielblancogomez commented Jan 28, 2026

There are two resting state tasks in Q1K. RS which has the four abstract videos with regular DINS and the RS Rio version, which is administered to children who are unable to stay still but instead involves playing the Disney Movie Rio while EEG is recorded.

In the RS Rio task, there are two separate events which are used to denote the beginning and end of the task. "Eye open" which is added as a comment at the beginning of task using the EGI Net Station comment option and "Comment" which denotes the end.

Given that this task only has 2 "events" and it is meant to be a long recording, it is not necessary for it to undergo the DIN offset procedure. I have added lines to reflect this. Also. given that the raw files for the RS Rio paradigm also contain the word "RS", I have added an if statement to cell 7 so that these tasks can be treated separately.

@gabrielblancogomez
Copy link
Collaborator Author

gabrielblancogomez commented Feb 17, 2026

Add automated EDF to ASC conversion for eye-tracking data

Summary

This PR implements automated conversion of eye-tracking .edf files to .asc format using the eyelinkio library developed here: scott-huberty/eyelinkio#29. The conversion process integrates into the existing ET extraction workflow, processing all participant data and organizing outputs in both BIDS-compliant and non-BIDS folder structures.

Detailed Changes

Core Feature: EDF to ASC Conversion (Section 2.1)
Dual output structure: Converts files in BIDS derivative folders and copies .asc files to corresponding non-BIDS sourcedata folders which can be used later for calibration data quality and further analyses
Lookup integration: Uses the EEG-ET lookup table to map BIDS subject IDs to original Q1K IDs for proper file organization
Demographics loading: Updated REDCap path to align with notebook working directory
EEG source data: Maintained absolute project paths (/project/def-emayada/...) for consistency with cluster environment
Older code: I also kept legacy SR Research conversion function designed by James (marked as DEPRECATED) for reference. this new edf2asci conversion aligns better with open science goals

Testing Done

Verified conversion successfully processes .edf files in BIDS derivative folders
Confirmed .asc files are correctly copied to non-BIDS sourcedata structure
Validated that existing .asc files are skipped (prevents redundant processing)
Tested path resolution for subject ID mapping via lookup table

Important notes

Key addition: Cell 29 (Section 2.1) contains the new EDF-to-ASC conversion logic
Dependencies: Requires eyelinkio library (already in imports at top of notebook)
Output locations:
Primary: ../../derivatives/et_rt_analysis/sub-/ , which will be used later for eyetracking only analysses
Secondary: ../../sourcedata/
/et/{q1k_ID}/
This is part of PR #6: "Adding functionality for RS Rio task"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant