Releases: danclab/laMEG
v0.1.4
laMEG v0.1.4 — 2026-03-20
This release introduces a major extension of laMEG’s inversion framework, adding sliding window EBB, an interface for EBBlayer, a new version of EBB specialized for laminar inference, and substantially improving the consistency and flexibility of the inversion API.
✨ Highlights
- Time-resolved laminar inference (sliding-window EBB / EBBlayer)
- This version adds full support for sliding-window inversion, enabling estimation of laminar profiles across time. This applies to both classic EBB and EBBlayer
- A new tutorial demonstrates this workflow: tutorial_09_sliding_layer_ebb
🧠 Laminar modeling improvements
- Explicit EBBlayer interface
- This implementation exposes the full EBBlayer formulation, combining:
Independent priors (classic EBB)
Correlated sum priors (shared activity across layers)
Correlated difference priors (depth-specific contrast) - These priors are combined using ReML to adaptively explain laminar structure in the data .
⚙️ API improvements and consistency
- Unified inversion interface
- All inversion functions (EBB, EBBlayer, MSP, and their sliding-window variants) now share a consistent API:
- n_spatial_modes supports 'auto' and 'all'
- inversion_idx allows multiple inversions per dataset
- Standardized handling of foi, woi, and windowing
- Consistent return structure across methods
This significantly reduces friction when switching between inversion strategies. - Refactoring and modularization
Core inversion routines have been refactored into shared internal functions (e.g. _invert_ebb_base), reducing redundancy and improving maintainability.
Sliding-window and static inversions now rely on the same internal logic, ensuring consistent behavior across use cases.
🧰 Forward model flexibility
The coregister function now supports multiple forward models, including:
- Single Shell (default)
- Single Sphere
- Local Spheres
- OpenMEEG BEM
Additional surfaces (inner skull, outer skull, scalp) can also be specified explicitly, enabling more flexible head modeling pipelines .
📚 Documentation and usability
- New sliding-window laminar tutorial (Tutorial 09)
- Updated documentation build system (including post-install step and favicon support)
- Improved doc import behavior for full module visibility during Sphinx builds
👥 Contributors
@solenegailhard — initial implementation of sliding-window inversion and tutorial
🔗 Full changelog
v0.1.3...v0.1.4
v0.1.3
laMEG v0.1.3 — 2025-11-03
🚀 Major New Features
- Automatic scalp surface generation
convert_legacy_surfaces.pyandLayerSurfaceSetnow automatically generate and save scalp surfaces (outer_skin.raw.gii, outer_skin.converted.gii) using MNE’s BEM functions.- Surfaces are correctly converted to scanner RAS coordinates and stored under
<SUBJECTS_DIR>/<subject>/bem/.
Improved mesh utilities
- Added
_fix_surface_holes()— closes small topological gaps in inflated and other surfaces using VTK’svtkFillHolesFilter. - Added
get_layer_vertices()andget_interlayer_distance()— utilities for mapping across laminar columns and computing interlayer spacing.
Head surface handling
- Introduced
load_head_mesh()for consistent access to scalp, inner skull, and outer skull GIFTI surfaces. get_distance_to_scalp()andget_radiality_to_scalp()now rely onload_head_mesh().
Visualization
- Added
verify_coregistration()inviz.pyto visualize coregistration results interactively in 3D (via k3d).
🧩 Core Improvements
coregister()now accepts custom scalp, inner-skull, and outer-skull surface filenames.- Automatically repairs holes in inflated meshes after downsampling.
Post-installation
- Streamlined logging in
postinstall.py(removed redundant console prints; unified logging output).
📚 Documentation Updates
- Added clearer post-installation step (lameg-postinstall).
🧾 Miscellaneous
- CI workflow now downloads test data from updated OSF URL (https://osf.io/hbrga/download).
Full Changelog: v0.1.2...v0.1.3
v0.1.2
laMEG v0.1.2 — 2025-10-29
⚙️ Installation
- Moved SPM installation and k3d setup to postinstall script - lameg-postinstall.
🧰 CI
- Updated GitHub Actions workflow to use new postinstall script.
Full Changelog: v0.1.1...v0.1.2
v0.1.1
laMEG v0.1.1 — 2025-10-29
🧩 Enhancements
- Added new method LayerSurfaceSet.get_multilayer_vertex() for consistent vertex indexing across multilayer meshes.
- Replaced VTK-based decimation with MATLAB’s reducepatch for surface downsampling.
- Added a new tutorial: “Anatomical Predictors of Laminar Inference Accuracy” (tutorial_07_anatomy_inference_accuracy).
🧠 Documentation
- Updated all tutorials (tutorials/tutorial_0*_*.py and notebooks) to use get_multilayer_vertex() for vertex mapping.
⚙️ Dependencies
- Removed vtk dependency and added numpy-stl (v3.1.2) for STL mesh loading.
- Updated numpy requirement from 1.19.5 → 1.21.6 for compatibility.
🧰 CI
- Updated GitHub Actions workflow to use new test dataset.
Full Changelog: v0.1.0...v0.1.1
v0.1.0
Major Structural and Interface Update
This release introduces the LayerSurfaceSet class, a unified interface for managing, validating, and visualizing laminar surface hierarchies. All laminar surfaces are now stored under <SUBJECTS_DIR>/<subject_id>/surf/laminar, and co-registration automatically uses <SUBJECTS_DIR>/<subject_id>/mri/orig.mgz. A conversion script (convert_legacy_surfaces.py) is provided to update surfaces from earlier versions to this standardized format.
Core modules have been extensively refactored for clarity, documentation, and reliability:
-
surf.py: consolidated surface management and validation underLayerSurfaceSet. -
simulate.py: improved documentation and argument structure for SPM-based MEG simulations. -
util.py: centralizes environment and dependency checks (e.g., FreeSurfer path validation). -
laminar.pyandinvert.py: updated to use the new surface interface. -
Visualization (
viz.py): new support for surface rendering via show_surface.
Documentation and tutorials have been rewritten to reflect the new data structure and API. This version marks the formal stabilization of laMEG’s laminar surface handling framework.
Full Changelog: v0.0.7...v0.1.0
v0.0.7
v0.0.6
Full Changelog: v0.0.5...v0.0.6
v0.0.5
What's Changed
- [ENH] Added Inversion Check by @samadpls in #10
- Windows installation instructions by @ludovicdmt and @quentinmoreau
- Move parallel settings from json to spm context manager by @maciekszul
New Contributors
- @samadpls made their first contribution in #10
- @quentinmoreau made their first contribution
- @ludovicdmt made their first contribution
Full Changelog: v0.0.4...v0.0.5
v0.0.4
Full Changelog: V0.0.3...v0.0.4
V0.0.3
Full Changelog: v0.0.2...V0.0.3