Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove warning in Kernel.normalize #5531

Merged
merged 1 commit into from
Dec 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions astropy/convolution/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions astropy/convolution/tests/test_kernel_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down