Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
NIFTy
Commits
4b6ba80e
Commit
4b6ba80e
authored
Aug 08, 2019
by
Philipp Arras
Browse files
Fix multifrequency plotting
parent
ad4211af
Pipeline
#53430
passed with stages
in 8 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty5/plot.py
View file @
4b6ba80e
...
...
@@ -151,6 +151,7 @@ def _rgb_data(spectral_cube):
res
/=
tmp
return
res
shp
=
spectral_cube
.
shape
[:
-
1
]
+
(
3
,)
spectral_cube
=
spectral_cube
.
reshape
((
-
1
,
spectral_cube
.
shape
[
-
1
]))
xyz
=
getxyz
(
spectral_cube
.
shape
[
-
1
])
xyz_data
=
np
.
tensordot
(
spectral_cube
,
xyz
,
axes
=
[
-
1
,
-
1
])
...
...
@@ -160,7 +161,7 @@ def _rgb_data(spectral_cube):
for
x
in
range
(
xyz_data
.
shape
[
0
]):
rgb_data
[
x
]
=
_gammacorr
(
np
.
matmul
(
MATRIX_SRGB_D65
,
xyz_data
[
x
]))
rgb_data
=
rgb_data
.
clip
(
0.
,
1.
)
return
rgb_data
.
reshape
(
sp
ectral_cube
.
shape
[:
-
1
]
+
(
-
1
,)
)
return
rgb_data
.
reshape
(
s
h
p
)
def
_find_closest
(
A
,
target
):
...
...
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