summaryrefslogtreecommitdiff
path: root/stwcs/wcsutil/hstwcs.py
diff options
context:
space:
mode:
authorNadia Dencheva <nadia.astropy@gmail.com>2016-08-14 17:14:55 -0400
committerGitHub <noreply@github.com>2016-08-14 17:14:55 -0400
commit36b6b7837e8e6c87c372af25c3636a0b6020ca30 (patch)
treecc105741d82f0255a8f941a1cf7e79f01845829a /stwcs/wcsutil/hstwcs.py
parent854883354a933451a6120d96154a25c55dc14826 (diff)
parent7d3caf090ee2d975f5d314de3a9d4c89a1c0e9e5 (diff)
downloadstwcs_hcf-36b6b7837e8e6c87c372af25c3636a0b6020ca30.tar.gz
Merge pull request #16 from nden/catch-info-messages
Catch info messages
Diffstat (limited to 'stwcs/wcsutil/hstwcs.py')
-rw-r--r--stwcs/wcsutil/hstwcs.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/stwcs/wcsutil/hstwcs.py b/stwcs/wcsutil/hstwcs.py
index aeaa43f..d9146d2 100644
--- a/stwcs/wcsutil/hstwcs.py
+++ b/stwcs/wcsutil/hstwcs.py
@@ -12,6 +12,9 @@ from . import getinput
from . import instruments
from .mappings import inst_mappings, ins_spec_kw
+from astropy import log
+default_log_level = log.getEffectiveLevel()
+
__all__ = ['HSTWCS']
@@ -382,8 +385,11 @@ class HSTWCS(WCS):
sip2hdr : bool
If True - include SIP coefficients
"""
-
+ if not relax and not sip2hdr:
+ log.setLevel('WARNING')
h = self.to_header(key=wcskey, relax=relax)
+ log.setLevel(default_log_level)
+
if not wcskey:
wcskey = self.wcs.alt
if self.wcs.has_cd():