Skip to content

Issue with epoch end (sec) when splitting continuous recording using eeg_regepochs #242

@Jazelle759

Description

@Jazelle759

Description

I am not too sure if this is an issue or I misunderstood how to use eeg_regepochs.

After applying average reference to my continuous data, the epoch start (sec) is 0 and epoch end (sec) is 432.660.
I wanted to split the data into 10 seconds epochs so I tried using eeg_regepochs to split it.
I was hoping it will be divided into 43 epochs with each epoch start to be 0 and end to be 10.
It did get divided into 43 epochs with start of 0 but the epoch end was 0.996 instead of anywhere near 10 secs which seemed odd.

Screenshot links
before_epoch_screenshot
after_epoch_screenshot

I've uploaded the dataset I tried using eeg_regepochs on. Steps has been applied until average reference step using the code below before saving.
Example Dataset


#### Steps to Reproduce
  1. Downsample data to 250
    EEG = pop_resample( EEG, 250);

  2. Bandpass filter using IIR Butterworth filter in ERPLAB (1-30)
    EEG = pop_basicfilter( EEG, 1:128 , 'Boundary', 'boundary', 'Cutoff', [ 1 30], 'Design', 'butter', 'Filter', 'bandpass', 'Order', 2 );

  3. Add channel locations
    EEG = pop_chanedit(EEG, 'load',{'\GSN-HydroCel-129.sfp' 'filetype' 'autodetect'},'changefield',{132 'datachan' 0},'setref',{'1:130' 'Cz'});

  4. Apply average reference
    EEG = pop_reref( EEG, [],'refloc',struct('labels',{'Cz'},'Y',{0},'X',{5.4492e-16},'Z',{8.8992},'sph_theta',{0},'sph_phi',{90},'sph_radius',{8.8992},'theta',{0},'radius',{0},'type',{''},'ref',{''},'urchan',{132},'datachan',{0}));

  5. Create epochs of 10 seconds each
    EEG = eeg_regepochs(EEG, 'recurrence', 10.0, 'rmbase', NaN);


#### Expected behavior: Epoch end (sec) to be 10
#### Actual behavior: Epoch end (sec) 0.996
#### Versions
OS version Windows Server 2016 Standard
Matlab version 9.5.0.1033004/R2018b
EEGLAB version v2020.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions