Skip to content

Commit a6db9f0

Browse files
committedJan 19, 2021
fix running scripts for unit testing
1 parent f172fef commit a6db9f0

File tree

3 files changed

+29
-17
lines changed

3 files changed

+29
-17
lines changed
 

‎eeglab_history.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
eeglab redraw % Update the EEGLAB window to view changes
4343

4444
[ALLEEG EEG CURRENTSET ALLCOM] = eeglab;
45-
EEG = pop_loadset( 'eeglab_data.set', '/data/matlab/eeglab/sample_data');
46-
EEG.chanlocs=pop_chanedit(EEG.chanlocs, 'load',{ '/data/matlab/eeglab/sample_data/eeglab_chan32.locs', 'filetype', 'autodetect'});
45+
EEG = pop_loadset( 'eeglab_data.set', fullfile(eeglab_path, 'sample_data'));
46+
EEG.chanlocs=pop_chanedit(EEG.chanlocs, 'load',{ fullfile(eeglab_path, 'sample_data', 'eeglab_chan32.locs'), 'filetype', 'autodetect'});
4747
EEG = pop_eegfilt( EEG, 1, 0, [], [0]);
4848
EEG = pop_reref( EEG, [], 'refstate',0);
4949
EEG.comments = pop_comments(EEG.comments,'','Dataset was highpass filtered at 1 Hz and rereferenced.',1);

‎make_eeg_movie.m

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
seemovie(Movie,-5,Colormap);
1919

2020
% save movie
21-
vidObj = VideoWriter('erpmovie2d.mp4', 'MPEG-4');
21+
if isunix && ~ismac
22+
vidObj = VideoWriter('erpmovie2d.avi', 'Uncompressed AVI');
23+
else
24+
vidObj = VideoWriter('erpmovie2d.mp4', 'MPEG-4');
25+
end
2226
open(vidObj);
2327
writeVideo(vidObj, Movie);
2428
close(vidObj);
@@ -39,13 +43,21 @@
3943
seemovie(Movie,-5,Colormap);
4044

4145
% save movie
42-
vidObj = VideoWriter('erpmovie3d1.mp4', 'MPEG-4');
46+
if isunix && ~ismac
47+
vidObj = VideoWriter('erpmovie3d1.avi', 'MPEG-4');
48+
else
49+
vidObj = VideoWriter('erpmovie3d1.mp4', 'MPEG-4');
50+
end
4351
open(vidObj);
4452
writeVideo(vidObj, Movie);
4553
close(vidObj);
4654

4755
%% Using topoplot to make movie frames
48-
vidObj = VideoWriter('erpmovietopoplot.mp4', 'MPEG-4');
56+
if isunix && ~ismac
57+
vidObj = VideoWriter('erpmovietopoplot.avi', 'Uncompressed AVI');
58+
else
59+
vidObj = VideoWriter('erpmovietopoplot.mp4', 'MPEG-4');
60+
end
4961
open(vidObj);
5062
counter = 0;
5163
for latency = -100:10:600 %-100 ms to 1000 ms with 10 time steps

