MabbottLab / MEGneto

MEG pipeline for Mabbott Lab data processing.
GNU General Public License v3.0
0 stars 0 forks source link

Tweak pipeline for resting state #118

Closed j-tseng closed 3 years ago

j-tseng commented 3 years ago

Need to set up epoching for segmenting into trials without any particular t0marker.

j-tseng commented 3 years ago

In Sonya's branch, there's a version of fcp_1 specific for resting state epoching. Can you just verify that this works as expected (e.g., trl looks normal, compatible with the rest of the "task" pipeline?).

j-tseng commented 3 years ago

Figured out the root issue - in the artifact detection parameters, all of the padding options (trlpadding, fltpadding, artpadding) have to be set to 0. Using the FieldTrip artifact detection functions on the data_RAW_EPOCHED struct format triggers an auto-detection of this violation, and sets these options to 0. However, using the FieldTrip artifact detection function on the data_epoched version of the struct does not trigger this problem, resulting in an error that says you can't start from negative time.

We can use the same approach as in fcp_1_TaskEpoching.m, and use an if/else to swap between epoching with a marker vs. without a marker. We just also need an if/else statement near the artifact rejection part that sets those padding parameters to 0, to make sure we don't hit this issue.

j-tseng commented 3 years ago

Need to check if those padding options are also set to 0 when it's a task dataset. Check for warnings in the Command Window when at that portion.

j-tseng commented 3 years ago

Also need to update the name of fcp_1 to general epoching, not taskepoching if it'll include both.

j-tseng commented 3 years ago

@dunjamatic - I made changes directly to fcp_1_TaskEpoching - can you test that it works, as well as with subsequent components of the pipeline? Thanks!

j-tseng commented 3 years ago

Should be done... Will re-open if we encounter any bugs or need to fix anything else.