eitcom / pyEIT

Python based toolkit for Electrical Impedance Tomography
Other
169 stars 96 forks source link

Dev imagemeshing #70

Closed JacobTh98 closed 1 year ago

JacobTh98 commented 1 year ago

With this function it is possible to convert a 200x200 pixel image to the unit circle pyEITmesh. Any geometry can be generated as an image and processed into the relating mesh. The pixels with 0 are the empty space and with 1 are object. A preview is shown inside the Readme.md: https://github.com/JacobTh98/pyEIT_image_wrapper

liubenyuan commented 1 year ago

Please correct the black linting errors. The requirements under pyeit/mesh folder is not required and the self-requirement on pyeit is not required. If your package requires a specific package, a minimal version should be provided as is.

JacobTh98 commented 1 year ago

Excuse the circumstances. It's my first pull request. I will check the whole thing with the CI and then submit it again.

liubenyuan commented 1 year ago

Hi, pyeit use black and flake as the default linter. You can install black and flake8 using

$ conda install black flake8
$ black .
$ flake8

and to check your linting CI.

And these tools will automatically check and format your code.

Moreover, multiple commits with meaningful comments are helpful. Normally a PR contains a single combined commit.

liubenyuan commented 1 year ago

May be a wrong black version? This github workflow use the black version 22.3, it might have different formatting rules to your version.