Giter Club home page Giter Club logo

ucdavis / erplab Goto Github PK

View Code? Open in Web Editor NEW
266.0 266.0 74.0 64.41 MB

ERPLAB Toolbox is a free, open-source Matlab package for analyzing ERP data. It is tightly integrated with EEGLAB Toolbox, extending EEGLAB’s capabilities to provide robust, industrial-strength tools for ERP processing, visualization, and analysis. A graphical user interface makes it easy for beginners to learn, and Matlab scripting provides enormous power for intermediate and advanced users.

Home Page: http://erpinfo.org/erplab

MATLAB 93.04% M 0.22% Mathematica 2.89% HTML 3.83% CSS 0.02% Objective-C 0.01%
cognitive-science csd eeg-data eeglab eeglab-toolbox electroencephalography erp erp-data erplab event-related-potentials matlab neuroscience

erplab's Introduction

ERPLAB Toolbox is a free, open-source Matlab package for analyzing ERP data. It is tightly integrated with EEGLAB Toolbox, extending EEGLAB’s capabilities to provide robust, industrial-strength tools for ERP processing, visualization, and analysis. We have two versions: ERPLAB Studio is a standalone package that provides an intuitive and easy-to-use graphical user interface. ERPLAB Classic is a plugin that runs inside the EEGLAB graphical user interface.

Click the Wiki icon at the top of the page for documentation, tutorials, and FAQs.

