Skip to content

Commit 63b5abb

Browse files
committed
comment if / else block in setSpeedTargets and add a TODO
1 parent 35d695b commit 63b5abb

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

subfun/design/setSpeedTargets.m

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
function speeds = setSpeedTargets(cfg)
2-
% If selected as task, it omputes the matrix with the speeds set in
2+
%
3+
% USAGE::
4+
%
5+
% speeds = setSpeedTargets(cfg)
6+
%
7+
% If selected as task, it computes the matrix with the speeds set in
38
% ``cfg.dot.speed`` (computed in pixels per frame) and the target ones (higher = faster,
49
% lower = slower).
510
%
6-
% If this task is not requeste, the output will be a matrix where the values correspond to the
11+
% If this task is not requested, the output will be a matrix where the values correspond to the
712
% set speed in ``cfg.dot.speed`` (computed in pixels per frame).
813
%
9-
% This function is in * * W I P * *, the output is the same if the task is selected or not.
1014
%
1115
% (C) Copyright 2021 CPP visual motion localizer developpers
1216

13-
if ismember('speed', cfg.target.type)
14-
[~, nbEventsPerBlock, ~, nbBlocks] = getDesignInput(cfg);
15-
speeds = ones(nbBlocks, nbEventsPerBlock) * cfg.dot.speedPixPerFrame;
16-
17-
% Outputs an "empty" matrix in case no speed task is required
18-
else
19-
[~, nbEventsPerBlock, ~, nbBlocks] = getDesignInput(cfg);
20-
speeds = ones(nbBlocks, nbEventsPerBlock);
17+
[~, nbEventsPerBlock, ~, nbBlocks] = getDesignInput(cfg);
18+
speeds = ones(nbBlocks, nbEventsPerBlock) * cfg.dot.speedPixPerFrame;
2119

22-
end
20+
% TODO: make the output different whether the task is selected or not.
21+
% if ismember('speed', cfg.target.type)
22+
% else % Outputs an "empty" matrix in case no speed task is required
23+
% end
2324

2425
end

tests/test_setSpeedTargets.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ function test_setSpeedTargetsBasic()
2020

2121
speeds = setSpeedTargets(cfg);
2222

23-
% not sure why the fixation cross should have a speed ????
24-
assertEqual(speeds, ones(24, 12));
23+
assertEqual(speeds, ones(24, 12) * 28);
2524

2625
end

0 commit comments

Comments
 (0)