{"id":13422141,"url":"https://github.com/liubenyuan/pyEIT","last_synced_at":"2025-03-15T10:31:42.105Z","repository":{"id":62459445,"uuid":"540240381","full_name":"liubenyuan/pyEIT","owner":"liubenyuan","description":"Python based toolkit for Electrical Impedance Tomography","archived":false,"fork":true,"pushed_at":"2023-10-24T13:14:30.000Z","size":1036,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T09:30:06.538Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"eitcom/pyEIT","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liubenyuan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-23T01:54:34.000Z","updated_at":"2024-09-22T16:29:17.000Z","dependencies_parsed_at":"2023-01-31T06:30:55.671Z","dependency_job_id":null,"html_url":"https://github.com/liubenyuan/pyEIT","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liubenyuan%2FpyEIT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liubenyuan%2FpyEIT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liubenyuan%2FpyEIT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liubenyuan%2FpyEIT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liubenyuan","download_url":"https://codeload.github.com/liubenyuan/pyEIT/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243719119,"owners_count":20336592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T23:00:37.943Z","updated_at":"2025-03-15T10:31:41.530Z","avatar_url":"https://github.com/liubenyuan.png","language":"Python","funding_links":[],"categories":["EIT simulation libraries"],"sub_categories":[],"readme":"# ![pyeit](https://raw.githubusercontent.com/eitcom/pyEIT/master/doc/images/logo.png)\n\n**Note, the upstream of `pyeit` goes here: [eitcom/pyeit](https://github.com/eitcom/pyEIT).**\n\n`pyEIT` is a python-based, open-source framework for Electrical Impedance Tomography (EIT). The design priciples of `pyEIT` are **modularity, minimalism, extensibility and OOP.**\n\n## 1. Installation\n\n`pyEIT` is purely python based, it can be installed and run without any difficulty.\n\n### 1.1 Install using pip or conda-forge (recommended)\n\n`pyEIT` is now availbale on `pypi` and `conda-forge`. It is purely python, which can be installed via\n```bash\n$ pip install pyeit\n```\nor\n```bash\n$ conda install -c conda-forge pyeit\n```\n\n### 1.2 Install from source code\n\nYou can track the git version of `pyEIT`, and use it locally by setting the `PYTHONPATH` variable.\n\n```bash\nexport PYTHONPATH=/path/to/pyEIT\n```\n\nIf you are using `spyder`, or `pyCharm`, you can also set `PYTHONPATH` per project in the IDE, which is more convenient.\n\nAlternatively, but not recommended, you can compile and install from source code,\n```bash\n$ python setup.py build\n$ python setup.py install\n```\n\n## 2. Run the examples\n\nFrom the example folder, pick one demo and run!\n\n**Note:** the following images may be outdated due to that the parameters of a EIT algorithm may be changed in different versions of `pyEIT`. And it is there in the code, so just run the demo.\n\n### 2.1 (2D) forward and inverse computing\n\n**Using** `examples/eit_dynamic_bp.py`\n\n![demo_bp](https://raw.githubusercontent.com/eitcom/pyEIT/master/doc/images/demo_bp.png)\n\n**Using** `examples/eit_dynamic_greit.py`\n\n![demo_greit](https://raw.githubusercontent.com/eitcom/pyEIT/master/doc/images/demo_greit.png)\n\n**Using** `examples/eit_dynamic_jac.py`\n\n![demo_greit](https://raw.githubusercontent.com/eitcom/pyEIT/master/doc/images/demo_jac.png)\n\n**Using** `examples/eit_static_jac.py`\n\n![demo_static](https://raw.githubusercontent.com/eitcom/pyEIT/master/doc/images/demo_static.png)\n\n### 2.2 (3D) forward and inverse computing\n\n**Using** `examples/demo_forward3d.py`\n\n**Using** `examples/demo_dynamic_jac3d.py`\n\n**Limitations:**\n\n  1. 3D visualization plotted using `vispy` can be adjusted using mouse wheels interactively. Seeking a perfect visualization mode, transparency or opaque, is in fact an individual taste. User can also try `mayavi` and `vtk` for the visualization purpose using the unified 3D meshing structure.\n  2. Solving the inverse problem of 3D EIT, requires the electrodes to be placed at multiple altitude (z-axis) in order to have a (better) z-resolution. This should be done carefully, as adding extra z-belt introduces more stimulation patterns, which in turn adds to the computational loads.\n\n## 3. Contribute to pyEIT\n\nGive `pyEIT` a **star**, **fork** this project and commit a pull request **(PR)** !\n\n### 3.1 Feature lists\n\n - [x] 2D forward and inverse computing of EIT\n - [x] Reconstruction algorithms : Gauss-Newton solver (JAC), Back-projection (BP), 2D GREIT\n - [x] 2D/3D visualization!\n - [x] Add support for 3D forward and inverse computing\n - [x] 3D mesh generation and visualization\n - [ ] Generate 2D/3D meshes from CT/MRI (based on iso2mesh [https://github.com/fangq/iso2mesh](https://github.com/fangq/iso2mesh))\n - [ ] Complete electrode model (CEM) support\n - [ ] Implementing the dbar algorithm for 2D difference EIT imaging\n\n### 3.2 Package dependencies\n\n| Packages       | Optional   | Note                                     |\n|----------------| ---------- |------------------------------------------|\n| **numpy**      |            | tested with `numpy-1.19.1`               |\n| **scipy**      |            | tested with `scipy-1.5.0`                |\n| **matplotlib** |            | tested with `matplotlib-3.3.2`           |\n| **trimesh**    |            | for loading external meshes              |\n| **pandas**     | *Optional* | tested with `pandas-1.1.3`               |\n| **vispy**      | *Optional* | failed with `vispy` in python 3.8        |\n| **distmesh**   | *Optional* | a build-in module is provided in `pyEIT` |\n| **shapely**    | *Optional* | for thorax mesh implementation           |\n\n**Q1, Why you choose vispy for 3D visualization?**\n\n`pyEIT` uses `vispy` for visualizing 3D meshes (tetrahedron), and this module is not required if you are using 2D EIT only. `vispy` has minimal system dependencies and it is purely python. All you need is a decent graphical card with `OpenGL` support. It supports fast rendering, which I think is more superior to `vtk` or `mayavi` and it also has decent support for python 3. Please go to the website [vispy.org](http://vispy.org/) or github repository [vispy.github](https://github.com/vispy/vispy) for more details. Installation of vispy is simple by typing `python setup.py install`. We are also considering `mayavi` for a future version of `pyEIT`.\n\n**Q2, When to use Shapely?**\n\n`pyEIT` uses `Shapely` to build the thorax mesh and reconstruct EIT thoracic images. The thorax mesh shape is considered as a polygon and it is built based on real geometric measures given from a thorax figure simulated by `EIDORS` EIT MATLAB library. The figure in turns is based on a real thorax CT (Computed Tomography) scan.\n\nTo visualize thorax simulations, you should install `Shapely`. To do so, you should simply type `pip install Shapely` or `conda install shapely`. You can visit Shapely official documentation website [shapely.readthedocs.io](https://shapely.readthedocs.io/en/stable/index.html#) for more details or the dependency description at [Shapely.pypi](https://pypi.org/project/Shapely/).\n\n## 4. Cite our work\n\n`pyEIT` was published at the 17th International Conference on Electrical Impedance Tomography, 2016. It is now officially published at `softwareX`, vol (7), 2018.\n\n**If you find `pyEIT` useful, please cite our work!**\n\n```bibtex\n@article{liu2018pyeit,\n  title={pyEIT: A python based framework for Electrical Impedance Tomography},\n  author={Liu, Benyuan and Yang, Bin and Xu, Canhua and Xia, Junying and Dai, Meng and Ji, Zhenyu and You, Fusheng and Dong, Xiuzhen and Shi, Xuetao and Fu, Feng},\n  journal={SoftwareX},\n  volume={7},\n  pages={304--308},\n  year={2018},\n  publisher={Elsevier}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliubenyuan%2FpyEIT","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliubenyuan%2FpyEIT","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliubenyuan%2FpyEIT/lists"}