From c2cb9717ff51b2e6c4e7e76e765ae9a99ac586f3 Mon Sep 17 00:00:00 2001 From: Jean Connelly Date: Fri, 15 Mar 2019 14:19:16 -0400 Subject: [PATCH] Add a force_catalog keyword arg for analysis --- proseco/core.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/proseco/core.py b/proseco/core.py index 6167be80..65341a1c 100644 --- a/proseco/core.py +++ b/proseco/core.py @@ -549,6 +549,7 @@ class ACACatalogTable(BaseCatalogTable): include_ids_guide = IntListMetaAttribute(default=[]) exclude_ids_guide = IntListMetaAttribute(default=[]) optimize = MetaAttribute(default=True) + force_catalog = MetaAttribute(default=False) verbose = MetaAttribute(default=False) print_log = MetaAttribute(default=False) log_info = MetaAttribute(default={}, is_kwarg=False) @@ -636,6 +637,14 @@ def set_attrs_from_kwargs(self, **kwargs): dither = 8 if self.detector.startswith('ACIS') else 20 self.dither_acq = ACABox(dither) + if 'force_catalog' in kwargs and kwargs['force_catalog'] == True: + cat = obs['cat'] + ok = np.in1d(cat['type'], ('ACQ', 'BOT')) + self.include_ids_acq = cat['id'][ok].tolist() + self.include_halfws_acq = cat['halfw'][ok].tolist() + ok = np.in1d(cat['type'], ('GUI', 'BOT')) + self.include_ids_guide = cat['id'][ok].tolist() + self.starcheck_catalog = obs for dither_attr in ('dither_acq', 'dither_guide'):