Skip to content

Commit

Permalink
Merge branch 'spm:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Bezs authored Nov 18, 2024
2 parents 4fbd654 + dc8d2fa commit 5e76b4a
Show file tree
Hide file tree
Showing 16 changed files with 235 additions and 101 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
4 changes: 3 additions & 1 deletion docs/courses/fmri_vbm/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
</div>

!!! info inline end "Course recordings"
Expand Down
8 changes: 4 additions & 4 deletions docs/courses/fmri_vbm/programme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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* |
Expand Down Expand Up @@ -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 |
90 changes: 90 additions & 0 deletions docs/courses/fmri_vbm/programme_online.md
Original file line number Diff line number Diff line change
@@ -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 |
4 changes: 2 additions & 2 deletions docs/courses/fmri_vbm/recordings/bayesian_inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<iframe width="560" height="315" src="https://www.youtube.com/embed/vvea8DcD3xw?si=wTd6NEWoMRHyKMiN" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Kxl9QTfnDFo?si=9HawNOIPwVyzqZYs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

--8<-- "addons/abbreviations.md"
--8<-- "addons/abbreviations.md"
4 changes: 2 additions & 2 deletions docs/courses/fmri_vbm/recordings/experimental_design.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<iframe width="560" height="315" src="https://www.youtube.com/embed/8m62gGbDu7w?si=ir_g6MuUSWlbKrGi" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/9IHfAznA5Lw?si=4KHluJGR2Tnit7Fq" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

--8<-- "addons/abbreviations.md"
Binary file not shown.
7 changes: 5 additions & 2 deletions docs/courses/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

</div>

Expand Down
16 changes: 16 additions & 0 deletions docs/development/compilation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
54 changes: 5 additions & 49 deletions docs/development/guidelines.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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`.

<!--
### Supported Versions
### Naming Conventions
### Testing
See [Testing](testing/).
### Documentation
See [spm-docs](https://github.com/spm/spm-docs/)
### Git Repository
See [Git](git/).
#### Layout
#### Commit Messages
See [Git](git/).
### Changelog
### Deprecations
-->
## 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.

Loading

0 comments on commit 5e76b4a

Please sign in to comment.