Skip to content

Commit e37bed6

Browse files
authored
Merge pull request #21 from Remi-Gau/remi-use_aperture
update README
2 parents 5462816 + 47b09b4 commit e37bed6

File tree

6 files changed

+46
-43
lines changed

6 files changed

+46
-43
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ For instructions see the following links:
1313
| [CPP_BIDS](https://github.com/cpp-lln-lab/CPP_BIDS) | ? |
1414
| [CPP_PTB](https://github.com/cpp-lln-lab/CPP_PTB) | ? |
1515
| [PsychToolBox](http://psychtoolbox.org/) | >=3.0.14 |
16-
| [Matlab](https://www.mathworks.com/products/matlab.html) | >=2017 |
16+
| [Matlab](https://www.mathworks.com/products/matlab.html) | >=2017 |
1717
| or [octave](https://www.gnu.org/software/octave/) | >=4.? |
1818

1919
## Installation
2020

21-
git clone --recurse-submodules https://github.com/Remi-Gau/repo_with_submod.git
22-
cd repo_with_submod/
23-
git submodule update --remote
21+
The CPP_BIDS and CPP_PTB dependencies are already set up as submodule to this repository.
22+
You can install it all with git by doing.
23+
24+
```bash
25+
git clone --recurse-submodules https://github.com/cpp-lln-lab/localizer_visual_motion.git
26+
```
2427

2528
## Structure and function details
2629

setParameters.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
% Coherence Level (0-1)
5656
cfg.dot.coherence = 1;
5757
% nb dots per visual angle square.
58-
cfg.dot.density = .25;
59-
58+
cfg.dot.density = .25;
59+
6060
% Dot life time in seconds
6161
cfg.dot.lifeTime = 10;
6262

@@ -70,7 +70,7 @@
7070
% Diameter/length of side of aperture in Visual angles
7171
cfg.aperture.type = 'circle';
7272
cfg.aperture.width = []; % if left empty it will take the screen height
73-
cfg.aperture.xPos = -30;
73+
cfg.aperture.xPos = 0;
7474

7575
%% Task(s)
7676

@@ -85,7 +85,7 @@
8585
cfg.fixation.color = cfg.color.white;
8686
cfg.fixation.width = 1;
8787
cfg.fixation.lineWidthPix = 2;
88-
cfg.fixation.xDisplacement = 30;
88+
cfg.fixation.xDisplacement = 0;
8989
cfg.fixation.yDisplacement = 0;
9090

9191
cfg.target.maxNbPerBlock = 2;

subfun/doDotMo.m

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,66 +13,66 @@
1313
% The dots are drawn on a square with a width equals to the width of the
1414
% screen
1515
% We then draw an aperture on top to hide the certain dots.
16-
16+
1717
%% Get parameters
18-
18+
1919
dots = initializeDots(cfg, thisEvent);
20-
20+
2121
% Set for how many frames this event will last
2222
framesLeft = floor(cfg.eventDuration / cfg.screen.ifi);
23-
23+
2424
%% Start the dots presentation
2525
vbl = Screen('Flip', cfg.screen.win);
2626
onset = vbl;
27-
27+
2828
while framesLeft
29-
29+
3030
[dots] = updateDots(dots, cfg);
31-
31+
3232
%% Center the dots
3333
% We assumed that zero is at the top left, but we want it to be
3434
% in the center, so shift the dots up and left, which just means
3535
% adding half of the screen width in pixel to both the x and y direction.
3636
thisEvent.dot.positions = (dots.positions - cfg.screen.winWidth / 2)';
37-
37+
3838
%% make textures
3939
dotTexture('make', cfg, thisEvent);
40-
40+
4141
apertureTexture('make', cfg, thisEvent);
42-
42+
4343
%% draw evetything and flip screen
44-
44+
4545
dotTexture('draw', cfg, thisEvent);
46-
46+
4747
apertureTexture('draw', cfg, thisEvent);
48-
48+
4949
% If this frame shows a target we change the color
5050
thisFixation.fixation = cfg.fixation;
5151
thisFixation.screen = cfg.screen;
5252
if thisEvent.target(1) && GetSecs < (onset + cfg.target.duration)
5353
thisFixation.fixation.color = cfg.fixation.colorTarget;
5454
end
5555
drawFixation(thisFixation);
56-
56+
5757
Screen('DrawingFinished', cfg.screen.win);
58-
58+
5959
vbl = Screen('Flip', cfg.screen.win, vbl + cfg.screen.ifi);
60-
60+
6161
%% Update counters
62-
62+
6363
% Check for end of loop
6464
framesLeft = framesLeft - 1;
65-
65+
6666
end
67-
67+
6868
%% Erase last dots
69-
69+
7070
drawFixation(cfg);
71-
71+
7272
Screen('DrawingFinished', cfg.screen.win);
73-
73+
7474
vbl = Screen('Flip', cfg.screen.win, vbl + cfg.screen.ifi);
75-
75+
7676
duration = vbl - onset;
77-
77+
7878
end

subfun/expDesign.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
% Set directions for static and motion condition
4040
motionDirections = [0 90 180 270];
4141
staticDirections = [0 90 180 270];
42-
% staticDirections = [-1 -1 -1 -1];
42+
% staticDirections = [-1 -1 -1 -1];
4343

4444
%% Check inputs
4545

visualLocTanslational.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
% Convert some values from degrees to pixels
3737
cfg.dot = degToPix('size', cfg.dot, cfg);
3838
cfg.dot = degToPix('speed', cfg.dot, cfg);
39-
39+
4040
% Get dot speeds in pixels per frame
4141
cfg.dot.speedPixPerFrame = cfg.dot.speedPix / cfg.screen.monitorRefresh;
42-
42+
4343
cfg.aperture = degToPix('xPos', cfg.aperture, cfg);
44-
44+
4545
% dots are displayed on a square with a length in visual angle equal to the
4646
% field of view
4747
cfg.dot.number = round(cfg.dot.density * (cfg.screen.winWidth / cfg.screen.ppd)^2);
@@ -55,15 +55,15 @@
5555
% Prepare for the output logfiles with all
5656
logFile.extraColumns = cfg.extraColumns;
5757
logFile = saveEventsFile('open', cfg, logFile);
58-
58+
5959
% prepare textures
6060
cfg = apertureTexture('init', cfg);
6161
cfg = dotTexture('init', cfg);
62-
62+
6363
disp(cfg);
64-
64+
6565
standByScreen(cfg);
66-
66+
6767
% prepare the KbQueue to collect responses
6868
getResponse('init', cfg.keyboard.responseBox, cfg);
6969
getResponse('start', cfg.keyboard.responseBox);
@@ -148,7 +148,7 @@
148148
WaitSecs(cfg.endDelay);
149149

150150
cfg = getExperimentEnd(cfg);
151-
151+
152152
% Close the logfiles
153153
saveEventsFile('close', cfg, logFile);
154154

@@ -166,7 +166,7 @@
166166
else
167167
save(matFile, '-v7.3');
168168
end
169-
169+
170170
farewellScreen(cfg);
171171

172172
cleanUp();

0 commit comments

Comments
 (0)