Skip to content

Commit

Permalink
fixed tesscut search
Browse files Browse the repository at this point in the history
  • Loading branch information
Nschanche committed Dec 18, 2024
1 parent 154493f commit a9176f9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/lksearch/TESSSearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ def __init__(
self.mission_search = ["TESS"]
else:
self.mission_search = ["TESS", "HLSP"]
pipeline = np.atleast_1d(pipeline)

# Sending 'pipeline' to MASTSearch init causes a SearchError, so handle that separately
if "tesscut" in [p.lower() for p in pipeline] or (type(pipeline) is type(None)):
add_tesscut = True
pipeline = np.delete(
pipeline, [p.lower() for p in pipeline].index("tesscut")
)

super().__init__(
target=target,
Expand All @@ -102,7 +110,7 @@ def __init__(
)

if table is None:
if ("TESScut" in np.atleast_1d(pipeline)) or (type(pipeline) is type(None)):
if add_tesscut:
self._add_tesscut_products(sector)
self._add_TESS_mission_product()
self._sort_TESS()
Expand Down Expand Up @@ -144,7 +152,7 @@ def _target_to_exact_name(self, target):
return f"{target.group(2)}"

def _add_TESS_mission_product(self):
"""Determine whick products are HLSPs and which are mission products"""
"""Determine which products are HLSPs and which are mission products"""
mission_product = np.zeros(len(self.table), dtype=bool)
mission_product[self.table["pipeline"] == "SPOC"] = True
self.table["mission_product"] = mission_product
Expand Down

0 comments on commit a9176f9

Please sign in to comment.