Skip to content

Commit

Permalink
rework step
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobTh98 committed Nov 12, 2024
1 parent 25824dc commit 1ac2104
Show file tree
Hide file tree
Showing 13 changed files with 488 additions and 2,303 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
with:
options: "--check --diff"
src: "./sciopy"
version: "23.1.0"
version: "24.10.0"
35 changes: 0 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,6 @@

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

Expand Down
Loading

0 comments on commit 1ac2104

Please sign in to comment.