Commit 5be1d0f9 authored by skamann's avatar skamann
Browse files

Fixed again some deprecation warnings.

parent 7cdfe5c7
"""
coordinates.py
==============
Copyright 2013-2020 Sebastian Kamann
Copyright 2013-2021 Sebastian Kamann
This file is part of PampelMuse.
......@@ -65,7 +65,7 @@ This results in the inverse transformation:
Latest Git revision
-------------------
2020/02/12
2021/04/22
"""
import logging
import os
......@@ -76,7 +76,7 @@ from ..core.parameters import Parameters
__author__ = "Sebastian Kamann (s.kamann@ljmu.ac.uk)"
__revision__ = 20200212
__revision__ = 20210422
logger = logging.getLogger(__name__)
......@@ -245,7 +245,7 @@ class Transformation(Parameters):
np.nanmean(residuals[:, i, 1])))
# define which parameters are free/fixed
free = np.ones((len(cls.PARAMETERS)), dtype=np.bool)
free = np.ones((len(cls.PARAMETERS)), dtype=bool)
if fixed is not None:
for parameter in fixed.columns.names:
free[cls.PARAMETERS.index(parameter)] = False
......@@ -361,7 +361,7 @@ class Transformation(Parameters):
# handle fixed parameters, if any:
# The idea is to multiply each fixed parameter with the corresponding column of the matrix,
# subtract the results from b, and exclude the column from the fit
use_column = np.ones(in_matrix.shape[1], dtype=np.bool)
use_column = np.ones(in_matrix.shape[1], dtype=bool)
for parameter, value in fixed.items():
value = np.atleast_1d(value)
if value.size != b.shape[0]:
......
"""
instrument.py
=============
Copyright 2013-2018 Sebastian Kamann
Copyright 2013-2021 Sebastian Kamann
This file is part of PampelMuse.
......@@ -28,7 +28,7 @@ defines generic methods that are inherited by all its subclasses.
Latest Git revision
-------------------
2018/05/08
2021/04/22
"""
import logging
import matplotlib
......@@ -42,7 +42,7 @@ from ..utils.distance import dist2path, point_in_poly
__author__ = "Sebastian Kamann (s.kamann@ljmu.ac.uk)"
__revision__ = 20180508
__revision__ = 20210422
class Instrument(object):
......@@ -455,7 +455,7 @@ class Instrument(object):
A boolean array that is True if a science fibre is present at this
index and False if an auxiliary fibre is located there.
"""
_isscience = np.ones((self.nspaxel + self.naux,), dtype=np.bool)
_isscience = np.ones((self.nspaxel + self.naux,), dtype=bool)
_isscience[self.aux_fibers] = False
return _isscience
......@@ -554,7 +554,7 @@ class Instrument(object):
A boolean flag for each source indicating whether or not it is
inside the field of view.
"""
return np.array([point_in_poly(x, y, self.edgepath.vertices) for x, y in xy], dtype=np.bool)
return np.array([point_in_poly(x, y, self.edgepath.vertices) for x, y in xy], dtype=bool)
def distance_to_edge(self, xy, metric=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