Skip to content

Commit 8263270

Browse files
committed
Major Release: Experiment Package (Preprint)
1 parent 69e0099 commit 8263270

File tree

7 files changed

+1204
-6
lines changed

7 files changed

+1204
-6
lines changed

DeepLabStream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def show_benchmark_statistics():
701701
if recording_enabled:
702702
stream_manager.stop_recording()
703703
break
704-
else:
704+
elif got_first_analysed_frame:
705705
print("[{0}/3000] Benchmarking in progress".format(len(analysis_time_data)))
706706

707707

experiments/DAQ_output.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,22 @@ def cycle(self, repeats, on_time, off_time):
105105
for i in range(repeats):
106106
self.timed_on(on_time)
107107
time.sleep(off_time)
108+
109+
110+
class AnalogModDevice(Device):
111+
"""Analog modulated devices"""
112+
113+
def __init__(self, AO_DAQ_PORT):
114+
"""
115+
:param AO_DAQ_PORT: the analog output port on the DAQ board connected to the Device
116+
"""
117+
super().__init__(AO_DAQ_PORT)
118+
119+
def amod_decive(self, V):
120+
""" Changes Output current of Analog Output Port defined amount in Volt
121+
122+
:param V: Amount of Current as float if turned ON
123+
"""
124+
with nidaqmx.Task() as task:
125+
task.ao_channels.add_ao_voltage_chan(self.INPUT_PORT)
126+
task.write([V], auto_start=True)

0 commit comments

Comments
 (0)