Skip to content

Commit

Permalink
ERPLAB v8.10
Browse files Browse the repository at this point in the history
ERPLAB v8.10

Now includes:
Standard Error bug fixed.

Warns if old standard error is used.

Default SEM transparency on ERP plots is 0.7, rather than 0

The Advanced EventList GUI is not viewable on more screens.

We warn and offer help if Signal Processing Toolbox is missing.
  • Loading branch information
andrewxstewart committed Dec 3, 2020
1 parent 17cd501 commit dddd36d
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 4 deletions.
Binary file modified GUIs/assigncodesGUI.fig
Binary file not shown.
2 changes: 1 addition & 1 deletion GUIs/ploterpGUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ function setall(hObject, eventdata, handles)
%meap = 1;
pstyle = 3; % 1 =matlab style 1; 2 =matlab style 2; 3= classic; 4= topographic
errorstd = 0; % pointer for std factor
stdalpha = 0; % transparency for plotting standard error
stdalpha = 0.7; % transparency for plotting standard error
pbox = squareplot(chanArray, hObject, eventdata, handles);
%counterbinwin = 1;
counterwin = [1 1];
Expand Down
1 change: 1 addition & 0 deletions eegplugin_erplab.m
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
set(hframe,'position', [posframe(1:2) posframe(3)*wfactor2 posframe(4)]);

menuERPLAB = findobj(fig,'tag','EEGLAB'); % At EEGLAB Main Menu
SignalProcessingToolboxCheck;



Expand Down
4 changes: 2 additions & 2 deletions erplab_default_values.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
erplabver = '8.01'; % current erplab version
erplabrel = '12-Jun-2020'; % DOB
erplabver = '8.10'; % current erplab version
erplabrel = '03-Dec-2020'; % DOB
%ColorB = [170 180 195]/255; % old background color (until version 3)
%ColorB = [0.9216 0.8353 0.6078]; % background color for version 4
%ColorB = [0.7020 0.7647 0.8392]; % background color since version 4.0.0.3
Expand Down
21 changes: 21 additions & 0 deletions functions/SignalProcessingToolboxCheck.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
% Signal Processing Toolbox check
% axs Nov 2020
function SigProcT_here = SignalProcessingToolboxCheck

% Get Toolbox list from ver
tbxs = ver;
[a, tbxs_n] = size(tbxs);
tbx_cell = cell(1,tbxs_n);
tbx_cell = {tbxs.Name};

SigProcT_here = any(ismember(tbx_cell,'Signal Processing Toolbox'));

if SigProcT_here == 0
% if the Signal Processing Toolbox is not found
warning_text = 'Matlab Signal Processing Toolbox has not been found.';
warning_text2= 'This is required for many ERPLAB functions, especially filters';
warning(warning_text)
warning(warning_text2)
disp('<a href="https://github.com/lucklab/erplab/wiki/Signal-Processing-Toolbox-in-ERPLAB">See Signal Processing Toolbox help here</a>')

end
3 changes: 2 additions & 1 deletion functions/askquestpoly.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
disp(question)
end
TXCOLOR = [1 0.9 0.3];
chill_color = [0.79 0.79 0.68];
oldcolor = get(0,'DefaultUicontrolBackgroundColor');
set(0,'DefaultUicontrolBackgroundColor', TXCOLOR)
set(0,'DefaultUicontrolBackgroundColor', chill_color)
if ~iscell(buttonscell)
error('ERPLAB says: error at askquestpoly(). Buttons name must be entered as cellstrings')
end
Expand Down
83 changes: 83 additions & 0 deletions functions/warn_old_SE_pre81.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
% Warn Old SEM in ERP
% axs Nov 2020
%
% INPUT
% shist = 1 when pop_loaderp called from GUI
% shist = 2 when pop_loaderp called from script
function warn_old_SE_pre81(gui_state)

% Argument checks
if nargin<1
gui_state = 1;
end

% check working memory
% don't warn if preference not to is already in working memory
mem = erpworkingmemory('supress_SE_warning');

if isempty(mem) == 1
% no warning pref in memory
warn_here = 1;
else
if mem == 1
% preference not to warn in memory
warn_here = 0;
else
warn_here = 1;
end
end

erplab_default_values % script
currvers = ['erplab' erplabver];

old_SEM_txt = ['', ...
'At least one of these loaded ERPsets was made in an ERPLAB version below v8.1 \n\n', ...
'This installation of ERPLAB is: ', num2str(erplabver), '\n', ...
'The Standard Error code **prior to v8.1** had a bug that has been fixed. \n', ...
'We recommend using the lastest ERPLAB, and, \n', ...
'if you plan to use the pointwise SEM, we recommend \n', ...
'remaking this ERPset using v8.1+'];

old_SEM_title = 'ERPLAB: Old ERPSET SEM, pre-v8.1';

buttons = {'See latest release';'Don’t show again';'Continue'};

if warn_here
if gui_state == 1
% if from GUI
buttonpressed = askquestpoly(sprintf(old_SEM_txt), old_SEM_title, buttons);
elseif gui_state == 2
% if from script
disp(sprintf(old_SEM_txt));
disp('To stop this warning, run:')
disp('erpworkingmemory(''supress_SE_warning'',1)');
end

which_buttonpressed = strcmp(buttonpressed,buttons);

if which_buttonpressed(1)
% See latest release requested
web('https://github.com/lucklab/erplab/releases', '-browser');

elseif which_buttonpressed(2)
% Don't show again requested

% Push 1 to erpworking memory, under name supress_SE_warning
erpworkingmemory('supress_SE_warning',1);
% clear this with erpworkingmemory('supress_SE_warning',[])

% check it saved correctly
test_check = erpworkingmemory('supress_SE_warning');
if test_check == 1
worked_text = 'This warning for old SE in loaded ERPsets will not be shown again';
disp(worked_text)
else
prob_text = 'Problem saving warning preferences. No write permission to ERPLAB folder??';
disp(prob_text)
end

% and no action on 'Continue'
end
end


10 changes: 10 additions & 0 deletions pop_functions/pop_loaderp.m
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
% ovatmenu = 0;
% end

file_ERPLAB_versions = nan(nfile,1);
%
% load ERPsets(s)
%
Expand Down Expand Up @@ -215,8 +216,11 @@
% Check (and fix) ERP structure (basic)
%
checking = checkERP(ERP);
file_ERPLAB_versions(nfile) = str2double(ERP.version);

try


if checking
if i==1 && isempty(ALLERP);
ALLERP = buildERPstruct([]);
Expand Down Expand Up @@ -318,6 +322,12 @@
% updatemenuerp(ALLERP);
% end
end
% Show warning if loading old (pre v8.1) ERPs with old SE
if any(file_ERPLAB_versions<8.1)
% if any of the attempted loaded ERPsets is version <8.1
warn_old_SE_pre81(shist)
end

% get history from script. ERP
switch shist
case 1 % from GUI
Expand Down

0 comments on commit dddd36d

Please sign in to comment.