A toolbox for laminar inference with MEG
Project description
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)
git
curl
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
Install git and curl if needed:
sudo apt-get install git curl
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, and a seed grant from the Fondation pour l’Audition.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lameg-0.1.4.tar.gz.
File metadata
- Download URL: lameg-0.1.4.tar.gz
- Upload date:
- Size: 13.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a1626830bcda6ff10deee47355be111c3a0809e20446bab78a73de1c11693d9
|
|
| MD5 |
d1e15f7722e69f0226f1f0ef49f0f864
|
|
| BLAKE2b-256 |
f22af8bd72ed627aead45058a3a72cd82bef7704c84b697477bdd6a84bf6ab4b
|
File details
Details for the file lameg-0.1.4-py3-none-any.whl.
File metadata
- Download URL: lameg-0.1.4-py3-none-any.whl
- Upload date:
- Size: 13.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcf25d7b80031ca7b4df3d5fbf603258dc7f4b6fed5c81757bb3e563dadd41ec
|
|
| MD5 |
ada78d9aff0a44ef9a79784b5bb931e1
|
|
| BLAKE2b-256 |
19cc57360dad564c9f10e8aeacca552c49bf413b0bad4ffcf5b61e2677b4e622
|