sciopy


Namesciopy JSON
Version 0.7.1 PyPI version JSON
download
home_pagehttps://github.com/spatialaudio/sciopy.git
SummaryPython based interface module for communication with the Sciospec Electrical Impedance Tomography (EIT) device.
upload_time2023-11-17 07:50:53
maintainer
docs_urlNone
authorJacob Peter Thönes
requires_python
license
keywords sciospec eit
VCS
bugtrack_url
requirements matplotlib numpy pandas pyeit pyftdi pyserial setuptools tqdm
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ![sciopy](https://raw.githubusercontent.com/spatialaudio/sciopy/main/doc/images/logo_sciopy.jpg)

This package offers the serial interface for communication with an EIT device from ScioSpec. Commands can be written serially and the system response can be read out. With the current version, it is possible to start and stop measurements with defined burst counts and to read out the measurement data. In addition, the measurement data is packed into a data class for better further processing.

## Install Requirements

All requirements are provided inside the `requirements.txt`. To install them navigate inside the sciopy directory and type:

    pip3 install -r requirements.txt # Linux, macOS, Windows
    pip install -r requirements.txt  # Windows

## Run Example Script

For a single measurement, you can simply run one of the `example` scripts using the command:

    python custom_measurement.py

To find the right port you can use:


    from sciopy import available_serial_ports
    available_serial_ports()

This script establishes a serial connection to the ScioSpec device, sends the measurement configuration, and starts a 
measurement. For a successful measurement with 16 electrodes, you have to plug in the 16 electrodes to the port "channel 1-16" at the ScioSpec device. For saving the data, set `save = True` and insert a valid `s_path` to the `scio_spec_measurement_config` at the beginning of the script. If you don't change the path the files will be saved to the current directory.

The example script `prep_data_for_ml.py` can be used for the conversion of a finished measurement.
This script creates a new folder with the ending `_prepared` and puts together the potential values and object positions for all measurements. This could be useful for later application of machine learning. 

## Explanation of stored files (.npz)

- `potential matrix` (e.g. variable P) is a 16x16 matrix (n_el=16). If you visualize it using `from sciopy import plot_potential_matrix` you can recognize the used excitation pattern or if an electrode is a defect.
- `p_with_exc` is the matrix P with the excitation electrodes
- `p_without_exc` is the matrix P without the excitation electrodes
- `abs_p_norm_without_ext` is the matrix, normalized between (I think) 0-1 without the excitation electrodes.
- `v_with_ext` is the computed voltage from the potential values containing the excitation electrodes
- `v_without_ext` is the computed voltage from the potential values without the excitation electrodes
- `abs_v_norm_without_ext` is the voltage data, normalized between 0-1 without the excitation electrodes.
- `config` contains some information regarding the measurement procedure.

## Contact

If you have ideas or other advice don't hesitate to contact me!

Email: jacob.thoenes@uni-rostock.de

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/spatialaudio/sciopy.git",
    "name": "sciopy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Sciospec,EIT",
    "author": "Jacob Peter Th\u00f6nes",
    "author_email": "jacob.thoenes@uni-rostock.de",
    "download_url": "",
    "platform": "any",
    "description": "# ![sciopy](https://raw.githubusercontent.com/spatialaudio/sciopy/main/doc/images/logo_sciopy.jpg)\n\nThis package offers the serial interface for communication with an EIT device from ScioSpec. Commands can be written serially and the system response can be read out. With the current version, it is possible to start and stop measurements with defined burst counts and to read out the measurement data. In addition, the measurement data is packed into a data class for better further processing.\n\n## Install Requirements\n\nAll requirements are provided inside the `requirements.txt`. To install them navigate inside the sciopy directory and type:\n\n    pip3 install -r requirements.txt # Linux, macOS, Windows\n    pip install -r requirements.txt  # Windows\n\n## Run Example Script\n\nFor a single measurement, you can simply run one of the `example` scripts using the command:\n\n    python custom_measurement.py\n\nTo find the right port you can use:\n\n\n    from sciopy import available_serial_ports\n    available_serial_ports()\n\nThis script establishes a serial connection to the ScioSpec device, sends the measurement configuration, and starts a \nmeasurement. For a successful measurement with 16 electrodes, you have to plug in the 16 electrodes to the port \"channel 1-16\" at the ScioSpec device. For saving the data, set `save = True` and insert a valid `s_path` to the `scio_spec_measurement_config` at the beginning of the script. If you don't change the path the files will be saved to the current directory.\n\nThe example script `prep_data_for_ml.py` can be used for the conversion of a finished measurement.\nThis script creates a new folder with the ending `_prepared` and puts together the potential values and object positions for all measurements. This could be useful for later application of machine learning. \n\n## Explanation of stored files (.npz)\n\n- `potential matrix` (e.g. variable P) is a 16x16 matrix (n_el=16). If you visualize it using `from sciopy import plot_potential_matrix` you can recognize the used excitation pattern or if an electrode is a defect.\n- `p_with_exc` is the matrix P with the excitation electrodes\n- `p_without_exc` is the matrix P without the excitation electrodes\n- `abs_p_norm_without_ext` is the matrix, normalized between (I think) 0-1 without the excitation electrodes.\n- `v_with_ext` is the computed voltage from the potential values containing the excitation electrodes\n- `v_without_ext` is the computed voltage from the potential values without the excitation electrodes\n- `abs_v_norm_without_ext` is the voltage data, normalized between 0-1 without the excitation electrodes.\n- `config` contains some information regarding the measurement procedure.\n\n## Contact\n\nIf you have ideas or other advice don't hesitate to contact me!\n\nEmail: jacob.thoenes@uni-rostock.de\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python based interface module for communication with the Sciospec Electrical Impedance Tomography (EIT) device.",
    "version": "0.7.1",
    "project_urls": {
        "Homepage": "https://github.com/spatialaudio/sciopy.git"
    },
    "split_keywords": [
        "sciospec",
        "eit"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5010ef54b73b770cd5222a1f7adae220c2a8b2ec2b9baf52c6137de6d52ae284",
                "md5": "0800a36bb7e6f80e115c5bf77cb4bcce",
                "sha256": "ae49d88c1569c7bb1811db9419f71ae98f461d9b18512923382082f921f39292"
            },
            "downloads": -1,
            "filename": "sciopy-0.7.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0800a36bb7e6f80e115c5bf77cb4bcce",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 31754,
            "upload_time": "2023-11-17T07:50:53",
            "upload_time_iso_8601": "2023-11-17T07:50:53.582454Z",
            "url": "https://files.pythonhosted.org/packages/50/10/ef54b73b770cd5222a1f7adae220c2a8b2ec2b9baf52c6137de6d52ae284/sciopy-0.7.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-17 07:50:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "spatialaudio",
    "github_project": "sciopy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "matplotlib",
            "specs": [
                [
                    "==",
                    "3.7.2"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.25.0"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "2.0.3"
                ]
            ]
        },
        {
            "name": "pyeit",
            "specs": [
                [
                    "==",
                    "1.2.4"
                ]
            ]
        },
        {
            "name": "pyftdi",
            "specs": [
                [
                    "==",
                    "0.55.0"
                ]
            ]
        },
        {
            "name": "pyserial",
            "specs": [
                [
                    "==",
                    "3.5"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": [
                [
                    "==",
                    "67.7.2"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    "==",
                    "4.65.0"
                ]
            ]
        }
    ],
    "lcname": "sciopy"
}
        
Elapsed time: 0.18909s