From c6bef72c4cf9bca6ea0beaf142f3f1ceeb8ffc4a Mon Sep 17 00:00:00 2001 From: Tom Aldcroft Date: Wed, 16 Mar 2022 15:08:16 -0400 Subject: [PATCH] Silence the sherpa warning about DS9 not being available --- find_attitude/find_attitude.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/find_attitude/find_attitude.py b/find_attitude/find_attitude.py index 51d6e62..53610db 100644 --- a/find_attitude/find_attitude.py +++ b/find_attitude/find_attitude.py @@ -464,6 +464,13 @@ def find_attitude_for_agasc_ids(yags, zags, agasc_id_star_map): """ global yagzag + # Squelch the useless warning below prior to import. Since this application + # does not dealing with image data we don't worry about silencing these. + # WARNING: imaging routines will not be available, + # failed to import sherpa.image.ds9_backend due to + # 'RuntimeErr: DS9Win unusable: Could not find ds9 on your PATH' + logging.getLogger('sherpa.image').setLevel(logging.ERROR) + from sherpa import ui import agasc from Quaternion import Quat