Giter Site home page Giter Site logo

pyreite's Introduction

Pythonic, Yet Rudimental, Electrical Impedance Tomography Expert (pyreite โ˜ ๏ธ)

Pythonic head modeling for Electrical Impedance Tomography (EIT):
build codecov python

Get up and running

Prerequisites

Install pyreite

git clone https://github.com/harmening/pyreite.git
cd pyreite
pip install -r requirements.txt
python setup.py install

docker ๐Ÿณ

Build pyreite image

$ docker build -t pyreite .

or pull from docker hub

$ docker pull harmening/pyreite:v0.2

Example EIT simulation

import os.path.join as pth
from collections import OrderedDict
from pyreite.OpenMEEGHead import OpenMEEGHead
from pyreite.data_io import load_tri, load_elecs_dips_txt


# Load Colins surface meshes
geom = OrderedDict()
for tissue in ['cortex', 'csf', 'skull', 'scalp']:
    geom[tissue] = load_tri(pth('tests', 'test_data', tissue+'.tri'))

# Define conductivity values [S/m]
cond = {'cortex': 0.201, 'csf': 1.65, 'skull': 0.01, 'scalp': 0.465}

# Load electrode positions
sens = load_elecs_dips_txt(pth('tests', 'test_data', 'electrodes_aligned.txt'))


# Create EIT head model
model = OpenMEEGHead(cond, geom, sens)

# Calculate EIT voltage measurement array
V = model.V

pyreite's People

Contributors

harmening avatar

Watchers

 avatar

pyreite's Issues

Slow jacobian + hessian computation for large matrices

Somehow numpy.dot seems to be ~10 times slower (170sec vs 14sec) for large head models (4x1922 vertices vs 4x800).
This slows down the whole optimization (especially for the hessian) by a factor >> 10 due to the many dot products in the hessian derivatives (jacobian is less severe).
Tested on HPC-Cluster and local MacBook Pro (factor was even larger on IOS).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.