Emotional Content Overrides Spatial Attention

Spatial attention is our capacity to attend to or ignore particular regions of our spatial environment. However, some classes of stimuli may be able to override our efforts to ignore them. Here we assessed the relationship between involuntary …

Jackknife intertrial coherence and phase

In my last post, I gave a brief introduction to intertrial coherence, which is a measure of how consistent oscillatory phase is across an ensemble of trials. One thing I mentioned, right at the end, was that ITC is a compound, summary statistic that doesn’t in and of itself exist on a single-trial level. This has lead several people to think about how to link it to single trial behavioural measures such as reaction time.

What is intertrial coherence?

Intertrial coherence (ITC) is a measure of how consistent oscillatory phase is across an ensemble of trials. In the schematic below, we have a sine wave of an arbitrary frequency. The amplitude of the wave is the distance between 0 and the wave at a given timepoint. So here, you can see it has a maximum of 1, indicated by the arrow. A complete cycle of of the wave is the amplitude peaking, declining to a trough, then hitting zero again.

EEG processing with Python, but in R: redux

Two years ago I wrote a post demonstrating Python pre-processing of EEG data using Python chunks in an RMarkdown document. This worked great. But something I mentioned then was that there was a package called reticulate that would allow more direct interfacing with Python in R. That package has been under a lot of development since then, as has RStudio. Plots produced in Python chunks can now be embedded in RMarkdown.

Building up an ERP

How averaging over repetitions produces an event related potential and separates signal from noise

Loading EEGLAB .set files in R - part 2

In the last post, I showed how you can get the EEG data from EEGLAB .set files saved as Matlab v7.3 files, but that there are some limitations on what else you can get from them beyond the data itself. Specifically, you can’t extract channel locations, and there are no labels to tell you which channels the data is from. This is due a limitation of the available tools for reading HDF5 files, which is the actual format of Matlab v7.

Loading EEGLAB .set files in R - part 1

Like a lot of people, I’ve been using EEGLAB and Fieldtrip for years and have a lot of data already processed using those packages. It can be a bit annoying getting the data from them - in the past I’ve converted the data to text/csv files, which is ok as far as it goes. It’s a bit of a faff getting them in the right format, and EEGLAB’s in-built export function drops useful info like epoch numbers and event codes etc.

Updating eegUtils

As mentioned in my last post, I’ve been working on a package for EEG analysis in R called eegUtils. I’d mostly been focusing on relatively simple visualization tools: topographical plots - ERP Visualization: Creating topographical scalp maps: part 1. But one thing was really bugging me - how the data gets into R in the first place. Sure, it’s nice pre-processing data in other packages - EEGLAB or MNE-Python - and then transferring the processed data across to R.