Skip to content

Commit 33214e8

Browse files
committed
Pypi-test-v0.8.2.3
1 parent 3dbc91f commit 33214e8

File tree

7 files changed

+54
-13
lines changed

7 files changed

+54
-13
lines changed

docs/_autosummary/sciopy.EIT_16_32_64_128.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
~EIT_16_32_64_128.get_data_as_matrix
3535
~EIT_16_32_64_128.init_channel_group
3636
~EIT_16_32_64_128.update_BurstCount
37+
~EIT_16_32_64_128.update_ExcitationFrequency
3738
~EIT_16_32_64_128.update_FrameRate
3839
~EIT_16_32_64_128.write_command_string
3940

docs/_autosummary/sciopy.ISX_3.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@
3232
~ISX_3.StartMeasure
3333
~ISX_3.SystemMessageCallback
3434
~ISX_3.__init__
35-
~ISX_3.connect_device_USB2
36-
~ISX_3.disconnect_device_USB2
35+
~ISX_3.connect_device_FTDI
36+
~ISX_3.disconnect_device_FTDI
37+
~ISX_3.info
38+
~ISX_3.list_usb_devices
3739
~ISX_3.write_command_string
3840

3941

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
project = "sciopy"
99
author = "Jacob P. Thönes"
10-
release = "0.8.2.2"
10+
release = "0.8.2.3"
1111

1212
extensions = [
1313
"sphinx.ext.autodoc",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@
3131
"isx = ISX_3()"
3232
]
3333
},
34+
{
35+
"cell_type": "markdown",
36+
"id": "ec641683",
37+
"metadata": {},
38+
"source": [
39+
"### WIP"
40+
]
41+
},
3442
{
3543
"cell_type": "code",
3644
"execution_count": 3,

sciopy/EIT_16_32_64_128.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,32 @@ def update_FrameRate(self, framerate):
357357
)
358358
self.print_msg = False
359359

360+
def update_ExcitationFrequency(self, exc_freq):
361+
"""
362+
update_ExcitationFrequencies _summary_
363+
364+
Parameters
365+
----------
366+
exc_freq int
367+
frequency to be set from 100 Hz to 1 MHz
368+
"""
369+
# Set frequencies:
370+
# [CT] 0C 04 [fmin] [fmax] [fcount] [ftype] [CT]
371+
self.print_msg = True
372+
f_min = clTbt_sp(exc_freq)
373+
f_max = clTbt_sp(exc_freq)
374+
f_count = [0, 1]
375+
f_type = [0] # linear/log
376+
# bytearray
377+
self.write_command_string(
378+
bytearray(
379+
list(
380+
np.concatenate([[176, 12, 4], f_min, f_max, f_count, f_type, [176]])
381+
)
382+
)
383+
)
384+
self.print_msg = False
385+
360386
def SetMeasurementSetup(self, setup: EitMeasurementSetup):
361387
"""
362388
Configures the ScioSpec device measurement setup according to the provided EitMeasurementSetup dataclass.

sciopy/ISX_3.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,19 @@ def list_usb_devices(self):
115115
list
116116
A list of connected USB devices.
117117
"""
118-
devices = UsbTools.find_all([(self.VID, self.PID)])
119-
for device in devices:
120-
device_info = {
121-
"vendor": hex(device[0].vid),
122-
"product": hex(device[0].pid),
123-
"description": device[0].description,
124-
}
118+
try:
119+
devices = UsbTools.find_all([(self.VID, self.PID)])
120+
for device in devices:
121+
device_info = {
122+
"vendor": hex(device[0].vid),
123+
"product": hex(device[0].pid),
124+
"description": device[0].description,
125+
}
126+
if self.print_msg:
127+
print(f"Found device: {device_info}")
128+
except Exception as e:
125129
if self.print_msg:
126-
print(f"Found device: {device_info}")
130+
print(f"Error listing USB devices: {e}")
127131

128132
def connect_device_FTDI(self):
129133
"""
@@ -157,7 +161,7 @@ def SystemMessageCallback(self):
157161
data_count = 0
158162

159163
while True:
160-
buffer = self.device.read_data(size=4)
164+
buffer = self.device.read_data()
161165
if buffer:
162166
received.extend(buffer)
163167
data_count += len(buffer)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="sciopy",
5-
version="0.8.2.2",
5+
version="0.8.2.3",
66
packages=find_packages(),
77
author="Jacob P. Thönes",
88
author_email="jacob.thoenes@uni-rostock.de",

0 commit comments

Comments
 (0)