Frontal alpha asymetry

Hello, I am trying to calculate the frontal asymmetry of alpha for the F3 and F4 electrodes. To do this, I have calculated the PSD using this code:

psd = raw.compute_psd(method="welch", fmin=5, fmax=18, picks="eeg")

with fmin set to 8 and fmax set to 13 to select the alpha frequency bands (I’m not sure if this is the correct way).
Then, I have selected the F3 and F4 channels using this code:

    F3 = psd.copy().pick_channels(['F3'])
    F4 = psd.copy().pick_channels(['F4'])

Then, I have seen in different studies that they use different ways to calculate it:

        1. FAAln: ln(F4) - ln(F3)
        2. FAAratio: (F4 - F3)/(F3 + F4)
        3. FAAlnratio: (ln(F4) - ln(F3))/(ln(F3) + ln(F4))
        4. FAAlnrel: ln(rel(F4)) - ln(rel(F3))

But I am interested in using this formula (F4 - F3)/(F3 + F4). In the end, my code would look like this:

raw = mne.io.read_raw_fif(fif_path)
psd = raw.compute_psd(method="welch", fmin=5, fmax=18, picks="eeg")
F3 = psd.copy().pick_channels(['F3'])
F4 = psd.copy().pick_channels(['F4'])

Now I don’t know how to proceed to arrive to this final step “Faa_ratio = (F4 - F3)/(F3 + F4)”. Does anyone know any tutorial or example of how to do it? According to what I have seen in some studies, they have calculated the relative band power, but how is it done? Can someone help me?

Hi @rbn13,

I think you’ll need to extract the underlying data using the get_data method, which will return a numpy Array, and then do your calculations from there. For example to add to your code:

raw = mne.io.read_raw_fif(fif_path)
psd = raw.compute_psd(method="welch", fmin=5, fmax=18, picks="eeg")
F3 = psd.copy().pick_channels(['F3'])
F4 = psd.copy().pick_channels(['F4'])
F3_data = F3.get_data() # numpy array
F4_data = F4.get_data() # numpy array

Then you can use the returned numpy arrays for your asymetry calculations.

1 Like

Thanks for your response @scott-huberty. With the code you have provided, I can extract an array with the data from the chosen channel. But now what I am looking for is to know how to calculate the FFA. I’m not sure if I should first calculate the “relative band power” and how to do it, and what steps to follow, or if it would be enough to calculate the averages of the arrays for each channel and apply one of the mentioned formulas. What would be the correct steps to calculate the FFA?

Hi @rbn13

Relative power is basically a ratio score of the power in your band of interest divided by the power in the entire frequency range of your PSD. For example in your case it would allow you to estimate the percentage of the power spectrum that is accounted for by the alpha band.

Whether you should use relative or absolute power is dependent on your research question and study, i.e. there’s no one right answer. For example, if there is a wide age range across your participants, some may argue for the use of relative power, because head size etc can affect the measurement absolute power - the argument being that using relative power normalizes the measurement for each participant and makes it more comparable across subjects. But I am just sharing with you arguments that I’ve heard in the field, not telling you a hard and fast rule.

Anyways, in your code you only calculate power for (what you define as) your alpha band: psd = raw.compute_psd(method="welch", fmin=5, fmax=18, picks="eeg"), so you cannot calculate relative power. If you want to calculate relative power you’ll need to change your code a bit. something like:

psd = raw.compute_psd(method="welch", fmin=1, fmax=50, picks="eeg")
alpha_mask = ((psd.freqs >= 8) & (psd.freqs <= 13))

F3 = psd.copy().pick(['F3'])
F4 = psd.copy().pick(['F4'])

F3_data_total = F3.get_data().squeeze() # numpy array
F4_data_total = F4.get_data().squeeze() # numpy array

F3_data_alpha = F3_data_total[alpha_mask].mean()
F4_data_alpha = F4_data_total[alpha_mask].mean()

F3_rel_alpha = F3_data_alpha / F3_data_total.mean()
F4_rel_alpha = F4_data_alpha / F4_data_total.mean()

# compute asymetry 
# ...

Above we define a total psd range of interest (this range can be changed depending on your research question) and calculate the psd. Then we limit the psd to the alpha range and calculate relative power for each sensor.

Again this is probably a matter of some debate, as you shared above, there seem to be multiple suggested metrics for this. I’ve never conducted alpha asymmetry analyses so don’t have a strong/informed opinion, but hopefully there is some analytical flexibility in the method you use (i.e. hopefully they would produce similar results). If I were you I’d take a look at the literature, and compare the results of the different suggested calculations and go from there.

Hope this helps!

Scott

1 Like

Thanks for share your knowledge! Your answer has been very usefull for me.