Repository navigation
SPM26 is out now! #185
SPMcentral
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
SPM 26.10.01
We are delighted to announce the first release of SPM26!
SPM26 is a major new version covering all changes since SPM25 (25.01.02, 23 January 2025): around 370 commits from 30 contributors. The notes below highlight some of the larger changes.
MATLAB and standalone versions are available at 26.10.01.
Best
The SPM Development Team
Release Notes
General
Changes
• Default print format is now PDF (defaults.ui.print = 'pdf', was 'ps'). Results and graphics printouts go to spm_.pdf; scripts that look for .ps files need updating. Thanks to Tom Nichols.
Anatomy / pre-processing
New features
• SCOPE (susceptibility correction using opposite phase-encoding) now supports an initial voxel displacement map (VDM), either loaded as input or estimated from EPI phase images. The batch interface provides three options: no initial VDM, load an existing VDM, or calculate a VDM from an EPI phase image. New scripts include spm_est_vdm_from_phase to estimate a VDM from phase images, spm_smooth_extrap to extrapolate the VDM beyond the brain boundaries, and spm_mask_from_segments to create a brain mask from tissue segmentations.
• Julia from within SPM (spm_julia, in the Spatial toolbox): installs Julia and packages into a local depot after asking for consent, and runs Julia code. Currently used by the ROMEO phase unwrapper for field-map estimation within SCOPE functions. (Dymerska et al. 2021, MRM, doi:10.1002/mrm.28563) Note for cluster and offline users: this downloads from the internet at run time.
• DICOM: 3D MR Spectroscopic Imaging (MRSI) DICOM images can now be converted to 5D NIfTI with correct orientation; phase images get a '-Phase' filename suffix.
Changes
• Much faster NIfTI header writing (single write of an in-memory buffer).
• Realign & Unwarp: Jacobian modulation is now OFF by default (defaults.unwarp.write.jm = 0). SCOPE likewise defaults to no Jacobian modulation and its output prefix is now 'vdm5_'. Jobs relying on the old defaults will produce different output.
• Realign & Unwarp: first-order effects may be left empty and the number of iterations set to zero, allowing a static field-map-only correction.
Removed / breaking changes
• FieldMap: pm_segment and the bundled T1/grey/white/csf templates removed (masking has used Segment with tpm/TPM.nii since SPM25).
• spm_topup and spm_topup_config removed from the Spatial toolbox; SCOPE (spm_scope, batch Tools > Spatial > SCOPE) is the replacement. Only scripts calling spm_topup directly are affected.
fMRI
New features
• Batch F-contrasts can be specified as a reduced model (list of design columns to include or exclude), matching the contrast manager GUI.
• spm_EC_density: Euler characteristic densities for Z, T, F and chi-squared fields in any dimension, numerically stable at high degrees of freedom.
Changes
• Results printouts default to PDF (see General).
• Results UI updated for R2025a and later.
M/EEG
New features
• Template-based DBS artefact removal for EEG (spm_eeg_remove_dbs_artefact, MEEGtools; based on Peeters et al. https://doi.org/10.1016/j.neurom.2021.11.002).
• Simulation of cortical-mesh distortion examples (spm_sim_example_distort_mesh and a DAiSS variant, MEEGtools) with a regression test.
• DAiSS: example LCMV pipelines for heartbeat-evoked potentials (bf_pipeline_LCMV_HEP_*); contributed by Rania Iman Virjee (see https://doi.org/10.64898/2026.07.11.737958)
• Bayesian spectral decomposition (BSD) toolbox added (Medrano et al., 2025; https://doi.org/10.1111/ejn.70149). A toolbox for analysing neural spectral power. BSD supports model comparison between different parametric models of spectra, such as the inclusion or exclusion of certain peaks.
• Testing: Wakeman & Henson multimodal pipeline regression test and associated batch jobs; mesh-distortion regression test.
Changes
• FieldTrip updated to the October 2026 release branch and now kept in sync automatically.
Bug fixes
• spm_eeg_downsample stored the requested rather than the achieved sampling rate, which was wrong for non-integer ratios.
• DAiSS: bf_view_glass accepts inputs from bf wizard methods.
Removed / breaking changes
• spm_eeg_invert_setuppatches now uses first-order mesh neighbours rather than geodesic distance, so patch extents differ from SPM25.
• spm_eeg_invertiter and its batch no longer reset the random seed; set the seed yourself for bit-reproducible results. inverse.SHUFFLELEADS renamed inverse.Lshuffle.
• bf_wizard_headmodel now returns [D, matlabbatch, headmodel] and runs the job by default.
DCM
New features
• DCM for M/EEG regression test suite (tests/DCM_Test_Suite): 117 tests over nine neural mass models (ERP, SEP, LFP, CMC, CMM, NMM, MFM, NMDA, CMM_NMDA), three integrators and five datasets, checking Jacobian stability, steady-state initialisation, integrator agreement and ERP/CSD fits against stored reference values.
• Time-varying effective connectivity demos (Neural_Models/DEMO_tvec_*): temporal basis functions for slow modulation of synaptic efficacy in DCM for ERP and CSD (Medrano, Friston & Zeidman 2024).
Numerical changes (please read if you compare results with SPM25)
• Conductance-based DCMs (NMDA and CMM_NMDA) are now initialised at a numerically solved fixed point. Previously only CMM was solved; NMDA and CMM_NMDA kept the hard-coded initial states. Together with the NMDA Jacobian fix, ERP and CSD predictions, free energies and posterior estimates for these models will differ from SPM25. Users of conductance-based DCMs should re-estimate models rather than mix SPM25 and SPM26 results. (The net input scaling in spm_fx_cmm_NMDA is unchanged from SPM25.)
• spm_nlsi_GN no longer applies solenoidal mixing to Gauss-Newton steps (SPM25 did so despite a comment saying it was disabled). The fixed points are the same but the iterates differ, so free energies and posteriors for all spm_nlsi_GN-based DCMs (fMRI, ERP, CSD, ...) may differ slightly from SPM25.
OPM Toolbox
New features
• Coil-based array calibration: spm_opm_calibrate_from_coils estimates sensor positions, orientations and gains from external coil activations (e.g. QuSpin HALO), with an option to bootstrap the inputs; spm_opm_apply_calibration applies the result to MEG datasets.
• SSP denoising for arrays with inhomogeneous noise: spm_opm_ssp applies the signal space projection algorithm to OPM data. It supports arrays of OPMs that do not have equal variance across channels (e.g 3rd axis of Fieldline and Mag4Health systems have higher sensor white noise than their first and second axes ).
• Anatomical 2D layouts (spm_get_anatomical_layout): addedrepresentation of tangential channels and scaled output to match expected input to topoplot methods in SPM (Alexander et al. 2025, EJN).
• spm_opm_psd: improved interactive bad-channel selection.S.interact, S.plotbad and S.select arguments replaced by S.selectbad;
• spm_opm_create: Improvements to FieldLine FIF import and automatic selection of sampling frequency.
Bug fixes
• AMM (spm_opm_amm): Allows spheroid fitting to work on arrays where the second axis is not the longest axis
• spm_opm_create Neuro-1: channel names are allocated based on the raw data. Peripheral files (e.g. positions.tsv) must match this naming convention.
Active Inference / DEM Toolbox
The DEM toolbox has gained around 130 new functions and demos, and several core routines have been revised. Highlights, grouped by theme:
New features
• Renormalising generative models and fast structure learning from images and sound: spm_mdp2rdp / spm_rdp2mdp and the spm_RDP_* family, spm_fast_structure_learning and variants, spm_daisy_chain, spm_mdp_compress, image/audio encoders (spm_rgb2O, spm_wav2O, ...). Demos: DEM_Atari*, DEM_MNIST*, DEM_compression and image/video/sound/music/chaos compression.
• Sophisticated inference and planning (spm_MDP_VB_XXX): Demonstrations include DEM_Tower, DEM_Tower_of_Hanoi, DEM_Pong, maze demos, DEM_thermostat (multiple constraint satisfaction), DEM_laws (context-sensitive preferences), DEM_syntax, DEM_federation, DEM_reasoning with spm_MDP_rules / spm_MDP_BMR (expected information gain over models).
• Non-equilibrium steady state and Helmholtz-Hodge generative models: spm_fx_NESS, spm_NESS_priors, spm_ness_cond_inv, DEM_ness_Lap, forecasting (spm_NESS_forecast*), financial modelling (DEM_FIN, spm_portfolio), DEM_paths / DEM_reverse_paths, DEM_metric_BMR, FEP_biology and DEM_swarm (self-organisation and Markov blankets).
• Generalised filtering / ADEM: ADEM_physics, spm_ADEM_UNITY, spm_DEM_G, spm_DEM_embed_path.
• Epidemiology: DEM_COVID_MASKS, DEM_masks_Cam, updated DEM_COVID_UK4; DEM_Diabetes.
• Dirichlet and information-geometry utilities: spm_dir_H, spm_dir_disentangle, spm_dir_orbits, spm_information_distance, spm_unique, spm_i2p, spm_index, spm_mwt / spm_imwt.
• DEM GUI (DEM_demo) extended with buttons for the new demos.
Changes and numerical differences
• spm_MDP_VB_XXX substantially refactored: OPTIONS.A removed (process detected automatically); MDP.link / MDP.demi replaced by MDP.id; new MDP.V (policies), MDP.H/h (priors over final states) and MDP.beta; defaults eta 1 -> 512 and chi 1/64 -> 512 (chi is now an action precision, not an Occam window).
• Bayesian model reduction / sleep: spm_MDP_VB_prune signature changed and now performs soft (softmax-weighted) reduction by default; spm_MDP_VB_sleep and spm_MDP_VB_update default BMR.T 2 -> 0 and replay with spm_MDP_VB_XXX; OPTIONS.eta forgetting removed; spm_MDP_log_evidence adds 1/32 to counts.
• spm_MDP_MI and spm_dir_MI rewritten with different estimators; spm_KL_dir floors counts; spm_MDP_structure_learning signature changed.
• DEM/ADEM core: spm_ADEM_set no longer auto-transposes DEM.U and DEM.C (must be causes x time); spm_ADEM E-step integration time 2 -> 4 ; spm_DEM_M_set no longer accepts inline string expressions for M.f / M.g (use function handles); spm_DEM_embed delay no longer divided by dt; spm_DEM uses spm_inv rather than spm_pinv. Demo outputs will differ from SPM25.
• Generic utilities extended (backward compatible): spm_combinations accepts cells, spm_dir_norm handles cells and zero columns, spm_speye power argument, spm_dot singleton handling and full-double output, spm_cross and spm_vecfun extra arguments.
Removed
• spm_VBX moved into toolbox/DEM; signature now spm_VBX(O,P,A,id), the 'full' / 'exact' / 'sparse' / 'marginal' METHOD options are deprecated (belief propagation only).
All reactions