Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
cad317f
updated setup for dev install
JacobTh98 Jan 9, 2025
ba90c7a
return class data
JacobTh98 Jan 22, 2025
b6fc787
close HS port
JacobTh98 Jul 7, 2025
359a983
renamed for EIT
JacobTh98 Oct 15, 2025
c9dc1fa
Started EIS package implementation
JacobTh98 Oct 15, 2025
7ad1f90
v and readme
JacobTh98 Oct 15, 2025
dccba45
docstrings
JacobTh98 Oct 16, 2025
f16c568
ISX-3 start
JacobTh98 Oct 16, 2025
cdf1e98
ISX-3 impl start
JacobTh98 Oct 16, 2025
6c91864
ign developements
JacobTh98 Oct 16, 2025
f24159f
moved image
JacobTh98 Oct 16, 2025
f3381b4
docu and changes
JacobTh98 Oct 16, 2025
5c24452
documentation
JacobTh98 Oct 16, 2025
4ef438d
shinx lint check
JacobTh98 Oct 16, 2025
c47c444
shinx/img update
JacobTh98 Oct 16, 2025
6e93e6b
image
JacobTh98 Oct 16, 2025
4f34836
pytest 0.8.2.2
JacobTh98 Oct 16, 2025
cf72f84
uncomment deployment
JacobTh98 Oct 16, 2025
2b3dab1
Merge branch 'master' into develop
JacobTh98 Oct 16, 2025
a3cf5e6
upd readme
JacobTh98 Oct 16, 2025
5a15b2f
FTDI connection wip
JacobTh98 Oct 16, 2025
a8c5e41
upd EIT example
JacobTh98 Oct 21, 2025
3dbc91f
upd EIT example
JacobTh98 Oct 21, 2025
33214e8
Pypi-test-v0.8.2.3
JacobTh98 Oct 21, 2025
e6d4258
Added function for setting measurement mode
patfuchs Nov 26, 2025
8460792
USB Message Parser
patfuchs Dec 1, 2025
2cdf44d
Integration of USB Message Parser to EITclass
patfuchs Dec 1, 2025
760f591
Debugging 1
Dec 2, 2025
2bbd047
Debugging
patfuchs Dec 3, 2025
f1a5c12
Additional datatype conversions
patfuchs Dec 3, 2025
6af9b98
Refactoring of all datatype conversion into new file
patfuchs Dec 3, 2025
b78068d
Documentation, Refactoring and new data saving functions
patfuchs Dec 4, 2025
3e584d9
Black formatting
patfuchs Dec 4, 2025
16bfa25
Updated timestamp saving
patfuchs Dec 12, 2025
0becb7e
Updating
patfuchs Dec 19, 2025
d263b59
Black formatting
patfuchs Jan 26, 2026
9975a52
Example for message parser
patfuchs Jan 28, 2026
2ba641d
CRITICAL UPDATE on continuous data measurement. Reset of EITframe nec…
patfuchs Apr 7, 2026
dc862ed
linting
JacobTh98 Apr 29, 2026
817b222
Merge branch 'master' into develop2
JacobTh98 Apr 29, 2026
16a8318
linting
JacobTh98 Apr 29, 2026
4d6b27b
v0.9.0
JacobTh98 Apr 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ This package offers the serial interface for communication with an EIT device fr
If you have any ideas or other suggestions, please don't hesitate to contact me.

Email: jacob.thoenes@uni-rostock.de

___

- FTDI Driver installation: https://www.ftdichip.com/old2020/Drivers/D2XX.htm
7 changes: 6 additions & 1 deletion citation.cff
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ authors:
email: jacob.thoenes@uni-rostock.de
affiliation: Universität Rostock
orcid: 'https://orcid.org/0000-0003-2826-5281'
- given-names: Patricia
family-names: Fuchs
email: pat.fuchs@uni-rostock.de
affiliation: Universität Rostock
orcid: 'https://orcid.org/0009-0006-4647-633X
- given-names: Oveys
family-names: Javanmardtilaki
email: oveys@javanmardtilaki@uni-rostock.de
Expand All @@ -23,6 +28,6 @@ keywords:
- EIT
- Sciospec
license: MIT
version: 0.8.0
version: 0.9.0
doi: 10.5281/zenodo.7766305
date-released: '2024-11-14'
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

