Calculating Average Minutes from CSV file

Post Reply
aydintugbora
Posts: 6
Joined: Mon Nov 30, 2020 2:50 pm
Contact:

Calculating Average Minutes from CSV file

Post by aydintugbora »

Hello Everyone,

I'm currently trying to modify a realtime visual EEG project, so that it can also work from a CSV file, as if it's a realtime input. In the realtime version of the project I'm calculating the relative brainwave values with the incoming data. Mind Monitor values create smoother curves whereas CSV seems to include all data points. I'm assuming this is related to displaying "all data points" vs "average minutes" option in the top left corner of the online grapher and what this option does to the values. Is this the case? If so, is this also what makes the value "absolute" or not?

How do I go about obtaining smoother values out of the CSV file, as if they're coming out of Mind Monitor in realtime?

Thank you for your time!!
User avatar
James
Site Admin
Posts: 1103
Joined: Wed Jan 02, 2013 9:06 pm

Re: Calculating Average Minutes from CSV file

Post by James »

Average Minutes takes the average of each minute, so Sum(x)/Count(x).
In the online charts, uncheck "Smooth Curve" and you'll see straight lines from data point to data point.
Absolute values are the value just of a single wave. Relative values are relative to all absolute waves. So for example the relative value of Alpha will go down if Delta Absolute goes up.

Regarding getting more data points in the CSV file, go to settings and change the recording interval to "Constant". This will give you 10Hz Absolute values, and 256Hz RAW EEG. Note, this will makes you files considerably larger.
aydintugbora
Posts: 6
Joined: Mon Nov 30, 2020 2:50 pm
Contact:

Re: Calculating Average Minutes from CSV file

Post by aydintugbora »

Thank you for the quick response James!! also sorry for the confusing way in which I posed my question.

At present I have a visual system that's taking the absolute average values from Mind Monitor and calculates the relatives with Interaxon's formula I've found on these forums. I'm already happy with this part. I want to create a version of the system that functions from a CSV file instead of the OSC input. When I, for instance, want to calculate the relative alpha from the CSV file is this what I need to do?

alpha_absolute = (alpha_TP9 + alpha_AF7 + alpha_AF8 + alpha_TP10)/4
alpha_relative = (10^alpha_absolute / (10^alpha_absolute + 10^beta_absolute + 10^delta_absolute + 10^gamma_absolute + 10^theta_absolute))

or am I missing a step other than having to calculate the average absolutes for the other 4 brainwaves?
User avatar
James
Site Admin
Posts: 1103
Joined: Wed Jan 02, 2013 9:06 pm

Re: Calculating Average Minutes from CSV file

Post by James »

Looks good to me.
FYI, you can also calculate relative values per sensor. E.g. Alpha_Relative_TP9
aydintugbora
Posts: 6
Joined: Mon Nov 30, 2020 2:50 pm
Contact:

Re: Calculating Average Minutes from CSV file

Post by aydintugbora »

Thank you very much!
Post Reply