From b6a1bcc4530a307f995030a74355134d0929125a Mon Sep 17 00:00:00 2001 From: Simon Torres Date: Mon, 30 Oct 2017 15:02:17 -0300 Subject: [PATCH 1/2] Added test primitive goodmanPrimitive --- soardr/goodman/primitives_goodman.py | 7 +++++++ soardr/goodman/recipes/qa/recipes_SPECT.py | 1 + 2 files changed, 8 insertions(+) diff --git a/soardr/goodman/primitives_goodman.py b/soardr/goodman/primitives_goodman.py index 97b9040..a9c35ac 100644 --- a/soardr/goodman/primitives_goodman.py +++ b/soardr/goodman/primitives_goodman.py @@ -30,3 +30,10 @@ def gudayMate(self, *args, **kwargs): log.stdinfo("Coming to you from {}.".format(self.myself())) return + + def goodmanPrimitive(self, *args, **kwargs): + log = self.log + log.stdinfo(gt.log_message(" This is a ", self.myself())) + for ad in self.adinputs: + log.stdinfo("The file name is: {}".format(ad.filename)) + log.stdinfo("Tags are: {}".format(ad.tags)) diff --git a/soardr/goodman/recipes/qa/recipes_SPECT.py b/soardr/goodman/recipes/qa/recipes_SPECT.py index e4d16fe..a13ef72 100644 --- a/soardr/goodman/recipes/qa/recipes_SPECT.py +++ b/soardr/goodman/recipes/qa/recipes_SPECT.py @@ -8,6 +8,7 @@ def grecipe(p): p.helloWorld() p.gudayMate() + p.goodmanPrimitive() return default = grecipe From 375b2883a9594fb5790544334e4f3f0256562aa1 Mon Sep 17 00:00:00 2001 From: Simon Torres Date: Mon, 30 Oct 2017 15:17:14 -0300 Subject: [PATCH 2/2] Changed CAM_ANG to CAM_TARG for selecting IMAGE or SPECT tags. Also fixed typo in WAVMODE. Created copy of recipes_SPECT.py to recipes_IMAGE.py --- soar_instruments/goodman/adclass.py | 5 +++-- soardr/goodman/recipes/qa/recipes_IMAGE.py | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 soardr/goodman/recipes/qa/recipes_IMAGE.py diff --git a/soar_instruments/goodman/adclass.py b/soar_instruments/goodman/adclass.py index 0e34a1b..2fe5159 100644 --- a/soar_instruments/goodman/adclass.py +++ b/soar_instruments/goodman/adclass.py @@ -40,12 +40,13 @@ def _tag_blue(self): @astro_data_tag def _tag_image(self): - if self.phu.get('CAM_ANG') == 0 and self.phu.get('WAVMOD') == 'Imaging': + print(self.phu.get('WAVMODE')) + if self.phu.get('CAM_TARG') == 0 and self.phu.get('WAVMODE') == 'Imaging': return TagSet(['IMAGE']) @astro_data_tag def _tag_spect(self): - if self.phu.get('CAM_ANG') != 0 and self.phu.get('WAVMOD') != 'Imaging': + if self.phu.get('CAM_TARG') != 0 and self.phu.get('WAVMODE') != 'Imaging': return TagSet(['SPECT']) diff --git a/soardr/goodman/recipes/qa/recipes_IMAGE.py b/soardr/goodman/recipes/qa/recipes_IMAGE.py new file mode 100644 index 0000000..921a836 --- /dev/null +++ b/soardr/goodman/recipes/qa/recipes_IMAGE.py @@ -0,0 +1,14 @@ +""" +Test recipe for GOODMAN IMAGE data. + +""" + +recipe_tags = set(['GOODMAN', 'IMAGE']) + +def grecipe(p): + p.helloWorld() + p.gudayMate() + p.goodmanPrimitive() + return + +default = grecipe