‎study_script.m

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
'task', 'Auditory task: Synonyms Vs. Non-synonyms, N400',...
1313
'filename', 'N400empty.study','filepath', './',...
1414
'commands', { ...
15-
{ 'index' 1 'load' fullfile(filepath, 'S02','syn02-S253-clean.set') 'subject' 'S02' 'condition' 'synonyms' }, ...
16-
{ 'index' 2 'load' fullfile(filepath, 'S05', 'syn05-S253-clean.set') 'subject' 'S05' 'condition' 'synonyms' }, ...
17-
{ 'index' 3 'load' fullfile(filepath, 'S07', 'syn07-S253-clean.set') 'subject' 'S07' 'condition' 'synonyms' }, ...
18-
{ 'index' 4 'load' fullfile(filepath, 'S08', 'syn08-S253-clean.set') 'subject' 'S08' 'condition' 'synonyms' }, ...
19-
{ 'index' 5 'load' fullfile(filepath, 'S10', 'syn10-S253-clean.set') 'subject' 'S10' 'condition' 'synonyms' }, ...
20-
{ 'index' 6 'load' fullfile(filepath, 'S02', 'syn02-S254-clean.set') 'subject' 'S02' 'condition' 'non-synonyms' }, ...
21-
{ 'index' 7 'load' fullfile(filepath, 'S05', 'syn05-S254-clean.set') 'subject' 'S05' 'condition' 'non-synonyms' }, ...
22-
{ 'index' 8 'load' fullfile(filepath, 'S07', 'syn07-S254-clean.set') 'subject' 'S07' 'condition' 'non-synonyms' }, ...
23-
{ 'index' 9 'load' fullfile(filepath, 'S08', 'syn08-S254-clean.set') 'subject' 'S08' 'condition' 'non-synonyms' }, ...
24-
{ 'index' 10 'load' fullfile(filepath, 'S10', 'syn10-S254-clean.set') 'subject' 'S10' 'condition' 'non-synonyms' }, ...
15+
{ 'index' 1 'load' fullfile(filepath, 's02','syn02-s253-clean.set') 'subject' 'S02' 'condition' 'synonyms' }, ...
16+
{ 'index' 2 'load' fullfile(filepath, 's05', 'syn05-s253-clean.set') 'subject' 'S05' 'condition' 'synonyms' }, ...
17+
{ 'index' 3 'load' fullfile(filepath, 's07', 'syn07-s253-clean.set') 'subject' 'S07' 'condition' 'synonyms' }, ...
18+
{ 'index' 4 'load' fullfile(filepath, 's08', 'syn08-s253-clean.set') 'subject' 'S08' 'condition' 'synonyms' }, ...
19+
{ 'index' 5 'load' fullfile(filepath, 's10', 'syn10-s253-clean.set') 'subject' 'S10' 'condition' 'synonyms' }, ...
20+
{ 'index' 6 'load' fullfile(filepath, 's02', 'syn02-s254-clean.set') 'subject' 'S02' 'condition' 'non-synonyms' }, ...
21+
{ 'index' 7 'load' fullfile(filepath, 's05', 'syn05-s254-clean.set') 'subject' 'S05' 'condition' 'non-synonyms' }, ...
22+
{ 'index' 8 'load' fullfile(filepath, 's07', 'syn07-s254-clean.set') 'subject' 'S07' 'condition' 'non-synonyms' }, ...
23+
{ 'index' 9 'load' fullfile(filepath, 's08', 'syn08-s254-clean.set') 'subject' 'S08' 'condition' 'non-synonyms' }, ...
24+
{ 'index' 10 'load' fullfile(filepath, 's10', 'syn10-s254-clean.set') 'subject' 'S10' 'condition' 'non-synonyms' }, ...
2525
{ 'dipselect' 0.15 } });
2626

2727
%% update graphical interface
@@ -76,7 +76,7 @@
7676
[STUDY] = pop_clust(STUDY, ALLEEG, 'algorithm','kmeanscluster', 'clus_num', 10);
7777
[STUDY] = std_topoplot(STUDY, ALLEEG, 'clusters', 2, 'mode', 'together');
7878
[STUDY] = std_topoplot(STUDY, ALLEEG, 'clusters', 2, 'mode', 'apart');
79-
[STUDY] = std_topoplot(STUDY, ALLEEG, 'clusters', 2, 'comps', 2);
79+
[STUDY] = std_topoplot(STUDY, ALLEEG, 'clusters', 2, 'comps', 1);
8080

8181
%% Plot statistics
8282
STUDY = pop_statparams(STUDY, 'condstats', 'on');
@@ -109,4 +109,4 @@
109109
std_stat(erpdata, 'condstats', 'on', 'fieldtripmcorrect', 'cluster', 'fieldtripmethod', 'montecarlo', 'mode', 'fieldtrip')
110110
res = statcond(erpdata); size(res)
111111

112-
res = statcond(erpdata); size(res)
112+
res = statcond(erpdata); size(res)

0 commit comments

Comments
 (0)
Please sign in to comment.