To ask questions, subscribe to the ERPLAB email list (https://erpinfo.org/erplab-email-list). Bug reports can be submitted via GitHub or by sending an email to [email protected].

ERPLAB v12.00


This download contains both ERPLAB Studio (our standalone Matlab program) and ERPLAB Classic (an EEGLAB plugin). If you are new to ERPLAB, we strongly recommend that you go through the ERPLAB Studio Tutorial or ERPLAB Classic Tutorial before trying to analyze your own data.

Click here for installation instructions.

Click here for information about required Matlab toolboxes and compatibility with different versions of Matlab, EEGLAB, Windows, MacOS, and Linux.

We encourage most users to use this latest major version.

Release Notes

ERPLAB v12.00 Release Notes

ERPLAB Studio now includes the Pattern Classification tab. This makes use of the same underlying Pattern Classification (decoding) tools as in ERPLAB Classic, but with a more user-friendly GUI. Changes also include:

  • The ability to create BESTsets in the EEG tab
  • The ability to plot multiple MVPC sets at the same time

ERPLAB v11.04 Release Notes

ERPLAB can now be accessed from two different user interfaces:

  • ERPLAB Classic (our original software, which operates as an EEGLAB plugin)
  • ERPLAB Studio (a standalone application that provides a more user-friendly GUI)

ERPLAB Studio makes use of the same underlying code as EEGLAB and ERPLAB Classic. It is essentially a different user interface for the same functions. You will therefore get identical results with ERPLAB Studio and ERPLAB Classic, and scripting is the same for both packages. But ERPLAB Studio is much easier to use.

Click here for a 2-minute video overview of ERPLAB Studio.

The most commonly used EEGLAB functions are available from within ERPLAB Studio. For example, you can import EEG data into ERPLAB Studio, filter the EEG, apply ICA for artifact correction, etc. If you need an EEGLAB function that is not implemented within ERPLAB Studio, you can apply that function using the EEGLAB GUI or a script.

If you are already familiar with ERPLAB, you can rapidly learn how to use ERPLAB Studio with our Transition Guide. If you are new to ERPLAB, please go through the ERPLAB Studio Tutorial before attempting to process your own data. Once you understand the basics of ERPLAB Studio, you can get detailed information about the individual processing steps in the ERPLAB Studio Manual.

ERPLAB v10.1 Release Notes

Now Includes: Update to decoding toolbox. By default, beta weights will no longer be saved with MVPC files, dramatically reducing file size.

MVPCset and BESTset commands will now be saved into EEG working memory history (shown when using the function eegh).

Various quality of life changes and bug fixes across ERPLAB.

ERPLAB v10.04 Release Notes

Now Includes:

ERP Decoding routine: Users can now apply multivariate-pattern classification routines to binned and epoched ERP data. See here for more information.

  • NOTE: These routines require at least MATLAB 2020a+ & EEGLAB 2023.1+ in order to work as expected.
  • NOTE: These routines also require the following toolboxes: Matlab Statistics and Machine Learning Toolbox, Matlab Parallel Processing Toolbox (recommended)

Advanced ERP Wave Viewer: Plotting ERP waveforms are easier than ever using "ERP Wave Viewer". See: ERPLAB > Plot ERPs > Advanced ERP Waveform Viewer (Beta)

ERPLABv9.20 Release Notes

Now Includes: Create Artificial Waveform Viewer routine: Users can simulate a variety of waveforms to be saved as ERP files (.erp). See documentation here.

New options for adding noise to data via EEG and ERP channel operations (see here).

Users may now shift string event codes in time in addtion to numeric event codes (see Preprocess EEG > Shift Event Codes (continuous EEG)).

Various bug fixes across ERPLAB.

ERPLAB v9.10 Release Notes

Now includes: Updated Data Quality (DQ) metrics specifications on averaged ERP waveforms, including a new metric: SD across trials.

A new DQ metric for continuous EEG: Spectral Data Quality (continuous EEG)

Various bug fixes concerning bootstrapped SMEs, filtering, and EEG channel operations.

ERPLAB v9.00 Release Notes

Note: ERPLAB v9.00 is the recommended version for use with best practices in ERP data processing and analyses as outlined in Dr. Steven J Luck's new Applied Event-Related Potential Data Analysis e-book here.

Now includes: Ability to low-pass filter prior to marking EEG segments with all artifact detection routines (data is not saved with the filter).

Ability to calculate Data Quality measures (e.g. analytic SME) on multiple binned and epoched EEGset files prior to creating ERPs. -More information about the SME can be found here. -See Applied Event-Related Potential Data Analysis e-book here for best-practices on this approach.

Various fixes to the GUI layouts for many routines (e.g. "Delete Time Segments" for EEG processing).

ERPLAB Help

ERPLAB tutorial, manual, and other documentation can be found on the ERPLAB wiki, here.

erplab's People

Contributors

ammsimmons avatar andrewxstewart avatar davidg622 avatar guanghuizhang0328 avatar inheniero avatar jasonarita avatar maffotto avatar stevenjluck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

erplab's Issues

Feature: shift events

Description

ERPLAB function to shift the time of specific event codes given by the user.

Purpose

There exists ~20 ms delay between an event code and the onset of the LCD screen. We want to correct this delay, by shifting the stimulus-event codes later in time. All other event codes not specified by the user are kept at their original timepoints.

Input

  • Continuous EEG dataset
  • List of event codes to shift
  • How much time to shift the event codes
  • Method for rounding
    • floor
    • ceiling
    • nearest
  • Warning flags for event codes that we unable to be shift (for various reasons)

Output

  • Continuous EEG dataset with the user-specified event codes shifted

Example

eventcodes = {'22', '19'};
timeshift  = 0.015;
rounding   = 'floor';
outputEEG  = erplab_shiftevents_eeg(inputEEG, eventcodes, timeshift, rounding);

Previous Research

I was wondering whether there is a possibility in eeglab to shift all
event markers by 50 ms backwards in time?

 for index = 1:length(EEG.event)
    EEG.event(index).latency = EEG.event(index).latency-0.05*srate;
end;
EEG = eeg_checkset(EEG, 'eventconsistency'); % check for out of bound events [ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET); % store dataset in ALLEEG eeglab redraw; % redraw GUI

Chris Loersch: POP_IMPORTAVG problem

Problem


Found by Chris Loersch

I'm running into what appears to be a bug in the most recent version of ERPLAB. If I go through the menus, I can import a neuroscan .avg file. When I do this, it adds a new ERPSET and I get the following output in matlab:

%Equivalent command:
ERP = pop_importavg( 'filename', 'test.avg', 'filepath', 'C:' );

If I then immediately turn around and input that exact syntax into matlab's command prompt, it throws an error and won't load the file. I included the error text at the end of the e-mail, and in the attached screenshot of the matlab output (since that's easier to read).

matlab output

Artifact detection in continuous data - pop_continuousartdet

Description

Joining artifactual segments in pop_continuousartdet produces cat Dimensions error


#### Steps to Reproduce
  1. Load continuous EEG .set
  2. Use ERPLAB to 'Process Continuous EEG' > 'Artifact rejection in continuous data' > Input values. e.g. Threshold 100, Moving window 500, Window step 250, Channels 1:128, check Join artifactual segments separated by less than - 1000ms > Accept

#### Expected behavior: join artifactual segments less than 1000ms apart
#### Actual behavior: cat Dimensions error 'Dimension of matrices being concatenated are not consistent.'
EEGLAB 12.0.2.2 ERPLAB 6.0 MATLAB 2014a
OS version Linux 2.6.32-64, Red Had Release 6.8]
Matlab version 2014a
EEGLAB version 12.0.2.2
ERPLAB version 6.0

[erplab] help with Loop script: poploadcnt function in MATLAB

Description

Michele Bechor via ucdavis.edu
to erplab, Michelle

We are trying to write an MATLAB/ERPLAB script that will batch process our ERP files, and it appears we are getting run errors with the poploadcnt function. As of now, we have drafted a script that successfully uploads CNT files, processes them as needed for our purposes, and saves them in the desired location. However, we have hit a roadblock in batch processing using a loop. In the example we used to model our script (http://erpinfo.org/erplab/erplab-documentation/scripting_4/Example1.html), a poploadset function was used, and we must use poploadcnt instead; it appears that due to this discrepancy we are struggling to elicit the program to batch-process CNT files.

Attached to this email you will find our script file, and we are happy to share other files with which we can test batch processing, should anyone have any suggestions. Attached to this email also are the 4 CNT files we are attempting to batch process with this script as a demo. Below in red is the error message we are repeatedly getting when the loop attempts to process the 4 subjects.
We are using the ANT Neuro system and collecting CNT files which we convert to Neuroscan; we then upload these Neuroscans into EEGLAB. We are using MATLAB version 2015a and EEGLAB version 13.4.4b.

Any help in editing the script to elicit the poploadcnt function would be extremely helpful!

>> A535_prototype_script_LOOP

*** Processing subject 1 (A535_Pre_ABMT_NS) ***

Attempt to execute SCRIPT varargin as a function:
C:\Program Files\MATLAB\R2015a\toolbox\matlab\lang\varargin.m

Error in A535_prototype_script_LOOP (line 13)
    cnt = loadcnt('subject.cnt',varargin);

#### Versions
OS version [fill in]
Matlab version 2015a
EEGLAB version 13.4.4b
ERPLAB version [fill in]

Continuous Artifact Detection: Scripting issue

When running POP_CONTINUOUSARTDET as a script command, the resulting EEG dataset isn't saved to a file.

Also, POP_CONTINUOUSARTDET _always_ calls the POP_EEGPLOT gui. So as a batch process, POP_CONTINUOUSARTDET doesn't automatically continue.

EEG = pop_continuousartdet( EEG ...
    , 'ampth'         , 700       ...
    , 'chanArray'   , 1:72      ...
    , 'colorseg'      , [1 1 0]   ...
    , 'forder'          , 100       ...
    , 'stepms'        , 250       ...
    , 'winms'          , 1000      ...
    , 'firstdet'         , 'off');           % NOTE: firstdet is turned OFF
EEG = pop_saveset( EEG, 'filename','test.set','filepath','.');

Cause: Currently, the only way to save the EEG dataset, is to hit the REJECT button in the EEGPLOT gui.

Recommended fix: Allow an option to bypass the call to EEGPLOT if POP_CONTINUOUSARTDET is run from a script (vs. the gui) by directly calling the EEG_EEGREJ function.

For example:

%% JFA: Added in option for skipping EEGPLOT GUI when scripting
    if(    strcmp(p.Results.History, 'gui') || strcmp(p.Results.review, 'on') )

        colormatrej = repmat(colorseg, size(WinRej,1),1);
        matrixrej   = [WinRej colormatrej chanrej];
        %         commrej     = sprintf('%s = eeg_eegrej(%s, WinRej)', inputname(1), inputname(1));
        eegplot(inputEEG.data ...
            , 'winrej'      , matrixrej     ...
            , 'srate'       , inputEEG.srate     ...
            ... %             , 'butlabel'    , 'REJECT'      ...
            ... %             , 'command'     , commrej       ...
            , 'events'      , inputEEG.event     ...
            , 'winlength'   , 10            ...
            , 'spacing'     , 100           ); % call EEGPLOT GUI


        EEG = JFAeeg_eegrej(inputEEG, WinRej);

    elseif(strcmp(p.Results.History, 'script'))   % from script

        EEG = JFAeeg_eegrej(inputEEG, WinRej);   % automatically reject found data-segments

    else       % off or none

    end

ERP Export to text

Description

When trying to Export ERP to text (universal) everything functions properly however when I open the file in excel the time goes from -1000 to -747 ms.
My epochs are -1000 to 500 (ms), I'd like to have this time represented in my excel file.
Is there a maximum export time I'm not aware of or something wrong in my process?
If this needs to be manually changed, how do I go about doing so?

As an aside, when I plot the wave forms, the correct duration from -1000 to 500ms is present.


#### Steps to Reproduce 1. Compute averaged ERPs 2. Export & Import > Export ERP to text (universal) 3. Resultant file opened in Excel
#### Versions
OS version OSX 10.11.6
Matlab version R2013a
EEGLAB version 13.5.4
ERPLAB version 4.0.3.1

Calibration

Allow the user to use a known signal to calibrate the EEG.

POP_EPOCHBIN / STR2DOUBLE Bug: ERPLAB uses a non-native version of STR2DOUBLE in POP_EPOCH/POP_EPOCHBIN

The builtin Matlab-native STR2DOUBLE command removes any commas when converting strings to doubles. Thus

str2double('1,5') ==> '15'

However, STR2DOUBLE is overwritten in the EEGLAB Biosig plugin. In this BioSig version STR2DOUBLE, commas are not removed thus

str2double('1,5') ==> '1'  '5'

ERPLAB inadvertently uses the BioSig version of STR2DOUBLE in POP_EPOCH/POP_EPOCHBIN (line 280):

               for i= 1:bb-1
                        numbin = str2double(char(strbin{i}));   <===== STR2DOUBLE
                        tf = ismember_bc2(numbin, binArray);
               ...

If the BioSig plugin isn't installed in EEGLAB then POP_EPOCH/POP_EPOCHBIN will throw the following error:

Error using pop_epoch (line 229)
pop_epoch(): empty epoch range (no epochs were found).

Error in pop_epochbin (line 313)
EEG = pop_epoch( EEG, bintype, rangtime, 'newname', EEG.setname, 'epochinfo', 'yes');

Feature request: in epoch2continuous, have artifact prompt

Occasionally, people want to take their epoched data and move it back in to continuous-looking EEG data.

The function epoch2continuous does this. But Felix mentioned that - for the moment - it seems to take all epochs, rather than just those not marked as clean of artifacts.

Suggestion:

  • Prompt user that all epochs will be included
  • Prompt user for the choice of either all epochs, or all clean epochs.

Feature: Selective EEG Channel Interpolation

Description

Selective EEG Channel Interpolation: Modified version of EEGLAB's EEG channel interpolation function eeg_interp.m to allow the user to ignore a set of electrodes for interpolating bad channels

Inputs

  • eeg_in - EEGLAB EEG data struction to interpolate
  • replace_chans - array of channels to replace via interpolation
  • ignored_chans - array of channels to ignore as input for interpolation

Outputs

  • EEGLAB EEG data structure

Example Use

eeglab;

%% Load test data set
data_filename = 'S1_Chan.set';
data_filepath = './data/';
eeg_in = pop_loadset('filename', data_filename, 'filepath', data_filepath);

%% Process data
replace_chans     = [1 2 3];                        % Replace these channels via interpolation
ignored_chans     = [4 5 6 7 8 9 10 11   14 15 16]; % Interpolate using electrodes 12 & 13
eeg_out_selective = erplab_selective_eeg_interp(eeg_in, replace_chans, ignored_chans);

WANTED: RMS & RSS thresholding feature in CONTINUOUS ARTIFACT DETECTION FOR EEG

From Steve:

So, here's what I think we should do for the updated version of CONTINUOUS . There would be 5 radio control buttons to select among the following:

  • RMS amplitude
  • Peak-to-peak amplitude
  • Positive peak amplitude
  • Negative peak amplitude
  • Positive or negative peak amplitude (i.e., take absolute value of positive and negative peaks, and use the larger of the two)

There would then be a single threshold value. It's rare that someone would want different positive and negative thresholds, and if needed this could be accomplished by running the routine twice, once looking for positive peak amplitude and once looking for negative peak amplitude.

Artifact-rejected RTs not rejected during RT export

Reported by Marianna Eddy

Marianna Eddy [email protected] to erplab
Mar 27

I'm finding that when I use the export reaction times function in ERPLAB and choose the option "Discard RTs with marker AR flags" I'm still getting RTs for trials that have been marked as rejected. When I create averaged ERPs the artifact rejected trials are not included so I know artifact trials are marked, but they don't seem to be being picked up when exporting RT. Any suggestions on how to fix this would be great.

Rick Addante-EEG.event overwrite warning window

From: Rick Addante [email protected]
Subject: question on erplab feedback
Date: March 24, 2014 at 8:50:46 PM PDT
To: Javier Lopez [email protected]

Dear Javier,

a short question:

I am scripting in ERPLab with the following command:

EEG  = pop_editeventlist( EEG , 'AlphanumericCleaning', 'on', 'BoundaryNumeric', { -99}, 'BoundaryString', { 'boundary' }, 'ExportEL', ['elistout_subj_' subj '.txt'], 'List',...
    'C:\Users\rja120030\Desktop\Bartlett ERP Data\ERPLab files\Scripts\advancedeventslist.txt', 'SendEL2', 'EEG&Text', 'UpdateEEG', 'on', 'Warning', 'off' ); % GUI: 24-Mar-2014 21:27:29

I am scripting it because I would like to automate the process, but for every iteration through a new subject (of many), it always gives a warning that "the EEG.event info will be overwrtitten by the EVENTLIST.eventinfo's" as it puts up a GUI asking for which events to use as type (I usually choose to select "Code Labels", per ERPLab's recommendation). This requires the very manual input that I was seeking to avoid in batch scripting through several subjects.

Is there something you would suggest asa work-around to prevent this? I have tried looking through the parameters for this code/command, and it does not seem to offer an "off" option that I could find successfully.

Thanks for any help that may be available.

Sincerely,

Rick

Unknown Epoching error: "no epoch info available"


Found by Mandy Wray

Emily Kappenman to me, Mandy, Steve
Apr 4
Hi Jason,

Mandy Hampton Wray, a faculty member at Michigan State University, contact me about an ERPLAB issue her lab is having that I've not encountered before. I'm hoping you might be able to help them sort this out. I've copied Mandy on this email so you can get in touch with her.

Here is how she described the issue: I was using Matlab 2014a and EEGLAB 12.0.2.6 with ERPLAB 4.0.2.3. Over break, we upgraded to Matlab 2014b, which meant my EEGLAB 12 didn't work anymore. So, I upgraded to 13.4.4b and ERPLAB 4.0.3.1 (might as well upgrade all around, right?). However, now I can't get my data to epoch, not even using the GUI. It's telling me that there is no epoch info available.

When I step through to troubleshoot, it looks like the pop_epochbin file is returning a parameter of a single cell of 0 for a parameter used in pop_epoch ('bintype'), which is then thinking there is nothing to epoch - whether I use the GUI or a script/command line to run.

>> pop_epochbin(EEG, [-100 500], 'pre')

* Detected non-binlabeled event codes: 
"" 

* Detected bin-labeled event codes: 
B1,3,7,10(51) B1,3,7,11(52) B1,3,7,9(50) B1,5,7,10(45) B1,5,7,11(46) B1,5,7,9(44) B2,4,8,12(47) B2,4,8,13(48) B2,4,8,14(49) B2,6,8,12(41) B2,6,8,13(42) B2,6,8,14(43) 

Warning: converting all event types to strings
EEG.event was updated.
Error using pop_epoch (line 229)
pop_epoch(): empty epoch range (no epochs were found).

Error in pop_epochbin (line 313)
EEG = pop_epoch( EEG, bintype, rangtime, 'newname', EEG.setname, 'epochinfo', 'yes');

Mandy Hampton Wray to Jason

Hi Jason,

Thank you so much for checking on this error! I really appreciate it!

I attached the following:

  • The script I'm running (though I get the same error message if I use the GUI to epoch)
  • An example file
  • The binlist we're using
  • A screenshot of the error

I've been running this same script (or basic script) for a long time through several versions of EEGLAB and ERPLAB and have never had major issues with it. I was able to "force" the program to epoch the data, but then I had some weird epoch numbers (1/2 again as many as normal) and the data still wouldn't average. I decided my work-around must not have been very good. :-)

After struggling with this for a while, I finally gave up and got my hands on an older version of Matlab (2014a) and went back to EEGLAB 12.0.2.5 and ERPLAB 4.0.2.3. Using those versions, this script runs perfectly and I don't have any issues. I don't know what happened with the new Matlab and the new EEGLAB/ERPLAB, but if you can figure it out, I'd love to know!

Thank you again! Please let me know if you need anything else from me!

Mandy

'Plot waveform' does not work and appeared the error message.

Hi, I'm using "erplab v13.4.4b" on MATLAB 2015a. When I trying to do 'plot waveform', the following error messages were always appeared on a MATLAB screen and could not make a plot for all channels.

screen shot 2015-11-25 at 0 07 49

As error messages pointed out, I guess the 'array size' (MATLAB's memory) is one problem. Am I right?
If so, is it possible to reduce the .erp file size? Or, is there any good way to activate 'plot waveforms'?

To solve the memory problem, I sometimes reset the MATLAB and reboot erplab, but it doesn't work...

If somebody have any good suggestions, could you please give me suggestions?

P.S.
Currently, I'm using 64ch's EEG head cap, making the data memory so heavy?

ERP Viewer 'Peak Amplitude' bug

Description

There seems to be an index exceeds matrix dimensions bug when viewing the peak amplitude measurement in the ERP Viewer tool, using the provided ERP dataset, test.erp. One characteristic of this test.erp data set is that Bin 24 has 0 trials (due to artifact rejection).

Sample datafile

test.erp.zip


#### Steps to Reproduce 1. Load provided `test.erp` dataset 2. Start ERPLAB > ERP Measurement Tool 3. Select 'Peak Amplitude' and specify a time window (e.g. 100 200) 4. Click 'Viewer' button 5. Navigate through Bins
#### Expected behavior:

No index exceeds matrix dimensions error and to show the measurement window in ERP Viewer GUI.


#### Actual behavior:

* MATLAB Command Window*

Index exceeds matrix dimensions.

Error in meaviewerGUI>mplotdata (line 1239)
                        lat4mea   = lat4mea{kbin, kch};

Error in meaviewerGUI>pushbutton_right_bin_Callback (line 458)
mplotdata(hObject, handles, ibin, ich, iset, xlim, ylim, tittle)

Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in meaviewerGUI (line 46)
        gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)meaviewerGUI('pushbutton_right_bin_Callback',hObject,eventdata,guidata(hObject))


Error using waitfor
Error while evaluating UIControl Callback

ERPLAB GUI
screen shot 2016-05-24 at 3 06 10 pm

Versions

OS version Mac OS X 10.11
Matlab version 2015a
EEGLAB version 13.5.4b
ERPLAB version 5.0.0.0]

POP_RT2TEXT Problem: RT-flags and User-defined flags do not work together

When exporting response-times using bins that have user-defined flags, POP_RT2TEXT() returns an empty text file.

For example, when using the following bin descriptor:

Bin 01
Title
.{10}{256:fb<00001>:rt<"response time">}

Even though BINLISTER correctly gathers all the trials that meet the definition, exporting the associated response-times via POP_RT2TEXT() just produces an empty text file.


Found via the Reference Experiments Scripts: Flagging double response-times

Bugfix: joinclosesegments.m

Disclaimer: I'm not using erplab in the regular way, but try to make use of the continuous artefact rejection function. In this case the error should occur always not specific to my usage. But then I don't know if erplab does something different somewhere.

In joinclosesegments.m the last line (104) is:
WinRej2(end+1,:) = WinRej(end,:); % Save/append the last rejection window

This enhances the size of the output WinRej by one, but the ChanRej is not enhanced. Thus as called in pop_continuousartefact.m

-[WinRej, chanrej ] = joinclosesegments(WinRej, chanrej, shortisisam);

  • size(WinRej)
    ans = (14, 2)
  • size(chanrej)
    ans = (13, 2 )

subsequently the function crashes because in Line 413 it tries to do:
matrixrej = [WinRej colormatrej chanrej];
which does not work if the matrices are of unequal size.

Proposed fix:
Add another line to joinclosesegments.m thus that line 104 and new 105 now say:
WinRej2(end+1,:) = WinRej(end,:); % Save/append the last rejection window
ChanRej2(end+1,:) = chanrej(end,:); % Save/append the last rejection window

EEG chanops rereferencing behaviour

Description

Felix reports an issue where EEGLAB and ERPLAB can sometimes have different behaviour for what looks like the same rereferencing action.

In a dataset with obvious 60Hz noise, re-refing to the average ref worked fine in both EEGLAB and in ERPLAB EEG Chanops, removing the excessive noise. Strangely, when re-refing to a single mastoid (or average of 2) in the ERPLAB EEG Chanops, 60Hz noise remained present.

I have the dataset and will look at this in more detail.

WenYun: pop_ploterps or pop_fig2pdf problem

WenYun [email protected] via ucdavis.edu
Apr 21 (4 days ago) to erplab

I am learning to write my script for the prepocessing of EEG data. I followed the manual on the website. It seems to me that there is a bug in either pop_ploterps or pop_fig2pdf function.

The following lines don’t work:

        if (plot_PDFs)
            pop_ploterps(ERP, [1 2], 1:17, 'Style', 'Matlab1');
            pop_fig2pdf([data_path subject_list{s} '.pdf']);
        end

This is because pop_ploterps uses 'Plotting_ERP' as the name of the tag while pop_fig2pdf uses 'ERP_figure' .

Measurement Tool Issue

When attempting to use the measurement tool to take the measure the mean amplitude between two latencies in ERPLab with Matlab 2014b, the following errors occur. Does anyone know how to resolve this please?

Mean amplitude measurement in progress...

Baseline period = 'pre' will be used for measurements

Taking measurements across ERPset #1...

Mean amplitude measurement in progress...

Output file will have extension .txt

Baseline period = 'pre' will be used for measurements

Taking measurements across ERPset #1...
Creating 1 text output file...
Error using fprintf
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in exportvaluesV2 (line 156)
fprintf(fid_values, '%s\t', binline);

Error in pop_geterpvalues (line 747)
exportvaluesV2(ERP, {A}, binArray, chanArray, fname, dig,
k+appendfile, binlabop, foutput, mlabel, lat4mea)

Error in pop_geterpvalues (line 260)
[ALLERP, Amp, Lat, erpcom] = pop_geterpvalues(ALLERP, latency, binArray,
chanArray, 'Erpsets', erpset, 'Measure',...

Error in pop_geterpvalues (line 891)
[ALLERP, Amp, Lat, erpcom] = pop_geterpvalues(ALLERP);

Error in pop_geterpvalues (line 260)
[ALLERP, Amp, Lat, erpcom] = pop_geterpvalues(ALLERP, latency, binArray,
chanArray, 'Erpsets', erpset, 'Measure',...

Error while evaluating Menu Callback

[erplab] error message

Description

from: Jean Debruille [email protected]
to: [email protected]
date: Tue, May 3, 2016 at 12:01 PM
subject: [erplab] error messaage

Hello every one,

I have a problem went want to use the function import from text (universal) I
have this error message that appears :

Operands to the || and && operators must be convertible to logical scalar
values.

Error in importerpGUI>importerpGUI_OpeningFcn (line 65)
if includetime && timeunit==1

Error in gui_mainfcn (line 221)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure),
varargin{:});

Error in importerpGUI (line 16)
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

Error in pop_importerp (line 72)
getlista = importerpGUI(def);

Error while evaluating uimenu Callback

Does some one know how to solved the problem?


#### Steps to Reproduce 1. [_First Step_] 2. [_Second Step_] 3. [_and so on..._]
#### Expected behavior:

[What you expected to happen]


#### Actual behavior:

[What actually happened]


#### Versions
OS version [fill in]
Matlab version [fill in]
EEGLAB version [fill in]
ERPLAB version [fill in]

ERPLAB/EEGLAB artifact synchronization issues

Problem

There are 2 issues here:

  1. ERPLAB > Artifact detection in epoched data > Synchronize artifact info in EEG and EVENTLIST or pop_syncroartifacts throws the following error every time it is used:
    erplab_eegscanner (line 60) error: Not enough input arguments screen shot 2015-04-17 at 4 01 24 pm

Solution: In pop_syncroartifacts (line 133) the function call to erplab_eegscanner in pop_syncroartifacts needs to be fixed so that 7 inputs are passed in instead of 6. erplab_eegscanner looks like it was recently modified so that a new 7th variable checknoevents is required as input. Also the help for erplab_eegscanner needs to be updated to account for this new input variable chcknoevents.

  1. Rejecting epoched trials marked with artifact flags via EEGLAB (ie. EEGLAB > Tools > Reject data epochs > Reject marked epochs does not update ERPLAB's EEG.EVENTLIST.trialsperbin variable, thus causing ERPLAB > Summarize artifact detection > (all) to report incorrect number of trials accepted. Currently, pop_syncroartifacts only updates the artifact flags and not the EEG.EVENTLIST.trialsperbin variable which is used when summarizing the artifact flags.

Note: Keep in mind that marking artifacts (i.e. artifact detection) and rejecting epoched trials (i.e. artifact rejection) are 2 separate steps.


Reported by Darren Tanner

Darren Tanner to erplab, Kailen, Nyssa
Apr 15

Hi all,

I have some questions about/issues with synchronizing artifact rejection/detection between EEGLAB and ERPLAB. I'll try to document what we're doing and what we've done to test this in good detail below. If anyone has advice for how to deal with the issue, please let us know.

Background:

Basically, we want to do ICA on data epochs that we've created with binlister in ERPLAB to perform blink correction. We want to hand-reject bad epochs with before running the ICA. We're doing this using the EEGLAB > Tools > Reject data epochs > Reject by inspection tool.

We have no trouble marking the epochs for rejection in EEGLAB, and we can transfer those marks to the ERPLAB event list using pop_syncroartifact (though, like previous posters have said, we had to go back to ERPLAB v4.0.2.3, since the newest version always threw us an error).

When we check the ERPLAB EventList, we see the AR flags on the correct trials, and when we summarize artifact rejection, we see the correct number of trials per condition being marked for rejection within ERPLAB.

The problem:

The problem comes when we actually go to reject the epochs in EEGLAB, prior to running the ICA (since presumably, we don't want the ICA to have the crappy epochs in the training set).

When we go to EEGLAB > Tools > Reject data epochs > Reject marked epochs, it does indeed delete the epochs we marked. But the problem is when we go back to ERPLAB: the artifact detection summary now does not recognize that we have marked any epochs for rejection. All of the trials are still listed in each bin, but it says that none have been marked for rejection.

So, say we had 180 trials in Bin1. We marked 4 for exclusion by hand in EEGLAB. We can synchronize with ERPLAB and see those 4 trials marked with an artifact flag in the EventList, and the artifact detection summary shows 176 good trials and 4 bad trials in Bin1. BUT -- after we reject the trials in EEGLAB, ERPLAB now shows 180 good trials in Bin1 in the artifact detection summary table. However, when we check the EventList, the bad trials that we had previously marked still show the artifact flags. So it's retaining the information in the EventList, but the artifact detection summary loses the data.

We want to be able to keep track of how many trials we hand-reject in each bin, so that we can report this in our manuscripts, and we want to be able to be sure that when we run artifact detection in ERPLAB after we do ICA blink correction, that the counts of bad trials in the artifact summary table is actually correct (that is, that it reflects both the trials that were hand rejected in EEGLAB and detected in ERPLAB following blink correction).

Does anyone have a suggestion/fix for this, so that we can hand-reject epochs in EEGLAB and retain the information in the ERPLAB artifact detection fields? It seems to be retaining the information in the EventList about the epochs we marked, so I'm not sure why the summary tables do not reflect this.

Thanks!
Darren


Darren Tanner, Ph.D.
Assistant Professor of Linguistics
Affiliate faculty, Program in Second Language Acquisition and Teacher Education
Affiliate faculty, Beckman Institute for Advanced Science and Technology
Affiliate faculty, Neuroscience Program
University of Illinois at Urbana-Champaign
Office: FLB 4043
Mailing: FLB 4080, MC-168
707 S. Mathews Ave.
Urbana, IL 61801
http://darrentanner.wordpress.com/

EEGLAB + ERPLAB installation: adding ERPLAB to path and to EEGLAB

Problem

EEGLAB now automatically adds the paths of all its plugins (i.e. ERPLAB) to MATLAB, which makes ERPLAB installation easier, because now all the user needs to do is add the ERPLAB folder to the EEGLAB/PLUGINS folder. That is, the user no longer needs to add ERPLAB (+subfolders) to the path since EEGLAB now automatically adds does it for all plugins.

However, EEGLAB cannot currently add ERPLAB since one of ERPLAB's default functions ERPLAB_DEFAULT_VALUES.M uses (i.e. is dependent on) the function ISRETINAD in the ERPLAB/FUNCTIONS folder which is NOT initially on MATLAB's path and thus MATLAB does not have access to it. Currently, MATLAB throws the following error that prevents ERPLAB from being installed during EEGLAB startup:

EEGLAB: error while adding plugin "eegplugin_erplab"
   Undefined function or variable 'isretinad'.

Solution

Remove the dependency on the ISRETINAD function in the ERPLAB_DEFAULT_VALUES.M. This can be done by replacing the function call to ISRETINAD, with the code from the ISRETINAD function.

All ISRETINAD does is check whether the user's computer is a retina Mac computer, and thus sets the default font-size for ERPLAB accordingly.


Originally from: Marcell Gout

Marcel Gout to [email protected]
10/31/14

Hi all,

Could someone please help me figure out why I cannot install erplab and keep getting this message?

">> eegplugin_erplab
Undefined function or variable 'isretinad'.

Error in erplab_default_values (line 12)
if isretinad==1

Error in eegplugin_erplab (line 30)
erplab_default_values % script"

As recommended on the erplab website, I'm trying to install it with version 12_01_0b of eeglab (and the version of erplab is 4.0.3.1). In addition, my Matlab version is 12_0_1_0b.

Thank you,

Marcel

Jyrki Tuomainen-Epoching error

Jyrki Tuomainen via ucdavis.edu
Apr 10 (5 days ago) to erplab

Hi,
I'm suddenly started getting an error message when I try to extract epochs after creating the bins :

Full error message:
Unfortunately, no valid bin-related codes were found.
So, you must run Binlister first.

However, Binlister (from the GUI) does not provide any error messages but I;m not sure if I should guess I should see the bin labels listed somewhere (according to Chris Blais's recent posting):

Creating a EventList structure...
Total Events (eventcodes + pauses) = 1274
Creating an EventList text file...
A new EventList file was created at C:\Users\jyrki\Desktop\EEGlab\eeglab13_0_1b\plugins\erplab_4.0.2.3\erplab_Box\eventlist_backup_7.txt
Successful Trials per bin : 111 125 500 249
pastebinlist(): EVENTLIST structure was added to the EEG structure successfuly!
EEG.EVENTLIST.eventinfo.code will replace your EEG.event.type structure.
EEG.event was updated.

I'm using Windows 7, ERPLAB 4.0.2.3, Matlab R2011a, and EEGLAB 13_0_1b. I've tried downgrading to EEGLAB 12_0_2_4b without success and tried also ERPLAB 3.0.2.1 (with EEGLAB 12).

Any help is appreciated, best wishes, -Jyrki

The binlister.txt is here:

bin 1
Hard targets (1030 Hz)
{1}.{5}{t<150-1000>31}

bin 2
Easy targets (1200 Hz)
{1}.{6}{t<150-1000>31}

bin 3
Standard with no response (correct rejection)
.{1}{t<200-1000>~31}

bin 4
Standard following targets (correct rejection)
.{2}{t<200-1000>~31}

Matlab 2014b/2015: handle.listener error

Problem

In MATLAB 2014b and above, the new graphics system is based on MATLAB® objects, which do not support the use of HANDLE.LISTENER to create event listeners. To create listeners for graphics objects, use the function ADDLISTENER.


Originally from: Matthew Walenski

Matthew Walenski [email protected] via ucdavis.edu
Apr 1
to erplab

Hi,

I am having trouble plotting averaged ERPS – when I select ERPLAB -> Plot ERP -> Plot ERP waveforms
I end up with only a single electrode, which is not labelled and there is no legend.

I get the following error message below.

I found a bug report for this issue (it appears to be the same issue) in EEGLAB, but saw no resolution there, only a reference to this mailing list.
I was unable to find/search the list archive at UC Davis, so I would appreciate any help or insight!

Best,
matt

---------error message----------
No constructor 'handle.listener' with matching signature found.

Error in neozeroaxes>plistener (line 154)
hl = handle.listener(hC, hSrc, psetact, {func, axesin});

Error in neozeroaxes (line 144)
plistener(axesin,'XLim',@xylim)

Error in ploterps (line 574)
                        neozeroaxes(1, fsaxtick, BCKGCOLOR)

Error in pop_ploterps (line 684)
ploterps(ERP, binArray, chanArray,  qpstyle, qMgfp, qBlc, qxscale, qyscale, qLineWidth, qisiy,
qFontSizeChan, qFontSizeLeg, qFontSizeTicks, qerrorstd,...

Error in pop_ploterps (line 301)
        [ERP, erpcom] = pop_ploterps(ERP, binArray, chanArray, 'AutoYlim', rAutoYlim, 'BinNum',
        rBinNum, 'Blc', blcorr,...
Error while evaluating Menu Callback

Feature: Delete breaks in continuous EEG data

Description

This is an update to the original ERPLAB function DELBIGSEG. This adds a time buffer for the event-codes surround the to-be-deleted EEG data-segment. Also, adds a feature to ignore event codes.

This includes and uses a fixed version of ERPLAB's JOINCLOSESEGMENTS due to the current bug in automatically deleting the last rejection time-window.

Inputs

Outputs

Example use

Create Artifact Viewer

Artifact Viewer

One of the key parameters that a user must set for artifact detection is the threshold.

Traditionally, this has been done by looking at a sampling of single trials and then making a guess about an appropriate threshold. it would be much easier to do this rigorously if the trials were ordered from largest to smallest according to the value returned by the artifact test. That way one could more easily find the trials that are right near the border between having an artifact and not having an artifact ( as determined by visual inspection) and figure out the best threshold.

Frequency Histogram

It might also be useful to have an option that shows a frequency histogram so that the user can see if there is a natural "break point" between trials with and without artifacts.

2014b Plot ERPs issue

Hi,

Even with the bugfix version, there seems to be problems when plotting ERPs on Matlab 2014b.
When I select ERPLAB -> Plot ERP -> Plot ERP waveforms

The following error appears:

Error using matlab.ui.Figure/get
There is no ActivePositionProperty property on the Figure class.

Error in maximize (line 119)
oldActivePositionProperty=get(h,'ActivePositionProperty'); % an undocumented figure property

Error in ploterps (line 321)
maximize(hbig) ;

Error in pop_ploterps (line 684)
ploterps(ERP, binArray, chanArray, qpstyle, qMgfp, qBlc, qxscale, qyscale, qLineWidth, qisiy, qFontSizeChan,
qFontSizeLeg, qFontSizeTicks, qerrorstd,...

Error in pop_ploterps (line 301)
[ERP, erpcom] = pop_ploterps(ERP, binArray, chanArray, 'AutoYlim', rAutoYlim, 'BinNum', rBinNum, 'Blc',
blcorr,...

Error while evaluating Menu Callback

If I uncheck "Maximize Figure", it does show a graph but with only one electrode that is not labelled and there is no legend. The follow error also shows up:

No constructor 'schema.prop' with matching signature found.

Error in neozeroaxes>plistener (line 156)
p = schema.prop(hC, 'Listeners__', 'handle vector');

Error in neozeroaxes (line 144)
plistener(axesin,'XLim',@XYLim)

Error in ploterps (line 574)
neozeroaxes(1, fsaxtick, BCKGCOLOR)

Error in pop_ploterps (line 684)
ploterps(ERP, binArray, chanArray, qpstyle, qMgfp, qBlc, qxscale, qyscale, qLineWidth, qisiy, qFontSizeChan,
qFontSizeLeg, qFontSizeTicks, qerrorstd,...

Error in pop_ploterps (line 301)
[ERP, erpcom] = pop_ploterps(ERP, binArray, chanArray, 'AutoYlim', rAutoYlim, 'BinNum', rBinNum, 'Blc',
blcorr,...

Error while evaluating Menu Callback

Thanks!

Joe

Binlister + Forbidden codes

Binlister crashes in a special case when using forbidden event code.


Example: EEG dataset + BDF-file
Running binlister with a forbidden code (-99): crashes
Running binlister without the forbidden code: no crash

EEG  = pop_binlister( EEG , 'BDF', '/ForbiddenCodeExample/bdf.ForbiddenCodeExample.txt', 'IndexEL', 1, 'SendEL2', 'EEG', 'Voutput', 'EEG' );
EEG  = pop_binlister( EEG , 'BDF', '/ForbiddenCodeExample/bdf.ForbiddenCodeExample.txt', 'IndexEL', 1, 'SendEL2', 'EEG', 'Voutput', 'EEG' , 'Forbidden', -99);


Cause. NEOBINLISTER.M - Lines 842-845 The cause of this crash is because NEOBINLISTER2.M does not assign a value to the variable ISDETECTEDLES. If there is no home item (i.e. ISHOMEFLAGDETECTED == FALSE), then ISDETECTEDLES is correctly set to 0. However, if there is a home item, then ISDETECTEDLES is not set to any value. Thus, causing BINLISTER to crash. See below.

NEOBINLISTER2.M - Line 842-845

if israngedetected && isfrbddndetected   % Codes were detected but there was a pause code 04 February 2008
...
if ~ishomeFlagdetected
     % event code did not satisfy flag condition:
     isdetectedLES = 0;
end


Fix. Inserting an else-statement to set ISDETECTEDLES fixes the BINLISTER crash.
NEOBINLISTER2.M - Line 842-845

if israngedetected && isfrbddndetected   % Codes were detected but there was a pause code 04 February 2008
...
if ~ishomeFlagdetected
     % event code did not satisfy flag condition:
     isdetectedLES = 0;
else
     isdetectedLES  = 1;  % <=== inserted code
end

Re-refrencing/Channel labeling Error

Reported by Justin Ruppel

On May 5, 2015, at 10:07 AM, Justin Ruppel [email protected] wrote:

We recently upgraded to the most recent versions of ERPLAB(4.0.3.1) and
EEGLAB (13_4_4b), and came across one important difference from the old
versions that we are still trying to make sense of.

  • We reference our data to channels 65 and 66 (EXG1 and EXG2)

  • when we plotted our ERPs, we noticed that EXG1 and EXG2 were missing,
    and that we now had EXG7 and EXG8 in our plots (which we didn't have in
    previous versions)

  • when looking at the channel list in the channel operations, it seems
    EXG1 and EXG2 were missing, and channel 65 and 66 were now labelled as
    EXG3 and EXG4. Suggesting the entire channel mapping has been changed.

  • we haven't changed anything in our pipeline, and have tested this with
    several different data sets.

    I'm unclear whether this is a simple mislabeling, a problem with
    referencing or channel mapping, or perhaps something I'm missing in the
    processing pipeline with the new version. Please forgive me, I know
    this is a fairly pedestrian question but I can't seem to find any
    solutions online and I'm not sure how to correct it.

    Any advice or referrals to people who might be able to help would be
    greatly appreciated.

Thanks!

Justin

Matlab R2016a NARGCHK warnings

Description

Currently, Matlab R2016a seems to work with ERPLAB.

But there are errors that appear at the command window.

Warning: NARGCHK will be removed in a future release. Use NARGINCHK or NARGOUTCHK instead.

In closest (line 32)
In blvalue2 (line 44)
In meaviewerGUI>mplotdata (line 1255)
In meaviewerGUI>pushbutton_right_channel_Callback (line 502)
In gui_mainfcn (line 95)
In meaviewerGUI (line 46)
In matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)meaviewerGUI('pushbutton_right_channel_Callback',hObject,eventdata,guidata(hObject))
In uiwait (line 81)
In meaviewerGUI>meaviewerGUI_OpeningFcn (line 405)
In gui_mainfcn (line 220)
In meaviewerGUI (line 44)
In pop_geterpvalues (line 878)
In pop_geterpvalues (line 263)

GrandAvg issue (update: really a BINOPER > ERP2IPSICONTRA issue)

From Chris Loersch:

I am working on trying to get a grand average made for some a lateralized component and have run into a problem. I made averages for each individual subject using the contra-ipsi assistant and can't seem to find a way to get ERPLab to create a grand average from these files.

Despite every file looking identical (made using a scripted loop; confirmed by looking at the ERP structure upon loading the files), I get the following error whenever I try to use the grand average tool to combine these files:

unnamed

AutoYlim default bug, inconsistent in GUI and script

When plotting ERPs, there was an occasional issue where setting the YScale via the GUI options could give a plot with 'AutoYLim' being off, but the equivalent script command would leave 'AutoYLim' on.

A workaround is to include this in the scripting command:

'AutoYLim', 'off' 

GUI problem when creating advanced eventlists

#GUI problem when creating advanced eventlists

The GUI cannot show all the options(shown below). But other GUIs work well. After I have reinstalled my MATLAB, it's still not working.
image 3-erplab

Thank you for your help.

OS version [Win10(64bit)]
Matlab version [2015b]
EEGLAB version [13.6.5]
ERPLAB version [v6]
GUI problem when creating advanced eventlis

Crash in grand average GUI

The Grand Averager GUI does not fail or fallback gracefully if the last-used list file no longer exists.
Deleting the memoryerp.erpm fixes the issue but also deletes all previously used settings.

Example traceback:

Invalid file identifier.  Use fopen to generate a valid file identifier.

Error in grandaveragerGUI>button_loadlist_Callback (line 597)
formcell = textscan(fid_list, '%[^\n]','CommentStyle','#', 'whitespace', '');

Error in grandaveragerGUI>grandaveragerGUI_OpeningFcn (line 157)
                button_loadlist_Callback(hObject, eventdata, handles, 1)

Error in gui_mainfcn (line 220)
    feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in grandaveragerGUI (line 45)
        [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

Error in pop_gaverager (line 111)
                answer = grandaveragerGUI(def);

Error while evaluating uimenu Callback

Error when running grand average

Description

[via email: Tara Miskovich]

I am running into some trouble trying to create a grand average for my contra and ipsi erps.

This is the error I can when I try and run. Any insight would be a big help. I can no problem when I create and contra-ipsi erp from these same erps.

pop_gaverager(): For file-List, user selected /media/LarsonDrive/NON-MRI6/EEG/studies/Danny_Attention_Shock/Scripts/oppovsame_contra_IpsiN39listTara.txt
For file-List, user selected /media/LarsonDrive/NON-MRI6/EEG/studies/Danny_Attention_Shock/Scripts/oppovsame_contra_IpsiN39listTara.txt
Loading /media/LarsonDrive/NON-MRI6/EEG/studies/Danny_Attention_Shock/4006/4006_contraIpsi_ERPs.erp...
 1) Including 4006_contraIpsi_ERPs...
{ Error using <a href="matlab:helpUtils.errorDocCallback('plus')" style="font-weight:bold"> + </a>
Matrix dimensions must agree.

Error in <a href="matlab:helpUtils.errorDocCallback('gaverager', '/media/LarsonDrive/NON-MRI6/EEG/studies/Danny_Attention_Shock/eeglab10.2.2.4a/eeglab10.2.2.4b/plugins/erplab_4.0.2.3/functions/gaverager.m', 236)" style="font-weight:bold">gaverager</a> (<a href="matlab: opentoline('/media/LarsonDrive/NON-MRI6/EEG/studies/Danny_Attention_Shock/eeglab10.2.2.4a/eeglab10.2.2.4b/plugins/erplab_4.0.2.3/functions/gaverager.m',236,0)">line 236</a>)
        naccepted = naccepted + countbinOK;                       % cumulative sum of weights: Sum(wi)

Error in <a href="matlab:helpUtils.errorDocCallback('pop_gaverager', '/media/LarsonDrive/NON-MRI6/EEG/studies/Danny_Attention_Shock/eeglab10.2.2.4a/eeglab10.2.2.4b/plugins/erplab_4.0.2.3/pop_functions/pop_gaverager.m', 295)" style="font-weight:bold">pop_gaverager</a> (<a href="matlab: opentoline('/media/LarsonDrive/NON-MRI6/EEG/studies/Danny_Attention_Shock/eeglab10.2.2.4a/eeglab10.2.2.4b/plugins/erplab_4.0.2.3/pop_functions/pop_gaverager.m',295,0)">line 295</a>)
[ERP serror msgboxText ] = gaverager(ALLERP, lista, optioni, erpset, nfile, wavg, stderror, artcrite,
exclunullbin, warn);

Error in <a href="matlab:helpUtils.errorDocCallback('pop_gaverager', '/media/LarsonDrive/NON-MRI6/EEG/studies/Danny_Attention_Shock/eeglab10.2.2.4a/eeglab10.2.2.4b/plugins/erplab_4.0.2.3/pop_functions/pop_gaverager.m', 169)" style="font-weight:bold">pop_gaverager</a> (<a href="matlab: opentoline('/media/LarsonDrive/NON-MRI6/EEG/studies/Danny_Attention_Shock/eeglab10.2.2.4a/eeglab10.2.2.4b/plugins/erplab_4.0.2.3/pop_functions/pop_gaverager.m',169,0)">line 169</a>)
                        [ERP, erpcom]  = pop_gaverager(ALLERP, 'Erpsets', erpset,'Criterion', artcrite, 'SEM',
                        stdsstr,...
}  
Error while evaluating uimenu Callback

#### Steps to Reproduce 1. [_First Step_] 2. [_Second Step_] 3. [_and so on..._]
#### Expected behavior:

[What you expected to happen]


#### Actual behavior:

[What actually happened]


#### Versions
OS version [fill in]
Matlab version [fill in]
EEGLAB version eeglab10.2.2.4b
ERPLAB version erplab_4.0.2.3

Error: JFADELETTIMESEGMENTS


From Jaclyn Farrens

subjects 45, 54, 70 and 94 the ignoreEventCodes function in the ICA_prep_P9P10 script doesn't work (line 33).

durationThreshold   = 2000;     % Remove data-segments in which event codes are greater than 2000 ms apart
eventCodeBufferMS   = 1000;      % Preserve data-segments 1000ms before and after stim-event codes 
ignoreEventCodes   = [setdiff(unique([inputEEG.event.type]), [70 80])]; %Get's list of all undesired event codes to pass to ignoreEventCodes
EEGbreaksRemoved    = JFAdeleteTimeSegment(inputEEG, durationThreshold, eventCodeBufferMS, eventCodeBufferMS, ignoreEventCodes);

It doesn't recognize the stream of eventcodes as eventcodes so it doesn't properly remove the extra time at the begining and ends of the files or the stream of standards at the beginning even though there is nothing noticeably different about these four subjects. Its the same task, same computer, same processing scripts, etc. I have included subject 85 as an example of how the function should work. You can ignore the second half of the ICA_prep script, that part works fine.

Bug with pop_syncroartifacts?

Hi,

I keep running into a problem with pop_syncroartifacts. I am trying to use this function in a script that processes datasets, but whenever I add a line, such as:

EEG = pop_syncroartifacts(EEG, 2);

... I get these errors:

Error using pop_syncroartifacts
Expected a string for the parameter name, instead the input type was 'double'.

Error in pop_syncroartifacts (line 111) p.parse(EEG, varargin{:});

Error in parse_apart_bins (line 14) EEG = pop_syncroartifacts(EEG, 2);

Strangely enough, whenever I perform the same action via the GUI (transfer EEG.reject marks to EVENTLIST), it works perfectly –– and I always see in the console that the equivalent command was the exact one that I try in my script. Any suggestions? Thanks! -s

JOINCLOSESEGMENTS deletes the last time window

The function JOINCLOSESEGMENTS automatically deletes the last rejection time-window.

For example:

>> joinclosesegments([100 200; 300 400; 500 600], [1:24; 1:24; 1:24], 1)

WARNING: Marked segments that are closer than 1 samples will be join together.

ans =

   100   200
   300   400

The correct answer should be the original array:

ans = 
[100 200
 300 400
 500 600]

Continuous artifact rejection: FIRSTDET issue

If I try to do artifact detection in continuous data through the GUI I get _106 marked segments with the GUI_ and only _4 with the script._

The parameters I use in the GUI are

  • Threshold: 700
  • Moving Window Width(ms): 1000
  • Window Step (ms): 250
  • Channels: 1:72
  • rest of the options are left blank/unchecked.

The command erplab generated for me is:

EEG = pop_continuousartdet( EEG , 'ampth',  700, 'chanArray',  1:72, 'colorseg', [ 1 1 0], 'forder',  100, 'stepms',  250, 'winms', 1000 );

If I run these two different way on the attached data file,

Synchronize behavioral RT trials with ERP trials

Add the ability to exclude trials with boundary codes in them when exporting response times to ensure RT-data is synced with ERP-data

For ERP-data, trials containing boundary codes can be filtered out, however, when exporting RT-data this cannot be done. So, basically, the same trials that go RT-data are not necessarily the same that go into ERP-data. In order, to ensure that the same trials that go into ERP analysis also go into the behavioral analysis, we need to add some kind of functionality into ERPLAB.

Algorithm
Look for a boundary code within a time-window based on the time-locked event code.

Possibilities:

  1. Add functionality within BINLISTER. Create time-condition bins that check for a boundary code before and after the time-locking event.
  2. Add functionality within EPOCHING. Check within the defined epoch-window for a boundary code
  3. Create standalone function essentially treating boundary codes as an (non-biological) artifact.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.