Time based epoching Box
Posted: Wed Nov 08, 2023 5:02 pm
I am trying to understand how the "Time based epoching Box" works.
I use the classic MI-CSP Left vs. Right with Default parameters.
Number of trials in each class = 20
Device Sampling Frequency 125 Hz
Stimulation Based epoching
epoch duration = 4 sec
epoch offset = 0.5 sec
Time Based epoching
epoch 1 duration = 1 sec
epoch 1 intervals = 0.0625 sec
From what I understand the parameter epoch 1 intervals is the overlap?
I print the Signal output to a CSV file after each stage.
I notice that in the output of Stimulation Based epoching I get 10000 samples (4sec * 125Hz = 500 samples per trial).
500 samples * 20 = 10000 samples. So far so good.
In the output of Time Based epoching I get 135000 samples (125Hz * 1080 epochs =135000)
1080 epochs / 20 trials = 54 samples per trial
What I don't understand, however, is where this 54 comes from.
Since Stimulation epoch duration = 4 sec and epoch offset = 0.5 sec
So doesn't it mean that Time Based epoching segments each 4sec segment into 1sec chunks with an overlap of 0.0625 starting from 0.5sec to 4sec?
Start --------> End
0.5 ----------->1.5
0.5625 ------->1.5625
0.62 ---------->1.625
0.6875-------->1.6875
0.75----------->1.75
0.8125-------->1.8125
0.875---------->1.875
0.9375--------->1.9375
1---------------> 2
1.0625--------> 2.0625
1.125---------->2.125
1.1875--------> 2.1875
1.25 ---------> 2.25
1.3125--------> 2.3125
1.375----------> 2.375
1.4375---------> 2.4375
1.5 ------------> 2.5
1.5625----------> 2.5625
1.625----------> 2.625
1.6875 --------> 2.6875
1.75 -----------> 2.75
1.8125-----------> 2.8125
1.875-----------> 2.875
1.9375-----------> 2.9375
2-----------------> 3
2.0625----------->3.0625
2.125-----------> 3.125
2.1875-----------> 3.1875
2.25 -----------> 3.25
2.3125-----------> 3.3125
2.375-----------> 3.375
2.4375----------->3.4375
2.5 ----------->3.5
2.5625-----------> 3.5625
2.625----------->3.625
2.6875-----------> 3.6875
2.75 -----------> 3.75
2.812-----------> 3.8125
2.875-----------> 3.875
2.9375--------> 3.9375
3------------------> 4
This would give 41 samples per trial and not 54 but the console says 1080 epochs which means that it is indeed 54 samples (1080 epochs / 20 trials = 54 samples per trial)
Can someone explain to me how the 54 samples are obtained after Time based epoching?
I use the classic MI-CSP Left vs. Right with Default parameters.
Number of trials in each class = 20
Device Sampling Frequency 125 Hz
Stimulation Based epoching
epoch duration = 4 sec
epoch offset = 0.5 sec
Time Based epoching
epoch 1 duration = 1 sec
epoch 1 intervals = 0.0625 sec
From what I understand the parameter epoch 1 intervals is the overlap?
I print the Signal output to a CSV file after each stage.
I notice that in the output of Stimulation Based epoching I get 10000 samples (4sec * 125Hz = 500 samples per trial).
500 samples * 20 = 10000 samples. So far so good.
In the output of Time Based epoching I get 135000 samples (125Hz * 1080 epochs =135000)
1080 epochs / 20 trials = 54 samples per trial
What I don't understand, however, is where this 54 comes from.
Since Stimulation epoch duration = 4 sec and epoch offset = 0.5 sec
So doesn't it mean that Time Based epoching segments each 4sec segment into 1sec chunks with an overlap of 0.0625 starting from 0.5sec to 4sec?
Start --------> End
0.5 ----------->1.5
0.5625 ------->1.5625
0.62 ---------->1.625
0.6875-------->1.6875
0.75----------->1.75
0.8125-------->1.8125
0.875---------->1.875
0.9375--------->1.9375
1---------------> 2
1.0625--------> 2.0625
1.125---------->2.125
1.1875--------> 2.1875
1.25 ---------> 2.25
1.3125--------> 2.3125
1.375----------> 2.375
1.4375---------> 2.4375
1.5 ------------> 2.5
1.5625----------> 2.5625
1.625----------> 2.625
1.6875 --------> 2.6875
1.75 -----------> 2.75
1.8125-----------> 2.8125
1.875-----------> 2.875
1.9375-----------> 2.9375
2-----------------> 3
2.0625----------->3.0625
2.125-----------> 3.125
2.1875-----------> 3.1875
2.25 -----------> 3.25
2.3125-----------> 3.3125
2.375-----------> 3.375
2.4375----------->3.4375
2.5 ----------->3.5
2.5625-----------> 3.5625
2.625----------->3.625
2.6875-----------> 3.6875
2.75 -----------> 3.75
2.812-----------> 3.8125
2.875-----------> 3.875
2.9375--------> 3.9375
3------------------> 4
This would give 41 samples per trial and not 54 but the console says 1080 epochs which means that it is indeed 54 samples (1080 epochs / 20 trials = 54 samples per trial)
Can someone explain to me how the 54 samples are obtained after Time based epoching?