Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
nam
ProxPython
Commits
33bf2ba1
Commit
33bf2ba1
authored
Apr 21, 2020
by
Matthijs
Browse files
minor bugfixes
parent
db494d45
Changes
2
Hide whitespace changes
Inline
Side-by-side
proxtoolbox/Problems/OrbitalTomog/Graphics/complex_field_visualization.py
View file @
33bf2ba1
...
...
@@ -12,14 +12,15 @@ def complex_to_hsv(arr, background='dark'):
Returns:
"""
norm
=
np
.
max
([
np
.
max
(
abs
(
arr
)),
1e-15
])
objecthsv
=
np
.
zeros
((
3
,)
+
arr
.
shape
)
objecthsv
[
0
]
=
np
.
angle
(
-
arr
)
/
2
/
np
.
pi
+
0.5
if
background
==
'dark'
:
objecthsv
[
1
]
=
np
.
ones
(
arr
.
shape
)
objecthsv
[
2
]
=
abs
(
arr
)
/
n
p
.
max
(
abs
(
arr
))
objecthsv
[
2
]
=
abs
(
arr
)
/
n
orm
else
:
objecthsv
[
2
]
=
np
.
ones
(
arr
.
shape
)
objecthsv
[
1
]
=
abs
(
arr
)
/
n
p
.
max
(
abs
(
arr
))
objecthsv
[
1
]
=
abs
(
arr
)
/
n
orm
return
np
.
transpose
(
objecthsv
,
(
1
,
2
,
0
))
...
...
proxtoolbox/Problems/OrbitalTomog/Graphics/stack_viewer.py
View file @
33bf2ba1
...
...
@@ -89,7 +89,7 @@ class XYZStackViewer:
self
.
minval
,
self
.
maxval
=
clim
elif
cmap
==
'seismic'
:
self
.
maxval
=
max
(
abs
(
volume
))
self
.
minval
=
-
self
.
maxval
self
.
minval
=
-
1
*
self
.
maxval
else
:
self
.
maxval
=
max
(
volume
)
self
.
minval
=
min
([
0
,
min
(
volume
)])
...
...
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