From a2ed022d6c665a3b290c83a8c15ee7ab0acd1be4 Mon Sep 17 00:00:00 2001 From: Christoph Deil Date: Thu, 1 Dec 2016 17:07:35 +0100 Subject: [PATCH] Remove warning in Kernel.normalize --- astropy/convolution/core.py | 6 ------ astropy/convolution/tests/test_kernel_class.py | 10 ---------- 2 files changed, 16 deletions(-) diff --git a/astropy/convolution/core.py b/astropy/convolution/core.py index b633ccdef4d..41e346f919f 100644 --- a/astropy/convolution/core.py +++ b/astropy/convolution/core.py @@ -112,12 +112,6 @@ def normalize(self, mode='integral'): else: np.divide(self._array, normalization, self._array) - if np.abs(1.0 / normalization) > MAX_NORMALIZATION: - warnings.warn('The kernel normalization factor is ' - 'exceptionally large,' - ' > {0}.'.format(MAX_NORMALIZATION), - AstropyUserWarning) - self._kernel_sum = self._array.sum() @property diff --git a/astropy/convolution/tests/test_kernel_class.py b/astropy/convolution/tests/test_kernel_class.py index 2559ac1e0fc..6f3a816b4cd 100644 --- a/astropy/convolution/tests/test_kernel_class.py +++ b/astropy/convolution/tests/test_kernel_class.py @@ -473,16 +473,6 @@ def test_kernel_normalization_mode(self): kernel = CustomKernel(np.ones(3)) kernel.normalize(mode='invalid') - def test_kernel_normalization_large(self, recwarn): - """ - Test that a warning is issued when the inverse normalization factor - is large. - """ - kernel = CustomKernel(np.ones(3) * 1.e-3) - kernel.normalize() - w = recwarn.pop(AstropyUserWarning) - assert issubclass(w.category, AstropyWarning) - def test_kernel1d_int_size(self): """ Test that an error is raised if ``Kernel1D`` ``x_size`` is not