Skip to content

Releases: danclab/laMEG

v0.1.4

20 Mar 15:04

Choose a tag to compare

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

03 Nov 12:47

Choose a tag to compare

laMEG v0.1.3 — 2025-11-03

🚀 Major New Features

  • Automatic scalp surface generation
  • convert_legacy_surfaces.py and LayerSurfaceSet now 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’s vtkFillHolesFilter.
  • Added get_layer_vertices() and get_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() and get_radiality_to_scalp() now rely on load_head_mesh().

Visualization

  • Added verify_coregistration() in viz.py to 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

Full Changelog: v0.1.2...v0.1.3

v0.1.2

29 Oct 16:30

Choose a tag to compare

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

29 Oct 08:07

Choose a tag to compare

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

25 Oct 16:17

Choose a tag to compare

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 under LayerSurfaceSet.

  • 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.py and invert.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

24 Oct 14:32

Choose a tag to compare

What's Changed

  • Set default chunk size in roi_power_comparison by @hrayson in #18
  • Test n_spatial_modes and woi as np.array by @hrayson in #19
  • Test specifying woi as numpy array in test_invert_ebb by @hrayson in #20

New Contributors

Full Changelog: v0.0.6...v0.0.7

v0.0.6

29 Aug 04:18

Choose a tag to compare

Full Changelog: v0.0.5...v0.0.6

v0.0.5

25 Oct 05:16

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.0.4...v0.0.5

v0.0.4

23 Aug 02:38

Choose a tag to compare

Full Changelog: V0.0.3...v0.0.4

V0.0.3

19 Aug 11:07

Choose a tag to compare

Full Changelog: v0.0.2...V0.0.3