Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
total_control_app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Martin Drechsler
total_control_app
Commits
aa590276
Commit
aa590276
authored
May 01, 2019
by
Martin Drechsler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reorganized files
parent
bda91449
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
15 additions
and
150 deletions
+15
-150
LICENSE
LICENSE
+0
-0
MCDAQcontrolsignals.py
MCDAQcontrolsignals.py
+0
-0
__init__.py
__init__.py
+7
-0
cameraGui.py
cameraGui.py
+2
-2
__init__.py
camera_app/__init__.py
+0
-7
controlGui.py
controlGui.py
+0
-0
myParam.py
control_app/myParam.py
+0
-139
ADoutputs.py
drivers/ADoutputs.py
+0
-0
andorzyla.py
drivers/andorzyla.py
+0
-0
dummyAndor.py
drivers/dummyAndor.py
+6
-2
ao.py
drivers/props/ao.py
+0
-0
digital.py
drivers/props/digital.py
+0
-0
propsbase.py
drivers/props/propsbase.py
+0
-0
myGUI.py
myGUI.py
+0
-0
readme.md
readme.md
+0
-0
requirements.txt
requirements.txt
+0
-0
messages.py
resources/messages.py
+0
-0
myToolbar.py
resources/myToolbar.py
+0
-0
myWidgets.py
resources/myWidgets.py
+0
-0
scanFunctions.py
resources/scanFunctions.py
+0
-0
wav_coherent.py
resources/wav_coherent.py
+0
-0
webcamROI.py
resources/webcamROI.py
+0
-0
webcams.py
resources/webcams.py
+0
-0
snuffles.png
snuffles.png
+0
-0
snuffles1.png
snuffles1.png
+0
-0
cameraParameterTree.py
subclasses/cameraParameterTree.py
+0
-0
controllayouts.py
subclasses/controllayouts.py
+0
-0
pyqtgraph_subclasses.py
subclasses/pyqtgraph_subclasses.py
+0
-0
zylaCameraWorker.py
zylaCameraWorker.py
+0
-0
No files found.
control_app/
LICENSE
→
LICENSE
View file @
aa590276
File moved
control_app/
MCDAQcontrolsignals.py
→
MCDAQcontrolsignals.py
View file @
aa590276
File moved
__init__.py
View file @
aa590276
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 11 16:14:02 2016
@author: Admin
"""
camera
_app/camera
Gui.py
→
cameraGui.py
View file @
aa590276
...
...
@@ -16,8 +16,8 @@ from pyqtgraph_subclasses import CustomRectangularROI
from
zylaCameraWorker
import
CameraWorker
from
cameraParameterTree
import
CameraParameterTree
from
drivers.andorzyla
import
AndorZyla
#
from dummyAndor import AndorZyla
#
from drivers.andorzyla import AndorZyla
from
dummyAndor
import
AndorZyla
import
sys
import
numpy
as
np
...
...
camera_app/__init__.py
deleted
100644 → 0
View file @
bda91449
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 11 16:14:02 2016
@author: Admin
"""
control
_app/control
Gui.py
→
controlGui.py
View file @
aa590276
File moved
control_app/myParam.py
deleted
100644 → 0
View file @
bda91449
# -*- coding: utf-8 -*-
"""
This example demonstrates the use of pyqtgraph's parametertree system. This provides
a simple way to generate user interfaces that control sets of parameters. The example
demonstrates a variety of different parameter types (int, float, list, etc.)
as well as some customized parameter types
"""
import
pyqtgraph
as
pg
from
pyqtgraph.Qt
import
QtCore
,
QtGui
app
=
QtGui
.
QApplication
([])
from
pyqtgraph.parametertree
import
Parameter
,
ParameterTree
,
registerParameterType
from
ADoutputs
import
daq_AO
,
daq_DO
params
=
[
{
'name'
:
'laser_parameters_397'
,
'type'
:
'group'
,
'title'
:
'397 laser parameters'
,
'children'
:
[
{
'name'
:
'piezoA'
,
'type'
:
'float'
,
'value'
:
0
,
'step'
:
0.2
,
'limits'
:
(
-
10
,
10
),
'siPrefix'
:
True
,
'suffix'
:
'V'
},
{
'name'
:
'piezoB'
,
'type'
:
'float'
,
'value'
:
0
,
'step'
:
0.05
,
'limits'
:
(
-
1
,
1
),
'siPrefix'
:
True
,
'suffix'
:
'V'
},
{
'name'
:
'shutter1'
,
'type'
:
'bool'
,
'value'
:
True
,
'tip'
:
"This is a checkbox"
},
{
'name'
:
'shutter2'
,
'type'
:
'bool'
,
'value'
:
True
,
'tip'
:
"This is a checkbox"
},
]},
{
'name'
:
'866 laser parameters'
,
'type'
:
'group'
,
'children'
:
[
{
'name'
:
'piezoA'
,
'type'
:
'float'
,
'value'
:
0
,
'step'
:
0.05
,
'limits'
:
(
-
1
,
1
),
'siPrefix'
:
True
,
'suffix'
:
'V'
},
{
'name'
:
'piezoB'
,
'type'
:
'float'
,
'value'
:
0
,
'step'
:
0.05
,
'limits'
:
(
-
1
,
1
),
'siPrefix'
:
True
,
'suffix'
:
'V'
},
{
'name'
:
'shutter1'
,
'type'
:
'bool'
,
'value'
:
True
,
'tip'
:
"This is a checkbox"
},
{
'name'
:
'shutter2'
,
'type'
:
'bool'
,
'value'
:
True
,
'tip'
:
"This is a checkbox"
},
]},
{
'name'
:
'423 laser parameters'
,
'type'
:
'group'
,
'children'
:
[
{
'name'
:
'piezo'
,
'type'
:
'float'
,
'value'
:
0
,
'step'
:
0.05
,
'limits'
:
(
-
1
,
1
),
'siPrefix'
:
True
,
'suffix'
:
'V'
},
{
'name'
:
'shutter1'
,
'type'
:
'bool'
,
'value'
:
True
,
'tip'
:
"This is a checkbox"
},
]},
{
'name'
:
'Save/Restore functionality'
,
'type'
:
'group'
,
'children'
:
[
{
'name'
:
'Save State'
,
'type'
:
'action'
},
{
'name'
:
'Restore State'
,
'type'
:
'action'
,
'children'
:
[
{
'name'
:
'Add missing items'
,
'type'
:
'bool'
,
'value'
:
True
},
{
'name'
:
'Remove extra items'
,
'type'
:
'bool'
,
'value'
:
True
},
]},
]},
]
## Create tree of Parameter objects
p
=
Parameter
.
create
(
name
=
'params'
,
type
=
'group'
,
children
=
params
)
"""
## If anything changes in the tree, print a message
def change(param, changes):
print("tree changes:")
for param, change, data in changes:
path = p.childPath(param)
if path is not None:
childName = '_'.join(path)
else:
childName = param.name()
#print(' parameter:
%
s'
%
childName)
#print(' change:
%
s'
%
change)
#print(' data:
%
s'
%
str(data))
#print(path)
myDict[childName].set_analog_out(data)
#print(' ----------')
p.sigTreeStateChanged.connect(change)
def valueChanging(param, value):
print("Value changing (not finalized):
%
s
%
s"
%
(param, value))
"""
def
valueChanging
(
box
):
#print(box.name())
#print(box.value())
laser_parameters_397_piezoA
.
set_analog_out
(
box
.
value
())
p
.
children
()[
0
]
.
children
()[
0
]
.
sigValueChanging
.
connect
(
valueChanging
)
laser_parameters_397_piezoA
=
daq_AO
(
0
)
myDict
=
{
'laser_parameters_397_piezoA'
:
laser_parameters_397_piezoA
}
#def whenChange(sb):
# analog0.set_analog_out(sb.value())
#spin.sigValueChanging.connect(whenChange)
def
save
():
global
state
state
=
p
.
saveState
()
def
restore
():
global
state
add
=
p
[
'Save/Restore functionality'
,
'Restore State'
,
'Add missing items'
]
rem
=
p
[
'Save/Restore functionality'
,
'Restore State'
,
'Remove extra items'
]
p
.
restoreState
(
state
,
addChildren
=
add
,
removeChildren
=
rem
)
p
.
param
(
'Save/Restore functionality'
,
'Save State'
)
.
sigActivated
.
connect
(
save
)
p
.
param
(
'Save/Restore functionality'
,
'Restore State'
)
.
sigActivated
.
connect
(
restore
)
## Create ParameterTree widgets
t
=
ParameterTree
()
t
.
setParameters
(
p
,
showTop
=
False
)
t
.
setWindowTitle
(
'pyqtgraph example: Parameter Tree'
)
win
=
QtGui
.
QWidget
()
layout
=
QtGui
.
QGridLayout
()
win
.
setLayout
(
layout
)
layout
.
addWidget
(
QtGui
.
QLabel
(
"These are two views of the same data. They should always display the same values."
),
0
,
0
,
1
,
2
)
layout
.
addWidget
(
t
,
1
,
0
,
1
,
1
)
win
.
show
()
win
.
resize
(
800
,
800
)
## test save/restore
s
=
p
.
saveState
()
p
.
restoreState
(
s
)
## Start Qt event loop unless running in interactive mode or using pyside.
if
__name__
==
'__main__'
:
import
sys
if
(
sys
.
flags
.
interactive
!=
1
)
or
not
hasattr
(
QtCore
,
'PYQT_VERSION'
):
QtGui
.
QApplication
.
instance
()
.
exec_
()
control_app
/ADoutputs.py
→
drivers
/ADoutputs.py
View file @
aa590276
File moved
camera_app/
drivers/andorzyla.py
→
drivers/andorzyla.py
View file @
aa590276
File moved
camera_app
/dummyAndor.py
→
drivers
/dummyAndor.py
View file @
aa590276
...
...
@@ -38,6 +38,7 @@ class AndorZyla:
self
.
ImageArea
.
setValue
(
2048
)
self
.
CameraModel
.
setValue
(
'dummy'
)
self
.
images_array
=
[]
def
Init
(
self
):
print
(
"Dummy camera initialized"
)
...
...
@@ -45,8 +46,11 @@ class AndorZyla:
def
live_acquisition_loop
(
self
):
t
=
threading
.
currentThread
()
for
i
in
range
(
10
):
self
.
images_array
.
append
(
self
.
_twoD_gaussian
())
while
getattr
(
t
,
"do_run"
,
True
):
self
.
current_image
=
self
.
_twoD_gaussian
()
self
.
current_image
=
self
.
images_array
[
self
.
acq_index_i
%
10
]
self
.
acq_queue
.
put
(
self
.
current_image
)
self
.
helper
.
imageAquiredSignal
.
emit
(
self
.
acq_index_i
)
self
.
acq_index_i
=
self
.
acq_index_i
+
1
...
...
@@ -80,7 +84,7 @@ class AndorZyla:
noise
=
np
.
random
.
rand
(
N
,
N
)
end
=
time
.
time
()
time
.
sleep
(
self
.
ExposureTime
.
getValue
())
return
n
oise
*
10
return
n
p
.
int8
(
g
+
noise
)
class
AndorFeats
:
...
...
control_app
/props/ao.py
→
drivers
/props/ao.py
View file @
aa590276
File moved
control_app
/props/digital.py
→
drivers
/props/digital.py
View file @
aa590276
File moved
control_app
/props/propsbase.py
→
drivers
/props/propsbase.py
View file @
aa590276
File moved
control_app/
myGUI.py
→
myGUI.py
View file @
aa590276
File moved
control_app/
readme.md
→
readme.md
View file @
aa590276
File moved
control_app/
requirements.txt
→
requirements.txt
View file @
aa590276
File moved
control_app
/messages.py
→
resources
/messages.py
View file @
aa590276
File moved
control_app
/myToolbar.py
→
resources
/myToolbar.py
View file @
aa590276
File moved
control_app
/myWidgets.py
→
resources
/myWidgets.py
View file @
aa590276
File moved
control_app
/scanFunctions.py
→
resources
/scanFunctions.py
View file @
aa590276
File moved
control_app
/wav_coherent.py
→
resources
/wav_coherent.py
View file @
aa590276
File moved
control_app
/webcamROI.py
→
resources
/webcamROI.py
View file @
aa590276
File moved
control_app
/webcams.py
→
resources
/webcams.py
View file @
aa590276
File moved
control_app/
snuffles.png
→
snuffles.png
View file @
aa590276
File moved
control_app/
snuffles1.png
→
snuffles1.png
View file @
aa590276
File moved
camera_app
/cameraParameterTree.py
→
subclasses
/cameraParameterTree.py
View file @
aa590276
File moved
control_app/
subclasses/controllayouts.py
→
subclasses/controllayouts.py
View file @
aa590276
File moved
camera_app
/pyqtgraph_subclasses.py
→
subclasses
/pyqtgraph_subclasses.py
View file @
aa590276
File moved
camera_app/
zylaCameraWorker.py
→
zylaCameraWorker.py
View file @
aa590276
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment