Commit 9fdda2c0 authored by skamann's avatar skamann
Browse files

Fixed few deprecation warnings.

parent a47aa9e1
......@@ -2,7 +2,7 @@
"""
pampelmuse_gui.py
=================
Copyright 2013-2020 Sebastian Kamann
Copyright 2013-2021 Sebastian Kamann
This file is part of PampelMuse.
......@@ -37,7 +37,7 @@ defines the methods that are called by Ui_PampelMuseGui.
Latest Git revision
-------------------
2020/03/27
2021/04/20
"""
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__ = 20200327
__revision__ = 20210420
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:
......
"""
generic_ifs.py
==============
Copyright 2013-2018 Sebastian Kamann
Copyright 2013-2021 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
-------------------
2018/05/08
2021/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__ = 20180508
__revision__ = 20210420
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment