Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] bring back static reseed in cfg from CPP_PTB #111

Merged
merged 1 commit into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/CPP_PTB
2 changes: 2 additions & 0 deletions subfun/defaults/checkParameters.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
%% Visual Stimulation
fieldsToSet.dot = cppPtbDefaults('dot');
fieldsToSet.dot.color = fieldsToSet.color.white;
% Static dots should change position at each event or not
fieldsToSet.staticReSeed = true;

%% Task(s)

Expand Down
Binary file modified tests/data/config_MT.mat
Binary file not shown.
Binary file modified tests/data/config_MT_MST.mat
Binary file not shown.
12 changes: 7 additions & 5 deletions tests/test_checkParameters.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ function test_checkParameters_MT()
% prepare expected results
cfg = removeDirFieldForGithubAction(cfg);

fileToLoad = fullfile(fileparts(mfilename('fullpath')), 'data', 'config_MT.mat');
% uncomment for update default config .mat
% expected = cfg;
% save(fullfile(fileparts(mfilename('fullpath')), 'data', 'config_MT.mat'), 'expected');
load(fullfile(fileparts(mfilename('fullpath')), 'data', 'config_MT.mat'), 'expected');
% expected = cfg;
% save(fileToLoad, 'expected');
load(fileToLoad, 'expected');

% test
checkAllFields(cfg, expected);
Expand All @@ -131,10 +132,11 @@ function test_checkParameters_MT_MST()
% prepare expected results
cfg = removeDirFieldForGithubAction(cfg);

fileToLoad = fullfile(fileparts(mfilename('fullpath')), 'data', 'config_MT_MST.mat');
% uncomment for update default config .mat
% expected = cfg;
% save(fullfile(fileparts(mfilename('fullpath')), 'data', 'config_MT_MST.mat'), 'expected');
load(fullfile(fileparts(mfilename('fullpath')), 'data', 'config_MT_MST.mat'), 'expected');
% save(fileToLoad, 'expected');
load(fileToLoad, 'expected');

% test
checkAllFields(cfg, expected);
Expand Down