diff --git a/src/domains/rg_space.py b/src/domains/rg_space.py index c6e1c54d8669b751d3520b4c2830044fe1aed30d..142297b61b194da9afb7df87a2ce12a8041f9702 100644 --- a/src/domains/rg_space.py +++ b/src/domains/rg_space.py @@ -11,7 +11,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # -# Copyright(C) 2013-2020 Max-Planck-Society +# Copyright(C) 2013-2021 Max-Planck-Society # # NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik. @@ -77,6 +77,8 @@ class RGSpace(StructuredDomain): if self._harmonic: temp = 1. / (np.array(self._shape) * temp) self._rdistances = tuple(temp) + self._hdistances = tuple( + 1. / (np.array(self.shape)*np.array(self._rdistances))) if min(self._rdistances) <= 0: raise ValueError('Non-positive distances encountered') @@ -220,7 +222,4 @@ class RGSpace(StructuredDomain): The n-th entry of the tuple is the distance between neighboring grid points along the n-th dimension. """ - if self._harmonic: - return tuple(1. / (np.array(self.shape)*np.array(self._rdistances))) - else: - return self._rdistances + return self._hdistances if self._harmonic else self._rdistances diff --git a/test/test_spaces/test_rg_space.py b/test/test_spaces/test_rg_space.py index a1ec8302e5d8c00afc50630b9f7d5584c8a5c821..126a26958deb7c7d1f83e58abea37be4bf927078 100644 --- a/test/test_spaces/test_rg_space.py +++ b/test/test_spaces/test_rg_space.py @@ -11,7 +11,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # -# Copyright(C) 2013-2019 Max-Planck-Society +# Copyright(C) 2013-2021 Max-Planck-Society # # NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.