Toolbox for laminar inference with MEG, powered by FreeSurfer and SPM
Operating system
Windows: Tested on WSL (using Ubuntu 24.04.1), follow instructions here
Mac: May work, not tested
Linux: Tested on Ubuntu and Debian
Requirements
Python version 3.7
Anaconda (or miniconda)
Upgrade Notice (v0.1.0)
If you used laMEG versions prior to v0.1.0, the internal format of laminar surface directories has changed. They are now stored within <SUBJECTS_DIR>/<subject_id>/surf/laminar, and <SUBJECTS_DIR>/<subject_id>/mri/orig.mgz is automatically used for co-registration. Older surfaces must be converted before they can be loaded with the new LayerSurfaceSet interface.
Run the conversion script:
python convert_legacy_surfaces.py <subject_id> <path_to_old_lameg_surf_dir>
For example:
python convert_legacy_surfaces.py sub-104 /data/old_surfaces/sub-104
This will rebuild the standardized hierarchy under:
<SUBJECTS_DIR>/<subject_id>/surf/laminar
and generate complete metadata for each processing stage.
After conversion, you can validate the new structure:
from lameg.surf import LayerSurfaceSet
surf_set = LayerSurfaceSet('sub-104', 11)
surf_set.validate()
Installation
Create a conda environment:
conda create -n <env name> python=3.7
replacing <env name> with the name of the environment you would like to create (i.e. ‘lameg’, or the name of your project)
Activate the environment:
conda activate <env name>
replacing <env name> with name of the environment you created.
Install FreeSurfer, following the instructions on this page
To install laMEG, run:
pip install lameg
Then run the post-installation script:
lameg-postinstall
This installs SPM standalone and Matlab runtime, which can take some time depending on your connection speed.
Before using, deactivate and reactivate the environment for changes to environment variables to take effect:
conda deactivate conda activate <env name>
If you want to run the tutorials, download and extract the test data
Documentation and Tutorials
Once you have installed laMEG, check out the example notebooks, tutorials, and documentation. For guidelines on MRI sequences, head-cast construction, and co-registration, see the wiki
Funding
Supported by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme grant agreement 864550, a French National Research Agency (ANR) grant HiFi (ANR-20-CE17-0023), and a seed grant from the Fondation pour l’Audition.
Metadata
Release files for lameg 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lameg-0.2.1.tar.gz | 13.8 MB | Without provenance | Details for lameg-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lameg-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for lameg-0.2.1-py3-none-any.whl |
Total release size: 27.6 MB
Release files / lameg-0.2.1.tar.gz
| Download URL | lameg-0.2.1.tar.gz |
|---|---|
| Size | 13.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b99ce3971b820f1e8f9cfd4cdbbfa11a085161c84733b7ccaa815aeb5b4776ca
|
|
BLAKE2b-256 checksum How to use checksums |
7a0220bcf089ea1203f2ca68e86831f9deb430d15c4164c9d58ce45d8b36c735
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.17
|
Release files / lameg-0.2.1-py3-none-any.whl
| Download URL | lameg-0.2.1-py3-none-any.whl |
|---|---|
| Size | 13.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5fb22d00910dcdb2f9b590cad4352f203c8c506208cfbd1c992e45c39d5edc6
|
|
BLAKE2b-256 checksum How to use checksums |
830dcbd0305577914fb386db6d85b8cfe8ccee94c224945ebfeb81a819a0420c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.17
|
Security for lameg 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.