You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to process artifacts in a 1 second window and therefore, I create temporary epochs using eeg_regepoch function:
EEG = eeg_regepochs(EEG,'eventtype', 'temp', 'extractepochs', 'on', 'recurrence', 1, 'limits', [0 1]);
I find that, by doing so, I miss the first epoch (500 latency points as my Fs = 500 Hz) in the outcome.
Plot the data and leave the figure open (to later compare)
Run the function in the command line
EEG = eeg_regepochs(EEG,'eventtype', 'temp', 'extractepochs', 'on', 'recurrence', 1, 'limits', [0 1]);
Plot the data again and compare this figure with (2).
Instead of (3), if I run this function,
EEG = eeg_regepochs(EEG,'eventtype', 'temp', 'extractepochs', 'on', 'recurrence', 1, 'limits', [0.002 1]);
I get the expected behavior.
Note: 0.002 indicates the latency of my first event in the data.
#### Expected behavior:
I expect, if I have, let's say [0-40] seconds of data, I get 40 epochs of 1 second each.
#### Actual behavior:
Instead, I get 39 epochs
#### Versions
OS version
Windows 10
Matlab version
R2018b
EEGLAB version
EEG development head
Kindly close this bug if this is the intended functionality. Thanks!
The text was updated successfully, but these errors were encountered:
Hi @Velu44 ,
Can you please run the code below and let me know what do you get. The three values displayed at the end of the script must be the same and equal to the initial number of 1s segments (40 here).
Thanks,
R
% Here we will generate 40 trials of 1 sec duration (500 points)
EEG1 = eeg_regepochs(EEG,'eventtype', 'temp', 'extractepochs', 'on', 'recurrence', 1, 'limits', [0 1]);
% Here we will generate 40 trials of 0.3s duration (150 points). Notice here below that 0.5 and 0.8s is relative
% to the dummy event(temp) so trials will not contain the dummy event
EEG2 = eeg_regepochs(EEG,'eventtype', 'temp', 'extractepochs', 'on', 'recurrence', 1, 'limits', [0.5 0.8]);
Hi,
Description
I want to process artifacts in a 1 second window and therefore, I create temporary epochs using eeg_regepoch function:
EEG = eeg_regepochs(EEG,'eventtype', 'temp', 'extractepochs', 'on', 'recurrence', 1, 'limits', [0 1]);
I find that, by doing so, I miss the first epoch (500 latency points as my Fs = 500 Hz) in the outcome.
Screenshots: https://drive.google.com/drive/folders/1poMQwW_M-uhVyeDmxLNanPEoXfs51Ee7?usp=sharing
Related bug report in the past: https://sccn.ucsd.edu/pipermail/eeglablist/2017/012607.html
#### Steps to Reproduce
Load the continuous eeg data
Plot the data and leave the figure open (to later compare)
Run the function in the command line
EEG = eeg_regepochs(EEG,'eventtype', 'temp', 'extractepochs', 'on', 'recurrence', 1, 'limits', [0 1]);
Plot the data again and compare this figure with (2).
Instead of (3), if I run this function,
EEG = eeg_regepochs(EEG,'eventtype', 'temp', 'extractepochs', 'on', 'recurrence', 1, 'limits', [0.002 1]);
I get the expected behavior.
Note: 0.002 indicates the latency of my first event in the data.
#### Expected behavior: I expect, if I have, let's say [0-40] seconds of data, I get 40 epochs of 1 second each.
#### Actual behavior: Instead, I get 39 epochs
#### Versions
Kindly close this bug if this is the intended functionality. Thanks!
The text was updated successfully, but these errors were encountered: