Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
skamann
pampelmuse
Commits
9fdda2c0
Commit
9fdda2c0
authored
Apr 20, 2021
by
skamann
Browse files
Fixed few deprecation warnings.
parent
a47aa9e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
pampelmuse/graphics/pampelmuse_gui.py
View file @
9fdda2c0
...
...
@@ -2,7 +2,7 @@
"""
pampelmuse_gui.py
=================
Copyright 2013-202
0
Sebastian Kamann
Copyright 2013-202
1
Sebastian Kamann
This file is part of PampelMuse.
...
...
@@ -37,7 +37,7 @@ defines the methods that are called by Ui_PampelMuseGui.
Latest Git revision
-------------------
202
0
/0
3
/2
7
202
1
/0
4
/2
0
"""
import
datetime
import
logging
...
...
@@ -64,7 +64,7 @@ from ..utils.fits import save_prm, read_config_from_header, make_header_from_con
__author__
=
"Sebastian Kamann (s.kamann@ljmu.ac.uk)"
__revision__
=
202
00327
__revision__
=
202
10420
class
ToolbarWithoutMessage
(
NavigationToolbar
):
...
...
@@ -269,7 +269,7 @@ class PampelMuseGui(QMainWindow, Ui_PampelMuseGui):
self
.
sources
=
Sources
(
catalog
=
data
)
# add new property indicating which stars are currently plotted
self
.
sources
.
plotted
=
pd
.
Index
([],
dtype
=
np
.
bool
)
self
.
sources
.
plotted
=
pd
.
Index
([],
dtype
=
bool
)
# define default sizes for plotting stars
mag0
=
self
.
sources
.
mag
[
self
.
sources
.
status
<
4.
].
min
()
+
5.
...
...
@@ -430,7 +430,7 @@ class PampelMuseGui(QMainWindow, Ui_PampelMuseGui):
# initialize spectrumMask if needed
if
self
.
spectrumMask
is
None
or
self
.
spectrumMask
.
size
!=
self
.
sources
.
n_dispersion
:
self
.
spectrumMask
=
np
.
ones
((
self
.
sources
.
n_dispersion
,),
dtype
=
np
.
bool
)
self
.
spectrumMask
=
np
.
ones
((
self
.
sources
.
n_dispersion
,),
dtype
=
bool
)
# check if interaction states need to be changed
if
self
.
ifsLoaded
is
None
:
...
...
pampelmuse/instruments/generic_ifs.py
View file @
9fdda2c0
"""
generic_ifs.py
==============
Copyright 2013-201
8
Sebastian Kamann
Copyright 2013-20
2
1 Sebastian Kamann
This file is part of PampelMuse.
...
...
@@ -29,7 +29,7 @@ i.e. NAXIS3 in FITS counting) being the spectral axis.
Latest Git revision
-------------------
20
18/05/08
20
21/04/20
"""
import
logging
import
numpy
as
np
...
...
@@ -39,7 +39,7 @@ from .instrument import Instrument
__author__
=
"Sebastian Kamann (s.kamann@ljmu.ac.uk)"
__revision__
=
20
180508
__revision__
=
20
210420
class
GenericIFS
(
Instrument
):
...
...
@@ -100,7 +100,7 @@ class GenericIFS(Instrument):
the spatial dimensions and must not be known a priori.
"""
if
self
.
_edge
is
None
and
self
.
transform
is
not
None
:
self
.
_edge
=
self
.
find_edge
(
np
.
zeros
(
self
.
shape
,
dtype
=
np
.
bool
))
self
.
_edge
=
self
.
find_edge
(
np
.
zeros
(
self
.
shape
,
dtype
=
bool
))
return
self
.
_edge
...
...
@@ -204,7 +204,7 @@ class GenericIFS(Instrument):
return
None
j
,
k
=
self
.
_transform
[
i
].
astype
(
'<i4'
)
mask
=
self
.
maskhdu
.
data
[:,
j
,
k
]
if
self
.
maskhdu
is
not
None
else
np
.
zeros
(
self
.
wave
.
shape
,
dtype
=
np
.
bool
)
mask
=
self
.
maskhdu
.
data
[:,
j
,
k
]
if
self
.
maskhdu
is
not
None
else
np
.
zeros
(
self
.
wave
.
shape
,
dtype
=
bool
)
return
(
np
.
where
(
mask
,
np
.
nan
,
self
.
datahdu
.
data
[:,
j
,
k
]),
np
.
where
(
mask
,
np
.
nan
,
self
.
varhdu
.
data
[:,
j
,
k
])
if
return_var
and
self
.
varhdu
is
not
None
else
None
)
...
...
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