diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 835a431..4e7efa2 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -15,7 +15,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
- python-version: '3.7'
+ python-version: '3.10.6'
architecture: 'x64'
- name: Install dependencies
run: |
diff --git a/docs/courses/fmri_vbm/index.md b/docs/courses/fmri_vbm/index.md
index b7febf8..3bb62be 100644
--- a/docs/courses/fmri_vbm/index.md
+++ b/docs/courses/fmri_vbm/index.md
@@ -5,7 +5,9 @@
---
- Our next course will take place online in October. More details will be announced soon.
+ 14th-16th October 2024, **registration closed**.
+
+ The next SPM for fMRI/VBM courses will be in-person in London in April 2025 and online in October 2025. Details will be provided in due course.
!!! info inline end "Course recordings"
diff --git a/docs/courses/fmri_vbm/programme.md b/docs/courses/fmri_vbm/programme.md
index cf9cc7d..237e669 100644
--- a/docs/courses/fmri_vbm/programme.md
+++ b/docs/courses/fmri_vbm/programme.md
@@ -2,14 +2,14 @@
## Course programme
-This is a draft programme of the upcoming in-person [SPM course for fMRI and VBM](./index.md). The course will consist of lectures and practical workshops where attendees will be guided through analyses of different neuroimaging datasets. To give you a taste of the course content, recordings of past course talks are linked on the programme.
+This is a sample programme of the [SPM course for fMRI and VBM](./index.md). The course will consist of lectures and practical workshops where attendees will be guided through analyses of different neuroimaging datasets. To give you a taste of the course content, recordings of past course talks are linked on the programme.
### Day 1
| Time | Title | Faculty |
| ----------------- | ------------------------------- | -------------------------------------- |
| 08:45 - 09:00 | Registration |
-| 09:00 - 09:15 | Introduction & overview | [Dr Peter Zeidman](https://peterzeidman.co.uk) & [Dr Olivia Kowalczyk](https://oliviakowalczyk.co.uk/) |
+| 09:00 - 09:15 | Introduction & overview | [Prof Peter Zeidman](https://peterzeidman.co.uk) & [Dr Olivia Kowalczyk](https://oliviakowalczyk.co.uk/) |
| 09:15 - 10:00 | [Spatial preprocessing](./recordings/preprocessing.md) | [Prof John Ashburner](https://www.fil.ion.ucl.ac.uk/~john/) |
| 10:00 - 10:20 | [The general linear model](./recordings/glm.md) | [Dr Nadège Corbin](https://scholar.google.com/citations?user=TjIzldkAAAAJ&hl=fr) |
| *Tea & coffee* |
@@ -40,10 +40,10 @@ This is a draft programme of the upcoming in-person [SPM course for fMRI and VBM
| Time | Title | Faculty |
| ----------------- | ------------------------------- | -------------------------------------- |
| 09:15 - 10:00 | [Bayesian inference](./recordings/bayesian_inference.md) | [Prof Chris Mathys](https://chrismathys.com/) |
-| 10:00 - 10:20 | Introduction to connectivity | [Dr Peter Zeidman](https://peterzeidman.co.uk) |
+| 10:00 - 10:20 | Introduction to connectivity | [Prof Peter Zeidman](https://peterzeidman.co.uk) |
| *Tea & coffee* |
| 10:50 - 11:35 | [Introduction to DCM](./recordings/dcm_introduction.md) | [Dr Edda Bilek](https://www.zi-mannheim.de/en/research/people/person/5186.html)|
-| 11:35 - 12:20 | [DCM: Testing hypotheses](./recordings/dcm_hypothesis_testing.md) | [Dr Peter Zeidman](https://peterzeidman.co.uk) |
+| 11:35 - 12:20 | [DCM: Testing hypotheses](./recordings/dcm_hypothesis_testing.md) | [Prof Peter Zeidman](https://peterzeidman.co.uk) |
| 12:20 - 13:00 | Q&A clinic | SPM faculty |
| *Lunch* |
| 14:00 - 17:00 | Practical session III | SPM faculty |
diff --git a/docs/courses/fmri_vbm/programme_online.md b/docs/courses/fmri_vbm/programme_online.md
new file mode 100644
index 0000000..fdcadac
--- /dev/null
+++ b/docs/courses/fmri_vbm/programme_online.md
@@ -0,0 +1,90 @@
+# SPM Course - fMRI & VBM - 14th-16th October 2024
+
+!!! info "Overview"
+
+ This is the programme of the 2025 online [SPM course for fMRI and VBM](./index.md). The course consists of lectures and practical workshops where you will be guided through analyses of different neuroimaging datasets.
+
+ The course covers:
+
+ * Experimental design
+
+ * Preprocessing neuroimaging data
+
+ * Quantifying structural changes in the brain (Voxel-Based Morphometry, VBM)
+
+ * Quantifying brain function (using the General Linear Model, GLM)
+
+ * Statistics for neuroimaging (frequentist and Bayesian)
+
+ * Connectivity analysis (Dynamic Causal Modelling, DCM)
+
+## Course programme
+
+All times are local **London** (United Kingdom) time (**BST**).
+
+The course will take place on **Zoom**. We will send you an email with instructions on how to join in (or see below).
+
+Each lecture will be streamed at the indicated time. Recordings are also available on-demand through the links in the programme below.
+
+Each lecture will be followed by some **time for questions** from the audience and a **short break** before the next lecture.
+
+Questions can be asked at any time during the lectures using [Slack](https://join.slack.com/t/spmcoursefmri-put5820/shared_invite/zt-2sdquk69e-o9yanUUmytwbmvshZpPBxQ) or the Q&A window within Zoom: we will aim at answering them at the end of each lecture or during one of the Q&A sessions.
+
+Please do not share the link to this webpage publicly as it contains information for the participants of the course only (Zoom login).
+
+!!! info ""
+
+ *Zoom Meeting link*: [https://ucl.zoom.us/j/95164914953?pwd=aCpY2Ie42Q9nbmaxcvpbvN5yrgeGRY.1](https://ucl.zoom.us/j/95164914953?pwd=aCpY2Ie42Q9nbmaxcvpbvN5yrgeGRY.1)
+
+ *Zoom Meeting ID*: 951 6491 4953
+
+ *Zoom Meeting Passcode*: SPM2024
+
+Joining in requires a Zoom account, you can quickly [sign up here](https://zoom.us/signup) if you don't already have an account. Make sure to use the most up-to-date version of Zoom, you might have to update ahead of the course.
+
+### Monday 14th October
+
+| Time | Title | Faculty |
+| ----------------- | ------------------------------- | -------------------------------------- |
+| 09:30 - 09:45 | Welcome |
+| 09:45 - 10:00 | Introduction & overview | [Prof Peter Zeidman](https://peterzeidman.co.uk) & [Dr Olivia Kowalczyk](https://oliviakowalczyk.co.uk/) |
+| 10:00 - 11:05 | [Spatial preprocessing](./recordings/preprocessing.md) | [Prof John Ashburner](https://www.fil.ion.ucl.ac.uk/~john/) |
+| *Break* |
+| 11:25 - 11:50 | [The general linear model](./recordings/glm.md) | [Dr Nadège Corbin](https://scholar.google.com/citations?user=TjIzldkAAAAJ&hl=fr) |
+| 11:50 - 12:30 | [Contrasts & classical inference](./recordings/contrasts_classical_inference.md) | [Dr Vasileia Kotoula](https://www.kcl.ac.uk/people/vasileia-kotoula) |
+| *Lunch break* |
+| 13:30 - 14:10 | [Voxel-based morphometry](./recordings/vbm.md) | [Dr Christian Lambert](https://profiles.ucl.ac.uk/11034-christian-lambert) |
+| 14:10 - 14:50 | Q&A clinic | SPM faculty |
+| *Break* |
+| 15:20 - 17:20 | Practical session I | SPM faculty |
+
+
+### Tuesday 15th October
+
+
+| Time | Title | Faculty |
+| ----------------- | ------------------------------- | -------------------------------------- |
+| 09:30 - 09:35 | Welcome |
+| 09:35 - 10:25 | [Experimental design](./recordings/experimental_design.md) | [Prof Carolin Moessnang](https://www.zi-mannheim.de/en/research/people/person/6741.html) |
+| *Break* |
+| 10:40 - 11:50 | [Event-related fMRI](./recordings/event_related_fmri.md) | [Dr Sonia Medina](https://medicine.exeter.ac.uk/clinical-biomedical/people/profile/index.php?web_id=Sonia_Medina) |
+| *Lunch* |
+| 12:50 - 13:35 | [Group level analysis](./recordings/group_analysis.md) | [Prof Emma Holmes](https://emmaholmes.co.uk) |
+| 13:35 - 14:10 | [Random field theory](./recordings/random_field_theory.md) | [Prof Tom Nichols](https://www.bdi.ox.ac.uk/Team/t-e-nichols) |
+| 14:10 - 14:50 | Q&A clinic | SPM faculty |
+| *Break* |
+| 15:20 - 17:20 | Practical session II | SPM faculty |
+
+
+### Wednesday 16th October
+
+| Time | Title | Faculty |
+| ----------------- | ------------------------------- | -------------------------------------- |
+| 09:30 - 09:35 | Welcome |
+| 09:35 - 10:55 | [Bayesian inference](./recordings/bayesian_inference.md) | [Prof Chris Mathys](https://chrismathys.com/) |
+| 10:55 - 11:40 | [Introduction to DCM](./recordings/dcm_introduction.md) | [Dr Edda Bilek](https://www.zi-mannheim.de/en/research/people/person/5186.html)|
+| *Lunch* |
+| 12:40 - 13:40 | [DCM: Testing hypotheses](./recordings/dcm_hypothesis_testing.md) | [Prof Peter Zeidman](https://peterzeidman.co.uk) |
+| 13:40 - 14:20 | Q&A clinic | [Prof Karl Friston](https://www.fil.ion.ucl.ac.uk/~karl/) & SPM faculty |
+| *Break* |
+| 14:50 - 17:20 | Practical session III | SPM faculty |
diff --git a/docs/courses/fmri_vbm/recordings/bayesian_inference.md b/docs/courses/fmri_vbm/recordings/bayesian_inference.md
index 44b30aa..0b29afa 100644
--- a/docs/courses/fmri_vbm/recordings/bayesian_inference.md
+++ b/docs/courses/fmri_vbm/recordings/bayesian_inference.md
@@ -4,6 +4,6 @@ In this talk, [Prof Chris Mathys](https://chrismathys.com/) explores the fundame
Slides are available [here](../slides/2023/09_bayesian_inference.pdf).
-
+
---8<-- "addons/abbreviations.md"
\ No newline at end of file
+--8<-- "addons/abbreviations.md"
diff --git a/docs/courses/fmri_vbm/recordings/experimental_design.md b/docs/courses/fmri_vbm/recordings/experimental_design.md
index 8d08af8..d523ec9 100644
--- a/docs/courses/fmri_vbm/recordings/experimental_design.md
+++ b/docs/courses/fmri_vbm/recordings/experimental_design.md
@@ -2,8 +2,8 @@
In this talk, [Dr Carolin Moessnang](https://www.zi-mannheim.de/en/research/people/person/6741.html) explains the fundamental concepts of experimental designs in fMRI experiments. The goal is to provide an overview of different experimental designs and highlight important considerations when planning an fMRI study.
-Slides are available [here](../slides/2023/07_experimental_design.pdf).
+Slides are available [here](../slides/2024/07_experimental_design.pdf).
-
+
--8<-- "addons/abbreviations.md"
\ No newline at end of file
diff --git a/docs/courses/fmri_vbm/slides/2024/07_experimental_design.pdf b/docs/courses/fmri_vbm/slides/2024/07_experimental_design.pdf
new file mode 100644
index 0000000..f598f2c
Binary files /dev/null and b/docs/courses/fmri_vbm/slides/2024/07_experimental_design.pdf differ
diff --git a/docs/courses/index.md b/docs/courses/index.md
index 778922e..ac46915 100644
--- a/docs/courses/index.md
+++ b/docs/courses/index.md
@@ -20,8 +20,11 @@ We are delighted to welcome visitors to our SPM courses every May and October. T
---
- October 2024, **online**.
- More details will be announced soon.
+ April 2025, **in-person**.
+
+ October 2025, **online**.
+
+ More details will be announced soon.
diff --git a/docs/development/compilation/index.md b/docs/development/compilation/index.md
index 391cb7c..3e3a3e0 100644
--- a/docs/development/compilation/index.md
+++ b/docs/development/compilation/index.md
@@ -19,3 +19,19 @@ Platform-specific throubleshooting is available with the links above. We list he
!!! failure "`bad image handle dimensions` error"
The error "`bad image handle dimensions`" when trying to display an image is an indication that the MEX files are not compatible with your platform and should be recompiled.
+
+## Automatic recompilation on GitHub Actions
+
+!!! info "How is the recompilation triggered?"
+
+ If new `.c`, `.cpp`, `.h` or `.hpp` files or changes of those are pushed to `main`, the [compile MEX](https://github.com/spm/spm/actions/workflows/compile_mex.yml) action will automatically run and recompile all MEX files. In can also be triggered manually, which works for a any branch.
+
+The compiled MEX files will be available as zip a file under the [compile MEX](https://github.com/spm/spm/actions/workflows/compile_mex.yml) action by selecting the corresponding run of the action and downloading the `spm-mex-all.zip` file. It contains compiled MEX files for Windows, Linux, MacOS (Intel) and MacOS (Apple Silicon).
+
+The suggested steps after changing or adding new c code are:
+
+1. Confirm that the [automatic tests](https://github.com/spm/spm/actions/workflows/matlab.yml) still succeed
+2. Download the [automatically compiled MEX files](https://github.com/spm/spm/actions/workflows/compile_mex.yml)
+3. Manually add the MEX files of the corresponding change to the SPM repository (.mexa64, .mexmaca64, .mexmaci64, .mexw64)
+
+Note: Currently, the action doesn't compile the external c dependencies. This is because of a problem of compiling the fieldtrip dependency on windows.
diff --git a/docs/development/guidelines.md b/docs/development/guidelines.md
index 13e684a..55e8de5 100644
--- a/docs/development/guidelines.md
+++ b/docs/development/guidelines.md
@@ -1,4 +1,4 @@
-# Developer Guidelines for SPM
+# Style and testing for SPM
These guidelines are designed to make it as easy as possible to get involved.
If you have any questions that are not discussed in our documentation, or if it is
@@ -10,12 +10,12 @@ difficult to find what you are looking for, please let us know by opening an
In short the general formatting guidelines are:
-* Use 4 spaces per indentation level, no tabs.
* Use whitespace to make the code more readable.
* No whitespace at the end of a line (trailing whitespace).
* Comments are good, especially when they explain the algorithm.
* Try to adhere to a 76 character line length limit.
* Use lower case with underscores for function names.
+* avoid use of varargin and nargin
* Avoid padding brackets with spaces. For example, `spm_fcn(value)` is preferred over `spm_fcn( value )`.
New functions should follow this overall format:
@@ -49,50 +49,6 @@ function [R1,...] = spm_fcn(P1,...)
%--------------------------------------------------------------------------
```
-
-## Pull Requests
-
-Git recommendations for pull requests:
-
-* Avoid working from the `main` branch of your fork, creating a new branch will make it easier if `spm`'s `main` changes and you need to update your pull request.
-* Try to squash together small commits that make repeated changes to the same section of code so your pull request is easier to review, and `spm`'s history won't have any broken intermediate commits. A reasonable number of separate well-factored commits is fine, especially for larger changes.
-* If any conflicts arise due to changes in `spm`'s `main`, prefer updating your pull request branch with `git rebase` versus `git merge` or `git pull`, since the latter will introduce merge commits that clutter the git history with noise that makes your changes more difficult to review.
-* Descriptive commit messages are good.
-* Using `git add -p` or `git add -i` can be useful to avoid accidentally committing unrelated changes.
-* GitHub does not send notifications when you push a new commit to a pull request, so please add a comment to the pull request thread to let reviewers know when you've made changes.
-
-## Merges
-
-Git recommendations for pull request reviewers:
-
-* When merging, we generally like `squash+merge`. Unless it is the rare case of a PR with carefully staged individual commits that you want in the history separately, in which case `merge` is acceptable, but usually prefer `squash+merge`.
-
-
\ No newline at end of file
+## Dependencies
+SPM is designed to be as designed to rely on as few extra toolboxes as possible. As such we advise against including code that is not available in base MATLAB. There is an exception to this rule for M/EEG development as SPM bundles Fieldtrip with in its distribution, so developers may call Fieldtrip functions.
+
\ No newline at end of file
diff --git a/docs/development/testing.md b/docs/development/testing.md
index e4642d0..3756665 100644
--- a/docs/development/testing.md
+++ b/docs/development/testing.md
@@ -1,59 +1,91 @@
# Testing
+Testing is the process by which we check if our code is valid and robust. It allows developers to make changes to SPM and then run the automated tests to check that their code does not break other aspects of SPM. We test on Windows, MAC and Linux, using Matlab releases as far back as 2020. The configuration file for the automatic testing workflow is available [in the Github repo](https://github.com/spm/spm/blob/main/.github/workflows/matlab.yml). It is not necessary to understand this file to contribute tests to SPM or run them locally on your machine. The outcomes are available from the [GitHub Actions tab](https://github.com/spm/spm/actions).
-## Unit testing framework
+Their are two types of tests used in SPM. These are unit tests and regression tests. Unit tests are ideally short code segments that test the validity of a function. In short, does the code do what it is supposed to do? Regression tests determine if the changes in the code cause a change in the results. They do not necessarily test validity, only code stability.
-SPM testing is performed using the [MATLAB Unit Testing Framework](https://www.mathworks.com/help/matlab/matlab-unit-test-framework.html).
-SPM unit tests are stored in the [`spm/tests`](https://github.com/spm/spm/tree/main/tests) directory. The can be executed by calling the [`spm_tests`](https://github.com/spm/spm/blob/main/spm_tests.m) function. Individual tests can be run as follow:
+## Running tests locally
+The testing framework runs unit tests every day and regression tests once a week automatically on GitHub. However, you can also run the code locally on your machine before contributing code. Some of the tests require input data that can be downloaded from [here](https://www.fil.ion.ucl.ac.uk/spm/download/data/tests/tests_data.zip). This archive has to be unpacked into a directory within your local copy of SPM called `spm/tests/data` before running the tests.
+
+Once the data is downloaded the all the unit tests can be run with the following code snippet.
+
+```matlab
+spm_tests('class','unit')
+```
+
+All of the regression tests can be run with the following code snippet.
```matlab
->> spm_tests test spm_Ncdf
-
-SPM12: spm_tests 12:00:00 - 01/01/2023
-========================================================================
-Running test_spm_Ncdf
-.......
-Done test_spm_Ncdf
-__________
-
-Totals:
- 7 Passed, 0 Failed, 0 Incomplete.
- 0.016786 seconds testing time.
+spm_tests('class','regression')
```
-Some tests require input data that can be downloaded from [here](https://www.fil.ion.ucl.ac.uk/spm/download/data/tests/tests_data.zip). This archive has to be unpacked into a `spm/tests/data` directory before running the tests.
+A specific unit test can be run by supplying the function with the test name.
+```matlab
+spm_tests('class','unit','test','test_spm_opm_hfc')
+```
-## Continuous integration
+A specific regression test can be run by supplying the function with the test name.
-[Continuous integration on GitHub](https://www.mathworks.com/help/matlab/matlab_prog/continuous-integration-with-matlab-on-ci-platforms.html#mw_6cb5114e-198f-48b2-9d94-e1efd7bf653c) takes place with [MATLAB GitHub Actions](https://github.com/matlab-actions). The configuration file for the testing workflow is available [here](https://github.com/spm/spm/blob/main/.github/workflows/matlab.yml) and the outcomes are available from the [GitHub Actions tab](https://github.com/spm/spm/actions).
+```matlab
+spm_tests('class','regression','test','test_regress_spm_opm')
+```
-## Adding unit tests
-To add new unit tests to SPM, please follow the instructions from the [MATLAB documentation](https://www.mathworks.com/help/matlab/matlab-unit-test-framework.html). [Function-based unit tests](https://www.mathworks.com/help/matlab/function-based-unit-tests.html) are favoured for now.
+## Contributing Tests
+SPM testing is performed using the [MATLAB Unit Testing Framework](https://www.mathworks.com/help/matlab/matlab-unit-test-framework.html).
-To write unit tests for SPM function `spm_example.m`, create a file `spm/tests/test_spm_example.m` containing:
+SPM tests are stored in the [`spm/tests`](https://github.com/spm/spm/tree/main/tests) directory. Please place any tests you write here. We'll now look at an example of a unit test to test the validity of the `spm_eeg_filter` function. The first thing to do is is write a small amount of code that will run all the tests in a given `.m` file.
```matlab
-function tests = test_spm_example
-% Unit Tests for spm_example
+function tests = test_spm_eeg_filter
+% Unit Tests for spm_eeg_filter
%__________________________________________________________________________
-% Copyright (C) 2023 Wellcome Centre for Human Neuroimaging
+% Copyright (C) 2024 Wellcome Centre for Human Neuroimaging
tests = functiontests(localfunctions);
+```
+After this section is written we can now write multiple functions in the same file to test different aspects of the code. The first thing to note is that the test function, shown below, has the same name as the top function but is suffixed with an underscore and a number(e.g. `_1`). For multiple tests of the same function just simply change the number of the suffix. In the example below we just have 1.
+
+If you have placed the test data in the appropriate folder you'll be able to access it with the code below. The data in this case is an empty M/EEE dataset of 1 second duration and 110 channels.
+
+
+```matlab
+function test_spm_eeg_filter_1(testCase)
+
+spm('defaults','eeg');
+
+fname = fullfile(spm('Dir'),'tests','data','OPM','test_opm.mat');
+D = spm_eeg_load(fname);
+D = chantype(D,1:110,'MEG');
+D.save();
+
+% create 40Hz sinusoid
+test = repmat(sin(2*pi*40*(0:.001:.999)),110,1);
+D(:,:,1)= test;
+D.save();
+
+% try and remove sinusoid
+S=[];
+S.D=D;
+S.band='low';
+S.freq=4;
+fD = spm_eeg_filter(S);
+% check that amplitude reduced by at least 100dB
+Y = mean(std(D(:,900:1000,1),[],2));
+res = mean(std(fD(:,900:1000,1),[],2));
-function test_spm_example_1(testCase)
-exp = pi;
-act = 3.1415926535897;
-tol = 1e-12;
-testCase.verifyEqual(act, exp,'AbsTol',tol);
+dB = 20*log10(mean(Y./res));
-function test_spm_example_2(testCase)
+testCase.verifyTrue(dB>100);
```
+In the example above we set the channels to 'MEG' channels and then insert a 40Hz sinusoid. We then apply a low pass filter and verify that the magnitude of the signal is reduced by at least 100dB at 40Hz. Once you establish your criteria for assessing the validity of the function you can end the function with `testCase.verifyTrue(condition)`.
-## Regression tests
+## Contributing Regression Tests
+Regression tests can be contributed in the exact same way as unit tests but we prefix the test with `test_regress`. See the `test_regress_spm_opm` as an example.
-Beyond unit tests, regression tests are also performed on the SPM codebase (to be documented).
+## A final note
+As we run the tests on many versions of MATLAB and different operating systems, your 3-minute test may take 1 hour to run across these permutations. As such, please try to keep tests to a few seconds in length. Regression tests can be a bit longer, because there are less of them and they run less often. If you are concerned about your test or its duration, reach out to someone in the SPM Development team.
diff --git a/docs/development/versioning.md b/docs/development/versioning.md
new file mode 100644
index 0000000..3ae9c42
--- /dev/null
+++ b/docs/development/versioning.md
@@ -0,0 +1,30 @@
+# SPM version numbers
+SPM has a **version** and a **release**. At the time of writing, the version is **SPM12** and the release is **dev**.
+
+Other toolboxes that depend on SPM use this information to check whether a compatible SPM version is installed. A common pattern is to split the version string into two parts, e.g. SPM12 becomes **SPM** and **12**, and then the latter part is compared to the desired version number.
+
+## Transition to calendar versioning
+SPM is moving towards [calendar versioning](https://calver.org/).
+
+The proposed new format is **YY.0M[.MICRO]**, where YY is the short year (e.g. 24 for the year 2024), 0M is the zero padded month (e.g. 06 for June or 12 for December) and .MICRO is an optional integer for patches.
+
+For backward compatibility, the proposal is to set the version and release as follows:
+
+- **Version**: SPMYY, where YY is the year of the most recent release, e.g. SPM24
+- **Release**: either 00.00 for the development version on Github or for a release: YY.0M[.MICRO], e.g. 24.07 for July 2024
+
+## Where the SPM version number is stored
+The SPM version is stored on the second line of the file Contents.m in the root directory, or Contents.txt when SPM is in deployed mode (i.e., compiled).
+
+## Querying SPM’s version number
+To obtain the version and release call:
+
+```Matlab
+[v, r] = spm('ver')
+```
+
+where v is the version and r is the release. For convenience, to return the version and release as a single string, instead call:
+
+```Matlab
+spm('version')
+```
diff --git a/docs/manual/dartelguide/dartelguide.md b/docs/manual/dartelguide/dartelguide.md
index 34bb4e2..e097546 100644
--- a/docs/manual/dartelguide/dartelguide.md
+++ b/docs/manual/dartelguide/dartelguide.md
@@ -292,6 +292,9 @@ processed as following:
*SPM:material-arrow-right-bold:Tools:material-arrow-right-bold:Dartel Tools:material-arrow-right-bold:Run Dartel
(create Templates)* in order to generate a series of templates and a
flow field for each subject.
+ Previous steps processed each subject's data individually, but this stage requires
+ imported data for all subjects in a study to be processed together.
+ The idea is to align all subject's data to the average anatomy of the study population.
In principle (for a random effects model), you could run the first level
analysis using the native space data of each subject. All you need are
diff --git a/docs/tutorials/fmri/block/preprocessing/batch.md b/docs/tutorials/fmri/block/preprocessing/batch.md
index 68ab807..e31ec9e 100644
--- a/docs/tutorials/fmri/block/preprocessing/batch.md
+++ b/docs/tutorials/fmri/block/preprocessing/batch.md
@@ -37,7 +37,7 @@ The SPM batch interface allows you to create workflows for executing multiple pr
10. Complete the segmentation module:
1. Select `Data` :material-arrow-right-bold: `Volumes` :material-arrow-right-bold: `Dependency`.
2. In the pop-up window, select the coregistered anatomical image `Coregister: estimate: coregistered images` and press `OK`.
- 3. Select `Save bias corrected` :material-arrow-right-bold: `Save bias corrected`.
+ 3. Select `Save bias corrected` :material-arrow-right-bold: `Save bias corrected` (`Save INU corrected` in newer SPM versions).
4. Select `Deformation fields` :material-arrow-right-bold: `Forward`.
11. Add the **normalisation** module - `SPM` :material-arrow-right-bold: `Spatial` :material-arrow-right-bold: `Normalise` :material-arrow-right-bold: `Normalise: write`.
12. Complete the normalisation module:
@@ -55,4 +55,4 @@ The SPM batch interface allows you to create workflows for executing multiple pr
3. Select `FWHM` and change `[8 8 8]` to `[6 6 6]`.
15. Now that all your preprocessing steps have been specified, save this batch - `File` :material-arrow-right-bold: `Save batch and script` and name it, e.g. `preprocessing_batch.mat`. **Make sure you select `Save batch and script` not `Save batch`. This will be important for the next step.**
-You can now run this batch to execute all selected preprocessing steps for this subject by clicking :material-play: or use it to create a matlab script to process data from multiple subjects.
\ No newline at end of file
+You can now run this batch to execute all selected preprocessing steps for this subject by clicking :material-play: or use it to create a matlab script to process data from multiple subjects.
diff --git a/docs/tutorials/vbmcourse24/preprocessing.md b/docs/tutorials/vbmcourse24/preprocessing.md
index d23756c..ae0f4f2 100644
--- a/docs/tutorials/vbmcourse24/preprocessing.md
+++ b/docs/tutorials/vbmcourse24/preprocessing.md
@@ -129,7 +129,7 @@ Importantly, this process estimates a population average template. This is a typ
This step uses the resulting `y_rc1` files (deformation fields), to generate smoothed, spatially normalised and Jacobian scaled grey matter images in MNI space.
From here we need to select `SPM` :material-arrow-right-bold: `Tools` :material-arrow-right-bold: `Shoot tools` :material-arrow-right-bold: `Write normalised`
-* **Shoot Template**: Select the final template image created in the previous step. This is usually called Template\_4.nii. This template is registered to MNI space (affine transform), allowing the transformations to be combined so that all the individual spatially normalised scans can also be brought into MNI space.
+* **Shoot Template**: Select the final template image created in the previous step. This is usually called Template\_4.nii and can be found in the first subject's directory. This template is registered to MNI space (affine transform), allowing the transformations to be combined so that all the individual spatially normalised scans can also be brought into MNI space.
* **Select according to**: Choose **Many Subjects**, as this allows all deformation fields to be selected at once, and then all grey matter images to be selected at once.
@@ -149,11 +149,12 @@ From here we need to select `SPM` :material-arrow-right-bold: `Tools` :material-
* **Gaussian FWHM**: Specify the size of the Gaussian (in mm) for smoothing the processed data by. This is typically between about 4mm and 12mm. Use 6mm for now.
-The optimal value for FWHM depends on many things, but one of the main ones is the accuracy with which the images can be registered.
-If spatial normalisation (inter-subject alignment to some reference space) is done using a simple model with fewer than a few thousand parameters, then more smoothing (eg about 12 mm FWHM) would be suggested.
-For more accurately aligned images, the amount of smoothing can be decreased.
-About 8mm may be suitable, but there is not much empirical evidence to suggest appropriate values.
-The optimal value is likely to vary from region to region: lower for subcortical regions with less variability, and more for the highly variable cortex.
+??? info "How much to smooth?"
+ The optimal value for FWHM depends on many things, but one of the main ones is the accuracy with which the images can be registered.
+ If spatial normalisation (inter-subject alignment to some reference space) is done using a simple model with fewer than a few thousand parameters, then more smoothing (e.g. about 12 mm FWHM) would be suggested.
+ For more accurately aligned images, the amount of smoothing can be decreased.
+ About 8mm may be suitable, but there is not much empirical evidence to suggest appropriate values.
+ The optimal value is likely to vary from region to region: lower for subcortical regions with less variability, and more for the highly variable cortex.
{width=50%}
diff --git a/mkdocs.yml b/mkdocs.yml
index 63f9893..0977fec 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -205,6 +205,7 @@ nav:
- 'Guidelines': 'development/guidelines.md'
- 'Testing': 'development/testing.md'
- 'Compilation': 'development/compilation/index.md'
+ - 'Versioning': 'development/versioning.md'
markdown_extensions:
- abbr