project = "sciopy"
author = "Jacob P. Thönes"
release = "0.8.2.2"
release = "0.8.2.3"

extensions = [
"sphinx.ext.autodoc",
Expand Down
300 changes: 300 additions & 0 deletions examples/EIT-16-256-MessageParser.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
{
"cells": [
{
"metadata": {},
"cell_type": "markdown",
"source": "# Example code for connecting a Sciospec EIT device",
"id": "8e6ea1591f787a86"
},
{
"metadata": {},
"cell_type": "markdown",
"source": [
"This script gives an example how to use this updated version of sciopy. \n",
" \n",
"Central new feature is an automated USB messaage parser, that parses incoming messages immediately and upon request saves data frames while running. For burst measurements AND continuous measurements with burst_count = 0"
],
"id": "e443e180ad6c1dfd"
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": [
"# Initialization\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import time\n",
"from sciopy.sciopy import EIT_16_32_64_128, EitMeasurementSetup, available_serial_ports\n",
"from sciopy.sciopy import make_results_folder\n",
"\n",
"# create a 'sciospec' EIT device\n",
"n_el = 16\n",
"sciospec = EIT_16_32_64_128(n_el)\n",
"# connect device via USB-FS port\n",
"print(available_serial_ports())\n",
"sciospec.connect_device_FS(\"COM3\")\n",
"savepath = \"../../data/\""
],
"id": "91983d17281c7ff1"
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": [
"# read system message buffer\n",
"sciospec.SystemMessageCallback()"
],
"id": "1a8832c9510b72c9"
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": [
"# create a measurement setup\n",
"setup = EitMeasurementSetup(\n",
" burst_count=4,\n",
" n_el=n_el,\n",
" exc_freq=125_000,\n",
" framerate=3,\n",
" amplitude=0.01,\n",
" inj_skip=n_el // 2,\n",
" gain=1,\n",
" adc_range=1,\n",
")\n",
"sciospec.SetMeasurementSetup(setup)\n",
"# look inside the docstring of the function and manual\n",
"sciospec.GetMeasurementSetup(2)"
],
"id": "c1dbc04960e403ab"
},
{
"metadata": {},
"cell_type": "markdown",
"source": [
"### Usage of the \"old\" measure data command \n",
"\n",
"Here, the message parser is not utilized, technically faster processing of incoming messages. Messages are solely appended and processed into EITFrames and bursts"
],
"id": "890b0096ca6b8bb"
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": [
"data = sciospec.StartStopMeasurementFast(return_as=\"hex\")\n",
"print(data.shape)"
],
"id": "initial_id"
},
{
"metadata": {},
"cell_type": "markdown",
"source": [
"\n",
"### New measure-data function\n"
],
"id": "3301812b2d53b956"
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": [
"# 1) With burstcount\n",
"sciospec.update_BurstCount(3)\n",
"data = sciospec.StartStopMeasurement(\n",
" return_as=\"eitframe\",\n",
" bSaveData=False,\n",
" bDeleteData=False,\n",
" sSavePath=savepath,\n",
" bResultsFolder=False,\n",
")\n",
"print(data.shape)\n",
"\n",
"# 2) Continuous measurement\n",
"sciospec.update_BurstCount(0)\n",
"data = sciospec.StartStopMeasurement(\n",
" timeout=5,\n",
" return_as=\"eitframe\",\n",
" bSaveData=False,\n",
" bDeleteData=False,\n",
" sSavePath=savepath,\n",
" bResultsFolder=False,\n",
") # measured for five seconds\n",
"print(data.shape)\n",
"\n",
"\n",
"# 3) Save data in real time and create an additional folder for storage\n",
"data = sciospec.StartStopMeasurement(\n",
" timeout=5,\n",
" return_as=\"eitframe\",\n",
" bSaveData=True,\n",
" bDeleteData=False,\n",
" sSavePath=savepath,\n",
" bResultsFolder=True,\n",
") # measured for five seconds\n",
"print(data.shape)\n",
"\n",
"\n",
"# 4) For continuous saving results in the same folder, create a folder before and then pass it along\n",
"sCurrPath = make_results_folder(\n",
" bCreateResultsFolder=True, bSaveData=True, sSavePath=savepath\n",
")\n",
"sciospec.StartStopMeasurement(\n",
" timeout=5,\n",
" return_as=\"eitframe\",\n",
" bSaveData=True,\n",
" bDeleteData=True,\n",
" sSavePath=sCurrPath,\n",
" bResultsFolder=False,\n",
") # measured for five seconds\n",
"time.sleep(3)\n",
"sciospec.StartStopMeasurement(\n",
" timeout=5,\n",
" return_as=\"eitframe\",\n",
" bSaveData=True,\n",
" bDeleteData=True,\n",
" sSavePath=sCurrPath,\n",
" bResultsFolder=False,\n",
") # measured for five seconds\n",
"time.sleep(3)\n",
"sciospec.StartStopMeasurement(\n",
" timeout=5,\n",
" return_as=\"eitframe\",\n",
" bSaveData=True,\n",
" bDeleteData=True,\n",
" sSavePath=sCurrPath,\n",
" bResultsFolder=False,\n",
") # measured for five seconds\n",
"\n",
"\n",
"# Arguments:\n",
"# bDeleteData: Data is not returned but if bSaveData=True saved, and is deleted from an internal buffer. For False, data is returned according to return_as\n",
"# bSaveData: if Data should be saved in-time with the measurements. Data is saved at sSavePath,"
],
"id": "143a513757acfe71"
},
{
"metadata": {},
"cell_type": "markdown",
"source": [
"### Example on how to change the measurement mode with boundary conditions is updated\n",
"\n",
"Recommended is for every change of the measurement mode\n",
"1. Restart Device\n",
"2. Set new measurement mode"
],
"id": "e48b23b1ed247a39"
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": [
"# Standard setting \"singleended\" -> potential measurement\n",
"sciospec.GetMeasurementSetup(2)\n",
"sciospec.update_BurstCount(3)\n",
"data = sciospec.StartStopMeasurement(\n",
" return_as=\"eitframe\",\n",
" bSaveData=False,\n",
" bDeleteData=False,\n",
" sSavePath=savepath,\n",
" bResultsFolder=False,\n",
")\n",
"data_pot = np.abs(data[2])"
],
"id": "5db0b9e7255bf10b"
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": [
"# For updated setting, restart device\n",
"sciospec.SoftwareReset()\n",
"sciospec = EIT_16_32_64_128(16)\n",
"print(available_serial_ports())\n",
"sciospec.connect_device_FS(\"COM3\")\n",
"sciospec.SetMeasurementSetup(setup)\n",
"sciospec.update_measurement_mode(\"skip4\", \"internal\")\n",
"sciospec.GetMeasurementSetup(2)\n",
"# look inside the docstring of the function and manual\n",
"\n",
"sciospec.update_BurstCount(3)\n",
"data = sciospec.StartStopMeasurement(\n",
" return_as=\"eitframe\",\n",
" bSaveData=False,\n",
" bDeleteData=False,\n",
" sSavePath=savepath,\n",
" bResultsFolder=False,\n",
")\n",
"data_skip4 = np.abs(data[2])\n",
"\n",
"\n",
"fig, ax = plt.subplots(ncols=2)\n",
"ax[0].imshow(data_pot, cmap=\"viridis\")\n",
"ax[0].set_title(\"Singleended\")\n",
"ax[1].imshow(data_skip4, cmap=\"viridis\")\n",
"ax[1].set_title(\"Skip4\")\n",
"plt.tight_layout()\n",
"plt.show()"
],
"id": "72e8b4e384c52b7"
},
{
"metadata": {},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": [
"# Alternatively,\n",
"setup = EitMeasurementSetup(\n",
" burst_count=4,\n",
" n_el=n_el,\n",
" exc_freq=125_000,\n",
" framerate=3,\n",
" amplitude=0.01,\n",
" inj_skip=n_el // 2,\n",
" gain=1,\n",
" adc_range=1,\n",
" mea_mode=\"skip2\",\n",
" mea_mode_boundary=\"external\",\n",
")\n",
"sciospec.SetMeasurementSetup(setup)"
],
"id": "a026d514146eb1f0"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading
Loading