summaryrefslogtreecommitdiff
path: root/stwcs/wcsutil/hstwcs.py
diff options
context:
space:
mode:
authorNadia Dencheva <nadia.astropy@gmail.com>2017-04-24 20:27:39 -0400
committerGitHub <noreply@github.com>2017-04-24 20:27:39 -0400
commitc956b066bd3f9e60491a8258a14c2028f713d23b (patch)
tree5984d868fd456020c640d406a90726c74b6c47f2 /stwcs/wcsutil/hstwcs.py
parent53494790dfa08265eeea23b5e659f1ac157a1490 (diff)
parent95e84f773a7254f7a07d7393c9dd3828ff8c5662 (diff)
downloadstwcs_hcf-c956b066bd3f9e60491a8258a14c2028f713d23b.tar.gz
Merge pull request #31 from nden/verbosity1.3.2rc11.3.1rc1
suppress warning messages when it's known they are not relevant
Diffstat (limited to 'stwcs/wcsutil/hstwcs.py')
-rw-r--r--stwcs/wcsutil/hstwcs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/stwcs/wcsutil/hstwcs.py b/stwcs/wcsutil/hstwcs.py
index d9146d2..86dec5e 100644
--- a/stwcs/wcsutil/hstwcs.py
+++ b/stwcs/wcsutil/hstwcs.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import, division, print_function
import os
+import warnings
from astropy.wcs import WCS
from astropy.io import fits
from ..distortion import models, coeff_converter
@@ -17,6 +18,7 @@ default_log_level = log.getEffectiveLevel()
__all__ = ['HSTWCS']
+warnings.filterwarnings("ignore", message="^Some non-standard WCS keywords were excluded:", module="astropy.wcs.wcs")
def extract_rootname(kwvalue, suffix=""):
""" Returns the rootname from a full reference filename
@@ -385,10 +387,8 @@ class HSTWCS(WCS):
sip2hdr : bool
If True - include SIP coefficients
"""
- if not relax and not sip2hdr:
- log.setLevel('WARNING')
+ warnings.filterwarnings("ignore", message="^Some non-standard WCS keywords were excluded:", module="astropy.wcs")
h = self.to_header(key=wcskey, relax=relax)
- log.setLevel(default_log_level)
if not wcskey:
wcskey = self.wcs.alt