Skip to content

Commit 8ef09d3

Browse files
authored
Merge pull request #105 from cpp-lln-lab/remi-motion_prf
update from motion prf
2 parents f3cd5b4 + 546ee3e commit 8ef09d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+361
-10
lines changed

demos/CPP_checkAbortDemo.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
% (C) Copyright 2020 CPP_PTB developers
2+
13
% add parent directory to the path (to make sure we can access the CPP_PTB
24
% functions)
35
addpath(fullfile(pwd, '..'));

demos/CPP_getResponseDemo.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
% (C) Copyright 2020 CPP_PTB developers
2+
13
%% Demo showing how to use the getResponse function
24

35
% This small script shows how to use the getReponse function

demos/CPP_pressSpaceForMeDemo.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
% (C) Copyright 2020 CPP_PTB developers
2+
13
% add parent directory to the path (to make sure we can access the CPP_PTB
24
% functions)
35
addpath(fullfile(pwd, '..'));

demos/CPP_waitForTriggerDemo.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
% add parent/src directory to the path (to make sure we can access the CPP_PTB functions)
1+
% (C) Copyright 2020 CPP_PTB developers
22

3+
% add parent/src directory to the path (to make sure we can access the CPP_PTB functions)
34
addpath(genpath(fullfile(pwd, '..', 'src')));
45

56
cfg.mri.triggerNb = 5;

demos/miss_hit.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
2+
line_length: 100
3+
regex_function_name: "CPP_[a-z]+(([A-Z]){1}[A-Za-z]+)*"
4+
copyright_entity: "Sam Schwarzkopf"
5+
copyright_entity: "Agah Karakuzu"
6+
copyright_entity: "CPP_PTB developers"
7+
8+
# metrics limit for the code quality (https://florianschanda.github.io/miss_hit/metrics.html)
9+
metric "cnest": limit 4
10+
metric "file_length": limit 500
11+
metric "cyc": limit 15
12+
metric "parameters": limit 5

miss_hit.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
22
line_length: 100
33
regex_function_name: "[a-z]+(([A-Z]){1}[A-Za-z]+)*"
4-
suppress_rule: "copyright_notice"
4+
copyright_entity: "Sam Schwarzkopf"
5+
copyright_entity: "Agah Karakuzu"
6+
copyright_entity: "CPP_PTB developers"
57

68
# metrics limit for the code quality (https://florianschanda.github.io/miss_hit/metrics.html)
79
metric "cnest": limit 4

src/aperture/apertureTexture.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
% (C) Copyright 2010-2020 Sam Schwarzkopf
2+
% (C) Copyright 2020 CPP_PTB developers
3+
14
function [cfg, thisEvent] = apertureTexture(action, cfg, thisEvent)
25
% [cfg, thisEvent] = apertureTexture(action, cfg, thisEvent)
36
%

src/aperture/eccenLogSpeed.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
% (C) Copyright 2020 CPP_PTB developers
2+
13
function [cfg] = eccenLogSpeed(cfg, time)
24
% vary CurrScale so that expansion speed is log over eccentricity
35
% cf. Tootell 1997; Swisher 2007; Warnking 2002 etc

src/aperture/getApertureName.m

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
% (C) Copyright 2020 CPP_PTB developers
2+
3+
function apertureName = getApertureName(cfg, apertures, iApert)
4+
5+
switch cfg.aperture
6+
case 'Bar'
7+
apertureName = sprintf('bar_angle-%i_position-%02.2f.tif', ...
8+
apertures.barAngle(iApert), ...
9+
apertures.barPostion(iApert));
10+
case 'Wedge'
11+
apertureName = sprintf('wedge_nb-%i.tif', iApert);
12+
case 'Ring'
13+
apertureName = sprintf('ring_nb-%i.tif', iApert);
14+
end
15+
16+
end

src/aperture/saveAperture.m

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
% (C) Copyright 2010-2020 Sam Schwarzkopf
2+
% (C) Copyright 2020 CPP_PTB developers
3+
4+
if SaveAps
5+
if SaveAps == 1
6+
ApFrm = zeros(100, 100, Parameters.Volumes_per_Trial * length(Parameters.Conditions));
7+
elseif SaveAps == 2
8+
ApFrm = zeros(640, 480, 3);
9+
sf = 0;
10+
end
11+
SavWin = Screen('MakeTexture', Win, 127 * ones(StimRect([3 3])));
12+
end
13+
14+
% If saving movie
15+
if SaveAps == 1 && PrevVolume ~= CurrVolume
16+
PrevVolume = CurrVolume;
17+
CurApImg = Screen('GetImage', Win);
18+
CurApImg = rgb2gray(CurApImg);
19+
CurApImg = imresize(CurApImg, [Rect(4) Rect(3)]);
20+
Fxy = round(CenterRect(FrameRect, Rect) + ...
21+
[Parameters.Image_Position Parameters.Image_Position]);
22+
CurApImg = CurApImg(Fxy(2):Fxy(4), Fxy(1):Fxy(3));
23+
CurApImg = double(abs(double(CurApImg) - 127) > 1);
24+
CurApImg = imresize(CurApImg, [100 100]);
25+
ApFrm(:, :, Parameters.Volumes_per_Trial * (Trial - 1) + CurrVolume) = CurApImg;
26+
elseif SaveAps == 2
27+
CurApImg = Screen('GetImage', Win);
28+
CurApImg = imresize(CurApImg, [640 480]);
29+
sf = sf + 1;
30+
ApFrm(:, :, :, sf) = CurApImg;
31+
end
32+
33+
if SaveAps == 2
34+
ApFrm = uint8(ApFrm);
35+
save('Stimulus_movie', 'ApFrm');
36+
end

0 commit comments

Comments
 (0)