Skip to main content

shamo

version python documentation tutorials codestyle docstyle license
doi

Introduction

Constructing accurate subject specific head model is of main interest in the fields of source imaging (EEG/MEG) and brain stimulation (tDCS/tMS). shamo is an open source python package to calculate EEG leadfields, current flows, and electric potential distribution in the head. From a labelled 3D image of the head, the whole process is fully automatized, relying only on a few parameter files, e.g. conductivities (including white matter anisotropy) plus source and electrode locations. Since there is no non-invasive method to measure the electromagnetic (EM) properties of the head tissues, shamo can also be used to assess the sensitivity of the EM head model to these parameters.

Philosophy

The idea leading the development of shamo is to provide a versatile, intuitive and extendable toolbox for electromagnetic modelling of the head. Every object is though to be savable/loadable as a dictionary and stored as a JSON file on disk. shamo is built around three main concepts:

  1. Problem: The definition of a task to perform. Computing the EEG leadfield or simulating tDCS for examples.
  2. Solution: The object resulting from the resolution of a problem.
  3. Surrogate: If the problem-solution pair is parametric, e.g. some parameters are random variables, surrogate can be used to produce parametric models.

One of the leading rules while working on shamo was to use already existing quality tools to perform key steps. Thus, the finite element generation is achieved by interfacing with CGAL and Gmsh, the physical problem resolution is done with GetDP, the Gaussian processes are generated with scikit-learn and the sensitivity analysis uses SALib.

Documentation

The documentation of shamo is available here and tutorials are available in the form of jupyter notebooks in this repository.

FAQ

Where can you get help about shamo?

If you need help with your project involving shamo, head over to this page and pick up the help template. Make sure your question does not already exist fy searching the issues.

We'll be happy to give you some help!

Where does the name "shamo" come from?

The name "shamo", pronounced [ʃɑ:mɔ:], stands for "Stochastic HeAd MOdelling".

In french, it sounds like the word "chameau" which is the translation for "camel". This is a reference to the bematists, those ancient greek and egyptians who were able to measure distances with a high accuracy by counting the steps of a camel. They were involved in the accurate calculation of the circumference of the Earth by limiting distance measurement errors.

As did the old bematists, this tool aims at raising the accuracy in outcome of neuro- studies by providing more insights on the errors involved.

How to contribute?

You can contribute to shamo in several ways like adding new features, fixing bugs or improving documentation and examples.

For more information, refer to this document.

How to cite?

If you use shamo in your work, please cite this paper (Available in open access on both Orbi and Arxiv):

@article{grignard_shamo_2022,
	title = {Shamo: A Tool for Electromagnetic Modeling, Simulation and Sensitivity} {Analysis of the Head},
	issn = {1559-0089},
	shorttitle = {Shamo},
	doi = {10.1007/s12021-022-09574-7},
	language = {en},
	journal = {Neuroinformatics},
	author = {Grignard, Martin and Geuzaine, Christophe and Phillips, Christophe},
	month = mar,
	year = {2022},
}

License

Copyright (C) 2020 GIGA CRC In-Vivo Imaging, Liège, Belgium

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

For more information, refer to the full license.

Metadata

Release files for shamo 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shamo 1.2.1
File Size Uploaded
shamo-1.2.1.tar.gz 66.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shamo 1.2.1
File Interpreter ABI Platform
shamo-1.2.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 157.4 kB

Release files / shamo-1.2.1.tar.gz

Download URL shamo-1.2.1.tar.gz
Size 66.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a7bae0854d07aa830029a06008688794d091f299998553bbe6c5044abb71db8b
BLAKE2b-256 checksum
How to use checksums
b490d86f9468c79d948a8e7cde553d19225cf35cdf42eb073d3ed665b4cd183d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.18

Release files / shamo-1.2.1-py2.py3-none-any.whl

Download URL shamo-1.2.1-py2.py3-none-any.whl
Size 90.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a40c489dbf7f1539d8b6e19a5b4ade3248b7cb001ce3a504511362193ecc5f69
BLAKE2b-256 checksum
How to use checksums
0a1f4d69ed6c8c3e5ac73461714741887d87683c42adbe9749efc1ed45dc888a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.18

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page