Skip to content

boyle/zedhat

Repository files navigation

Zedhat ẑ

Build Status/Travis Build status/AppVeyor Coverity Scan Status Coverage Status

A tool for Electrical Impedance Tomography (EIT) and Electrical Resistivity Tomography (ERT). In EIT/ERT, current is applied to electrodes on the boundary and voltages are measured at other electrodes. From the measured voltages, we reconstruct an estimate of the conductivity ẑ over the interior. EIT is an electrical imaging technique which does not use ionizing radiation (x-rays), and can achieve high frame rates (some systems support 100 frames/sec) with compact and inexpensive electronics capable of imaging lung function at the bedside or changes in water saturation in the ground.

Zedhat works on Linux, Windows, and Mac.

Usage

Zedhat can solve either the forward EIT problem (calculate measurements given model and conductivity), or the inverse EIT problem (calculate conductivity given model and measurements).

zedhat --help
zedhat --fwd tests/m1f.zh
zedhat --inv tests/m1i.zh 

The .zh file format is a text file containing the model, stimulus and measurement sequence, and potentially the conductivities and/or measurements. The file can be compressed with gzip.

Install

Zedhat has minimal dependencies: numerical libraries blas, lapacke, suitesparse, and compression zlib. We use git, autoconf, lcov, and astyle for development and support both gcc and clang compilers.

Install any dependencies for your system (see operating system specific instructions below), then configure and compile zedhat. (No code? Try git clone https://github.com/boyle/zedhat && cd zedhat.)

./autogen && ./configure && make

Run make install to install zedhat. Look at the configure options (./configure --help) to set installation directories or adjust compilation options. You can run make test to execute the automated test suite.

For Ubuntu 22.04, install the dependencies from a terminal:

sudo apt-get install git build-essential pkg-config autoconf gfortran
sudo apt-get install libblas-dev libopenblas-dev libsuitesparse-dev liblapacke-dev zlib1g-dev

For macOS 10.14.4, install Xcode from the Mac store, launch Xcode to complete the installation, then from a terminal install homebrew and

brew install autoconf automake pkg-config lapack openblas suite-sparse
export LDFLAGS="-L/usr/local/lib -L/usr/local/opt/openblas/lib"
export CFLAGS="-I/usr/local/include -I/usr/local/opt/openblas/include"
export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"

(Homebrew openblas is necessary since Xcode does not provide lapacke, only clapack, the older C interface to LAPACK. Homebrew suite-sparse provides UMFPACK and CHOLMOD.)

For Windows 10, install chocolatey from a powershell terminal with administrator priveleges.

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Open a second powershell terminal with administrator privileges and install msys2 and, once installed, start a "mingw64" terminal.

choco install msys2
mingw64

From the new "mingw64" shell window install the dependencies.

pacman -Syu
pacman -S --noconfirm autoconf libtool automake make autoconf-archive pkg-config
pacman -S --noconfirm base-devel git mingw-w64-x86_64-toolchain
pacman -S --noconfirm mingw-w64-x86_64-lapack mingw-w64-x86_64-openblas mingw-w64-x86_64-suitesparse

About

Impedance Imaging (EIT and ERT)

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published