Skip to content
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
4 changes: 4 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[codespell]
skip = .git,env,*build,lib
ignore-words-list = nwe
builtin = clear,rare
19 changes: 19 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: codespell

on:
push:
branches: [master]
pull_request:
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Check for common misspellings
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: codespell-project/actions-codespell@master
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ their use and their reuse (#DontRepeatYourself)

## Documentation

All the documentation and installtion information is accessible
All the documentation and installation information is accessible
[here](https://cpp-ptb.readthedocs.io/en/stable/index.html#).

## Content
Expand Down
10 changes: 5 additions & 5 deletions demos/video/CPP_playVideoFramesDemo.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
% Skip the PTB sync test
Screen('Preference', 'SkipSyncTests', 2);

% Get the screen numbers and draw to the external screen if avaliable
% Get the screen numbers and draw to the external screen if available
cfg.screen.idx = max(Screen('Screens'));

% Set the PTB window background manually
cfg.color.background = [127 127 127];

% Get the screen numbers and draw to the external screen if avaliable
% Get the screen numbers and draw to the external screen if available
cfg.screen.idx = max(Screen('Screens'));

% Open an on screen window
[cfg.screen.win, cfg.screen.winRect] = Screen('OpenWindow', cfg.screen.idx, cfg.color.background);

%% Strcuture for video related info
%% Structure for video related info

% The name of your "video" and its images format
video.names = {'coffee', 'leaves'};
Expand All @@ -39,7 +39,7 @@
% video.frame.numbers = 30;
% video.frame.numbers = [30,15];

% The format fo the images
% The format of the images
video.frame.format = '.jpeg'; % can be any img format compatible with the "imread" function

% the folder where the images are (from the current folder)
Expand Down Expand Up @@ -70,7 +70,7 @@
video.frame.number = video.frame.numbers;
end

% Read the images and create the stucture with their textures
% Read the images and create the structure with their textures
[video, cfg] = createFramesTextureStructure(video, cfg);

% Play the video
Expand Down
2 changes: 1 addition & 1 deletion manualTests/test_dotMotionSimulation.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function test_dotMotionSimulationStatic()
end

function test_dotMotionSimulationTranslation()
% ensure that dog homogenity is not too low when we kill dots often enough
% ensure that dog homogeneity is not too low when we kill dots often enough

nbEvents = 500;
doPlot = false;
Expand Down
2 changes: 1 addition & 1 deletion src/aperture/apertureTexture.m
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@

cycleDuration = cfg.mri.repetitionTime * cfg.volsPerCycle;

% Update angle for rotation of background and for apperture for wedge
% Update angle for rotation of background and for aperture for wedge
switch cfg.direction

case '+'
Expand Down
2 changes: 1 addition & 1 deletion src/aperture/eccenLogSpeed.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
(outerRimVA + exp(1))) * maxEcc * csFuncFact;
outerRimPix = newOuterRimVA * cfg.screen.ppd; % in pixel

% width of apperture changes logarithmically with eccentricity of inner ring
% width of aperture changes logarithmically with eccentricity of inner ring
oldScaleInnerVA = outerRimVA - ringWidthVA;
if oldScaleInnerVA < 0
oldScaleInnerVA = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/dot/reseedDots.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
% Create a logical vector to detect any dot that has:
% - an xy position inferior to 0
% - an xy position superior to winWidth
% - has exceeded its liftime
% - has exceeded its lifetime
% - is on the fixation cross
% - has been been picked to be killed

Expand Down
4 changes: 2 additions & 2 deletions src/dot/setDotDirection.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

directionAllDots = dots.direction;

% when we initialiaze the direction for all the dots
% when we initialize the direction for all the dots
% after that dots.direction will be a vector
if numel(directionAllDots) == 1

Expand All @@ -52,7 +52,7 @@
%% Express the direction in the 0 to 360 range
directionAllDots = mod(directionAllDots, 360);

% ensure we return a colum vector
% ensure we return a column vector
if size(directionAllDots, 1) == 1
directionAllDots = directionAllDots';
end
Expand Down
10 changes: 5 additions & 5 deletions src/eyeTracker.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function [el, cfg] = eyeTracker(input, cfg, varargin)
%
% Wrapper function that deals with all the necessery actions to implement
% Wrapper function that deals with all the necessary actions to implement
% Eye Tracker recording with eyelink.
%
% USAGE:
Expand Down Expand Up @@ -69,7 +69,7 @@

% Initialize EL and make sure it worked: returns 0 if OK, -1 if error.

% Check that EL is initialzed and connected, otherwise abort experiment
% Check that EL is initialized and connected, otherwise abort experiment
eyetrackerCheckConnection;

% Open the edf file to write the data.
Expand Down Expand Up @@ -277,7 +277,7 @@
error([newline 'Eyelink is not connected, aborted.']);
end

% Initialize Eyelink system and connection: returns 1 when succesful, 0
% Initialize Eyelink system and connection: returns 1 when successful, 0
% otherwise
if ~EyelinkInit(0, 1)
Eyelink('shutdown');
Expand Down Expand Up @@ -323,7 +323,7 @@
% 'Start_Ret_', ...
% 'Subj_', cfg.Subj, '_', ...
% 'Run', num2str(cfg.Session(end)), '_', ...
% cfg.Apperture, '_', ...
% cfg.Aperture, '_', ...
% cfg.Direction]);
% iViewX('incrementsetnumber', ivx, 0);
% end
Expand All @@ -342,7 +342,7 @@
% strFile = fullfile(OutputDir, ...
% [cfg.Subj, ...
% '_run', num2str(cfg.Session(end)), '_', ...
% cfg.Apperture, '_', ...
% cfg.Aperture, '_', ...
% cfg.Direction, '_', ...
% thedatestr, '.idf"']);
% iViewX('datafile', ivx, strFile);
Expand Down
10 changes: 5 additions & 5 deletions src/initPTB.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
pth = fileparts(mfilename('fullpath'));
addpath(genpath(fullfile(pth, 'src')));

% For octave: to avoid displaying messenging one screen at a time
% For octave: to avoid displaying messaging one screen at a time
more off;

% Resets the seed of the random number generator
Expand All @@ -58,7 +58,7 @@
% Make sure we have black splash screen
Screen('Preference', 'VisualDebugLevel', 1);

% Get the screen numbers and draw to the external screen if avaliable
% Get the screen numbers and draw to the external screen if available
cfg.screen.idx = max(Screen('Screens'));

if isfield(cfg.screen, 'resolution')
Expand All @@ -81,7 +81,7 @@
cfg.screen.FOV = computeFOV(cfg);
cfg.screen.ppd = cfg.screen.winWidth / cfg.screen.FOV;

% Initialize visual parmaters for fixation cross or dot
% Initialize visual parameters for fixation cross or dot
cfg = initFixation(cfg);

%% Select specific text font, style and size
Expand Down Expand Up @@ -205,7 +205,7 @@ function initDebug(cfg)
cfg.audio.channels);

% set initial PTB volume for safety (participants can adjust this manually
% at the begining of the experiment)
% at the beginning of the experiment)
PsychPortAudio('Volume', cfg.audio.pahandle, cfg.audio.initVolume);

end
Expand All @@ -222,7 +222,7 @@ function initDebug(cfg)
Screen('OpenWindow', cfg.screen.idx, cfg.color.background);
end

% Enable alpha-blending, set it to a blend equation useable for linear
% Enable alpha-blending, set it to a blend equation usable for linear
% superposition with alpha-weighted source.
% Required for drwing smooth lines and screen('DrawDots')
Screen('BlendFunction', cfg.screen.win, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Expand Down
2 changes: 1 addition & 1 deletion src/keyboard/checkAbort.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function checkAbort(cfg, deviceNumber)
% ``cfg.keyboard.escapeKey``.
% When no deviceNumber is set then it will check the default device.
% When an abort key is detected this will throw a
% specific error that can then be catched.
% specific error that can then be caught.
%
% USAGE::
%
Expand Down
4 changes: 2 additions & 2 deletions src/keyboard/getResponse.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
% as a structure with field names that make it easier
% to save the output of in a BIDS format
%
% - ``responseEvents.onset`` this is an absolute value and you should substract
% - ``responseEvents.onset`` this is an absolute value and you should subtract
% the "experiment start time" to get a value relative to when the experiment was started.
%
% - ``responseEvents.trial_type = response``
Expand Down Expand Up @@ -99,7 +99,7 @@
% If you use ListenChar(2), this will prevent you from using KbQueue.
ListenChar(-1);

% Clean and realease any queue that might be opened
% Clean and release any queue that might be opened
KbQueueRelease(deviceNumber);

keysOfInterest = setKeysOfInterest(cfg.keyboard);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/setUpRand.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function setUpRand()
seed = sum(100 * clock);

try
% Use the reccomended method in modern Matlab
% Use the recommended method in modern Matlab
RandStream.setGlobalStream(RandStream('mt19937ar', 'seed', seed));
disp('Using modern randomizer...');
catch
Expand Down
2 changes: 1 addition & 1 deletion tests/test_initDots.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function test_initDotsBasic()

[dots] = initDots(cfg, thisEvent);

%% Undeterministic ouput
%% Undeterministic output
assertTrue(all(dots.positions(:) >= 0));
assertTrue(all(dots.positions(:) <= 50));
assertTrue(all(dots.time(:) >= 0));
Expand Down
4 changes: 2 additions & 2 deletions tests/test_setDotDirection.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
function test_setDotDirectionInit()
% create 5 coherent dots with direction == 362 (that should give 2 in the
% end)
% also creates additonal dots with random direction between 0 and 360
% also creates additional dots with random direction between 0 and 360

nbDots = 10;

Expand All @@ -34,7 +34,7 @@ function test_setDotDirectionInit()
function test_setDotDirectionReturn()
% make sure that if the directions are already set it only changes that of
% the noise dots
% input has 4 signal dots with set directions also has additonal noise dots
% input has 4 signal dots with set directions also has additional noise dots
% with negative direction

nbDots = 8;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_setTargetPositionInSequence.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function test_setTargetPositionInSequenceBasic()
nbTarget = 3;
forbiddenPos = [1 5 10];

% Create a hundred draws of targer positiona and ensure that
% Create a hundred draws of target positiona and ensure that
% - the forbidden position are never drawn
% - the interval between target is superior to 1
for i = 1:100
Expand Down