Skip to content

Commit

Permalink
Merge pull request #789 from Remi-Gau/spell
Browse files Browse the repository at this point in the history
[FIX] fix spelling
  • Loading branch information
Remi-Gau authored Nov 4, 2022
2 parents ef369bd + c1b68e5 commit 3a47942
Show file tree
Hide file tree
Showing 51 changed files with 123 additions and 100 deletions.
4 changes: 4 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[codespell]
skip = *.tsv,*.json,*.nii*,*.js,*.svg,*.eps,.git,env,*build,lib,outputs,inputs,bids-examples,stats_model,coverage_html
ignore-words-list = fo,te,als,ane,nin,fot,fwe,commun
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 Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Creates a docker image of bidspm

# version number are updated automatically with tbe bump version script
# version number are updated automatically with the bump version script

# this is mostly taken from the spm docker files: https://github.com/spm/spm-docker
FROM ubuntu:22.04
Expand Down
2 changes: 1 addition & 1 deletion bidspm.m
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ function initBidspm(dev)

function uninitBidspm()
%
% Removes the added folders fromthe path for a given session.
% Removes the added folders from the path for a given session.
%
% USAGE::
%
Expand Down
4 changes: 2 additions & 2 deletions demos/MoAE/moae_01_bids_app.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"id": "e1e754e3",
"metadata": {},
"source": [
"If the `tree` command is intalled on your computer, you view it:"
"If the `tree` command is installed on your computer, you view it:"
]
},
{
Expand Down Expand Up @@ -186,7 +186,7 @@
"metadata": {},
"source": [
"You can type `bidspm help` to get more info \n",
"on the arguements and parameters needed by the bidspm app.\n",
"on the arguments and parameters needed by the bidspm app.\n",
"\n",
"But it follows the general pattern of any bidsapp:\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions demos/MoAE/moae_01_bids_app.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
clean = false;
download_moae_ds(download_data, clean);

% If the `tree` command is intalled on your computer, you view it:
% If the `tree` command is installed on your computer, you view it:

system('tree inputs/raw');

Expand All @@ -99,7 +99,7 @@
% - smooth the data

% You can type `bidspm help` to get more info
% on the arguements and parameters needed by the bidspm app.
% on the arguments and parameters needed by the bidspm app.
%
% But it follows the general pattern of any bidsapp:
%
Expand Down
2 changes: 1 addition & 1 deletion demos/MoAE/moae_fmriprep.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% using the fmriprep preprocessed data
%
% If you want to get the preprocessed data and you have datalad on your computer
% you can run the following commands to get the necesary data::
% you can run the following commands to get the necessary data::
%
% datalad install --source git@gin.g-node.org:/SPM_datasets/spm_moae_fmriprep.git \
% inputs/fmriprep
Expand Down
2 changes: 1 addition & 1 deletion demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
make PLATFORM=octave install
```
1. If you have Conda or pip installed jupyter notebook or jupyter lab, skipt
1. If you have Conda or pip installed jupyter notebook or jupyter lab, skip
the next step. To check if Conda is installed properly: type `conda list`
into your terminal.
Expand Down
2 changes: 1 addition & 1 deletion demos/face_repetition/face_rep_03_roi_analysis.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%
% Creates a ROI in MNI space from the retinotopic probablistic atlas.
% Creates a ROI in MNI space from the retinotopic probabilistic atlas.
%
% Creates its equivalent in subject space (inverse normalization).
%
Expand Down
2 changes: 1 addition & 1 deletion demos/openneuro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
one or several runs depending on task
- ds001168: resting state, several sessions, several acquisition, fieldmaps,
physio data
- ds002799: resting state and taks, several sessions, with fmriprep data
- ds002799: resting state and task, several sessions, with fmriprep data

## Download with datalad

Expand Down
4 changes: 2 additions & 2 deletions demos/renaming/spm_2_bids_filenames.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"source": [
"## Typical SPM filenames\n",
"\n",
"SPM typicall adds prefixes to filenames and concatenates them.\n",
"SPM typically adds prefixes to filenames and concatenates them.\n",
"\n",
"- `r` for realigned or resliced\n",
"- `w` for warped (often means normalized in MNI space)\n",
Expand Down Expand Up @@ -289,7 +289,7 @@
"metadata": {},
"source": [
"It can be a pain to create the right map \n",
"between a specific SPM type of ouput and \"the right\" BIDS equivalent.\n",
"between a specific SPM type of output and \"the right\" BIDS equivalent.\n",
"\n",
"So easier to use [the CPP `spm_2_bids` library](https://github.com/cpp-lln-lab/spm_2_bids)\n",
"which will also try to use the \"proper\" MNI space name \n",
Expand Down
4 changes: 2 additions & 2 deletions demos/renaming/spm_2_bids_filenames.m
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@

% ## Typical SPM filenames
%
% SPM typicall adds prefixes to filenames and concatenates them.
% SPM typically adds prefixes to filenames and concatenates them.
%
% - `r` for realigned or resliced
% - `w` for warped (often means normalized in MNI space)
Expand Down Expand Up @@ -168,7 +168,7 @@
bidsFile.filename;

% It can be a pain to create the right map
% between a specific SPM type of ouput and "the right" BIDS equivalent.
% between a specific SPM type of output and "the right" BIDS equivalent.
%
% So easier to use (https://github.com/cpp-lln-lab/spm_2_bids)
% which will also try to use the "proper" MNI space name
Expand Down
2 changes: 1 addition & 1 deletion demos/vismotion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ In the end your whole analysis should look like this.
│ │ ├── MoAE
│ │ ├── openneuro
│ │ ├── tSNR
│ │ └── vismotion # <--- your scrips are there
│ │ └── vismotion # <--- your scripts are there
│ ├── docs
│ ├── lib
│ ├── manualTests
Expand Down
2 changes: 1 addition & 1 deletion demos/vismotion/vismotion_demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cd ~/visual_motion_localiser
# get BIDSpm code from the dev branch
source="https://github.com/cpp-lln-lab/bidspm.git"

# for debugging uncomment the follwing line
# for debugging uncomment the following line
source=${root_directory}

datalad install \
Expand Down
2 changes: 1 addition & 1 deletion docs/source/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Other
.. autofunction:: bidsRename


Worflow helper functions
Workflow helper functions
------------------------

To be used if you want to create a new workflow.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/bids_stats_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ bidspm only implements a subset of what is currently theoretically possible with
the BIDS stats model.

For example, at the subject level the bidspm can only access variables, that are
in the `events.tsv` in tha raw dataset or in the `regressors.tsv` or
in the `events.tsv` in that raw dataset or in the `regressors.tsv` or
`timeseries.tsv` generated by the preprocessing pipeline.

At the group level, it is only possible to access some variables from the
Expand Down Expand Up @@ -165,7 +165,7 @@ You can choose from:
- `"spm + derivative"`
- `"spm + derivative + dispersion"`

Not yet implementated:
Not yet implemented:

- `"fir"`

Expand Down
44 changes: 22 additions & 22 deletions docs/source/links_and_references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This is here because SPM has the sad (and bad) Matlabic tradition of using varia
that have often attempted to replicate the notation in the papers to make engineers
and the generally math enclined happy,
rather then the ``TypicalLongVariableNames`` that many programmers and new comers
would prefer to see to help with code readibility.
would prefer to see to help with code readability.

Adapted from: http://andysbrainblog.blogspot.com/2013/10/whats-in-spmmat-file.html

Expand Down Expand Up @@ -87,46 +87,46 @@ user-specified covariates/regressors

e.g. motion

- ``SPM.Sess([sesssion]).C.C`` - (n x c) double regressor (``c`` is number of covariates, ``n`` is number of sessions)
- ``SPM.Sess([sesssion]).C.name`` - names of covariates
- ``SPM.Sess([session]).C.C`` - (n x c) double regressor (``c`` is number of covariates, ``n`` is number of sessions)
- ``SPM.Sess([session]).C.name`` - names of covariates

conditions & modulators specified
+++++++++++++++++++++++++++++++++

i.e. input structure array

- ``SPM.Sess([sesssion]).U(condition).dt``: - time bin length (seconds)
- ``SPM.Sess([sesssion]).U(condition).name`` - names of conditions
- ``SPM.Sess([sesssion]).U(condition).ons`` - onset for condition's trials
- ``SPM.Sess([sesssion]).U(condition).dur`` - duration for condition's trials
- ``SPM.Sess([sesssion]).U(condition).u`` - (t x j) inputs or stimulus function matrix
- ``SPM.Sess([sesssion]).U(condition).pst`` - (1 x k) peri-stimulus times (seconds)
- ``SPM.Sess([session]).U(condition).dt``: - time bin length (seconds)
- ``SPM.Sess([session]).U(condition).name`` - names of conditions
- ``SPM.Sess([session]).U(condition).ons`` - onset for condition's trials
- ``SPM.Sess([session]).U(condition).dur`` - duration for condition's trials
- ``SPM.Sess([session]).U(condition).u`` - (t x j) inputs or stimulus function matrix
- ``SPM.Sess([session]).U(condition).pst`` - (1 x k) peri-stimulus times (seconds)

parameters/modulators specified
+++++++++++++++++++++++++++++++

- ``SPM.Sess([sesssion]).U(condition).P`` - parameter structure/matrix
- ``SPM.Sess([sesssion]).U(condition).P.name`` - names of modulators/parameters
- ``SPM.Sess([sesssion]).U(condition).P.h`` - polynomial order of modulating parameter (order of polynomial expansion where 0 is none)
- ``SPM.Sess([sesssion]).U(condition).P.P`` - vector of modulating values
- ``SPM.Sess([sesssion]).U(condition).P.P.i`` - sub-indices of ``U(i).u`` for plotting
- ``SPM.Sess([session]).U(condition).P`` - parameter structure/matrix
- ``SPM.Sess([session]).U(condition).P.name`` - names of modulators/parameters
- ``SPM.Sess([session]).U(condition).P.h`` - polynomial order of modulating parameter (order of polynomial expansion where 0 is none)
- ``SPM.Sess([session]).U(condition).P.P`` - vector of modulating values
- ``SPM.Sess([session]).U(condition).P.P.i`` - sub-indices of ``U(i).u`` for plotting

scan indices for sessions
+++++++++++++++++++++++++

- ``SPM.Sess([sesssion]).row``
- ``SPM.Sess([session]).row``

effect indices for sessions
+++++++++++++++++++++++++++

- ``SPM.Sess([sesssion]).col``
- ``SPM.Sess([session]).col``

F Contrast information for input-specific effects
+++++++++++++++++++++++++++++++++++++++++++++++++

- ``SPM.Sess([sesssion]).Fc``
- ``SPM.Sess([sesssion]).Fc.i`` - F Contrast columns for input-specific effects
- ``SPM.Sess([sesssion]).Fc.name`` - F Contrast names for input-specific effects
- ``SPM.Sess([session]).Fc``
- ``SPM.Sess([session]).Fc.i`` - F Contrast columns for input-specific effects
- ``SPM.Sess([session]).Fc.name`` - F Contrast names for input-specific effects

- ``SPM.nscan([session])`` - number of scans per session (or if e.g. a t-test, total number of con*.nii files)

Expand Down Expand Up @@ -214,13 +214,13 @@ structure describing intrinsic temporal non-sphericity
- ``SPM.xVi.Vi`` - array of non-sphericity components

- defaults to ``{speye(size(xX.X,1))}`` - i.i.d.
- specifying a cell array of contraints ((Qi)
- These contraints invoke ``spm_reml`` to estimate hyperparameters assuming V is constant over voxels that provide a high precise estimate of xX.V
- specifying a cell array of constraints ((Qi)
- These constraints invoke ``spm_reml`` to estimate hyperparameters assuming V is constant over voxels that provide a high precise estimate of xX.V

- ``SPM.xVi.form`` - form of non-sphericity (either ``'none'`` or ``'AR(1)'`` or ``'FAST'``)

- ``SPM.xX.V`` - Optional non-sphericity matrix. ``CCov(e)sigma^2*V``.
If not specified ``spm_spm`` will compute this using a 1st pass to identify signifcant voxels over which to estimate V.
If not specified ``spm_spm`` will compute this using a 1st pass to identify significant voxels over which to estimate V.
A 2nd pass is then used to re-estimate the parameters with WLS and save the ML estimates (unless xX.W is already specified).


Expand Down
2 changes: 1 addition & 1 deletion scripts/group_rm_anova.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
side_labels = {'left', 'right'};
subject_labels = opt.subjects;

% list of constrasts and the levels they correspond to
% list of contrasts and the levels they correspond to
contrasts_list = {'olfid_almond_left'; ...
'olfid_almond_right'; ...
'olfid_eucalyptus_left'; ...
Expand Down
2 changes: 1 addition & 1 deletion src/IO/loadAndCheckOptions.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
% Loads the json file provided describing the options of an analysis. It then checks
% its content and fills any missing fields with the defaults.
%
% If no argument is provived, it checks in the current directory for any
% If no argument is provided, it checks in the current directory for any
% ``opt_task-*.json`` files and loads the most recent one by name
% (using the ``date-`` key).
%
Expand Down
2 changes: 1 addition & 1 deletion src/QA/functionalQA.m
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function functionalQA(opt)
bf.entities.label = bf.suffix;
bf.prefix = '';

% TODO find an ouput format that is leaner than a 3 Gb json file!!!
% TODO find an output format that is leaner than a 3 Gb json file!!!
bf.suffix = 'qametrics';
bf.extension = '.json';

Expand Down
8 changes: 4 additions & 4 deletions src/QA/mriqcQA.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ function mriqcQA(opt, suffix)

function outliers = identifyOutliers(data, nameFlipUnilateral)

% The iqrMethod sub-function indentifies outliers that are higher than a
% The iqrMethod sub-function identifies outliers that are higher than a
% certain value (unilateral) or within a certain range (bilateral).
% Each metric of interest can be "switched" (if higher values mean
% better quality like for SNR) and can be thresholded unilateraly or not.
% better quality like for SNR) and can be thresholded unilaterally or not.

for i_field = 1:size(nameFlipUnilateral, 1)

Expand Down Expand Up @@ -141,8 +141,8 @@ function mriqcQA(opt, suffix)
% - dvars_nstd
% - dvars_std
% - dvars_vstd
% fd_per = framewise diplacement - percentage of time points above 0.2 mm
% fd_mean = mean framewise diplacement
% fd_per = framewise displacement - percentage of time points above 0.2 mm
% fd_mean = mean framewise displacement
% gsr = Ghost to Signal Ratio
% aor = AFNI's outlier ratio - Mean fraction of outliers per fMRI
% volume as given by AFNI's 3dToutcount.
Expand Down
2 changes: 1 addition & 1 deletion src/QA/plotRoiTimeCourse.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%
% :param tsvFile: obligatory argument.
% Content of TSV is organized in a "BIDS" way.
% Must be ``(t + 1) X c`` with t = time points and c = condtions.
% Must be ``(t + 1) X c`` with t = time points and c = conditions.
% The + 1 for the row dimension is because of the headers
% giving the name of the condition.
% A side car JSON is expected to contain a ``SamplingFrequency`` field
Expand Down
2 changes: 1 addition & 1 deletion src/batches/preproc/setBatchSegmentation.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
% save bias corrected image = true
preproc.channel.write = [false true];

% firts part assumes we are in the bidsSpatialPreproc workflow
% first part assumes we are in the bidsSpatialPreproc workflow
if isfield(opt, 'orderBatches') && isfield(opt.orderBatches, 'selectAnat')

% SAVE BIAS CORRECTED IMAGE
Expand Down
2 changes: 1 addition & 1 deletion src/batches/stats/setBatchSubjectLevelGLMSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
refBin = floor(refBin);
fmri_spec.timing.fmri_t0 = refBin;

% Create ffxDir if it doesnt exist
% Create ffxDir if it does not exist
% If it exists, issue a warning that it has been overwritten
ffxDir = getFFXdir(subLabel, opt);
overwriteDir(ffxDir, opt);
Expand Down
6 changes: 3 additions & 3 deletions src/batches/stats/setBatchTwoSampleTTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
group2 = regexp(node.Contrasts{1}.ConditionList{2}, '\.', 'split');

% for now we assume we can read the subject group belonging
% from the partiticipant TSV in the raw dataset
% from the participant TSV in the raw dataset
% and from the same column
assert(strcmp(group1{1}, group2{1}));
groupField = group1{1};
Expand Down Expand Up @@ -205,8 +205,8 @@

node = opt.model.bm.get_nodes('Name', nodeName);

% if no specific dummy contrasts mentionned also include all contrasts from previous levels
% or if contrasts are mentionned we grab them
% if no specific dummy contrasts mentioned also include all contrasts from previous levels
% or if contrasts are mentioned we grab them
if isfield(node, 'Contrasts')
tmp = getContrastsList(nodeName, opt.model.bm);
for i = 1:numel(tmp)
Expand Down
2 changes: 1 addition & 1 deletion src/bids/getSubjectList.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
% - :opt: (structure)
%
%
% If no group or subject is speficied in ``opt`` then all subjects are included.
% If no group or subject is specified in ``opt`` then all subjects are included.
% This is equivalent to the default::
%
% opt.groups = {''};
Expand Down
2 changes: 1 addition & 1 deletion src/bids_model/getContrastsList.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

function contrastsList = getContrastsListFromSource(node, model)
%
% Recurisvely look for contrasts at previous levels
% Recursively look for contrasts at previous levels
%

contrastsList = {};
Expand Down
Loading

0 comments on commit 3a47942

Please sign in to comment.