Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GEPARD
GEPARD
Commits
2e588d5b
Commit
2e588d5b
authored
Nov 06, 2019
by
Josef Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix in custom z-level setup
parent
69ffaf01
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
errors.py
errors.py
+0
-3
opticalscan.py
opticalscan.py
+5
-1
zlevelsetter.py
zlevelsetter.py
+3
-4
No files found.
errors.py
View file @
2e588d5b
...
...
@@ -25,7 +25,4 @@ class InvalidParticleError(Exception):
class
NotConnectedContoursError
(
Exception
):
pass
class
ValueNotSetError
(
Exception
):
pass
\ No newline at end of file
opticalscan.py
View file @
2e588d5b
...
...
@@ -559,7 +559,11 @@ class OpticalScan(QtWidgets.QWidget):
softwarez
=
self
.
ramanctrl
.
getSoftwareZ
()
# get current software z
points
[:,
2
]
+=
softwarez
-
self
.
ramanctrl
.
getUserZ
()
zrange
=
self
.
zLevelSetter
.
getZLevels
()
try
:
zrange
=
self
.
zLevelSetter
.
getZLevels
()
except
ValueError
:
return
zmaxstack
=
max
(
zrange
)
if
len
(
zrange
)
==
1
:
zmaxstack
=
0.0
...
...
zlevelsetter.py
View file @
2e588d5b
...
...
@@ -7,7 +7,6 @@ Created on Fri Oct 25 09:39:14 2019
from
PyQt5
import
QtWidgets
,
QtCore
import
sys
import
numpy
as
np
from
.errors
import
ValueNotSetError
class
ZLevelSetter
(
QtWidgets
.
QLabel
):
...
...
@@ -251,9 +250,9 @@ class ZLevelSetter(QtWidgets.QLabel):
elif
self
.
customChecker
.
isChecked
():
try
:
zLevels
=
self
.
_getCustomLevels
()
except
Value
NotSet
Error
:
except
ValueError
:
QtWidgets
.
QMessageBox
.
critical
(
self
,
'Error'
,
'Invalid entry in custom level selection'
)
r
eturn
r
aise
ValueError
return
np
.
array
(
zLevels
)
def
_getCustomLevels
(
self
):
...
...
@@ -266,7 +265,7 @@ class ZLevelSetter(QtWidgets.QLabel):
try
:
levels
.
append
(
float
(
lineEdit
.
text
()))
except
:
raise
Value
NotSet
Error
raise
ValueError
return
sorted
(
levels
)
...
...
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