Skip to content

Commit

Permalink
fixed bug where HLSP didn't appear in TESSSEarch
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerapritchard committed Jul 11, 2024
1 parent 7419638 commit 77d4c66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/lksearch/MASTSearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,13 @@ def _searchtable_from_target(self, target: Union[str, tuple[float], SkyCoord]):
"lightcurve",
"dvreport",
]

mask = self._filter(
exptime=self.search_exptime,
mission=self.search_mission,
pipeline=self.search_pipeline,
sequence_number=self.search_sequence,
filetype=filetype,
) # setting provenance_name=None will return HLSPs
)
self.table = self.table[mask].reset_index(drop=True)

def _searchtable_from_table(
Expand Down Expand Up @@ -924,7 +923,6 @@ def _filter(
cumulative boolean mask for self.table based off of
the product of individual filter properties
"""

mask = np.ones(len(self.table), dtype=bool)
if target_name is not None:
target_name = np.atleast_1d(target_name).astype(str)
Expand Down Expand Up @@ -1122,7 +1120,6 @@ def _download_one(
if pd.notna(row["cloud_uri"]):
download = False
if conf.DOWNLOAD_CLOUD or download:
print(cloud_only)
manifest = Observations.download_products(
Table().from_pandas(row.to_frame(name=" ").transpose()),
download_dir=download_dir,
Expand Down
6 changes: 5 additions & 1 deletion src/lksearch/TESSSearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ def __init__(
):
if hlsp is False:
pipeline = ["SPOC", "TESS-SPOC", "TESScut"]
self.mission_search = ["TESS"]
else:
self.mission_search = ["TESS", "HLSP"]

super().__init__(
target=target,
mission=["TESS"],
mission=self.mission_search,
obs_table=obs_table,
prod_table=prod_table,
table=table,
Expand All @@ -100,6 +103,7 @@ def __init__(
pipeline=pipeline,
sequence=sector,
)

if table is None:
if ("TESScut" in np.atleast_1d(pipeline)) or (type(pipeline) is type(None)):
self._add_tesscut_products(sector)
Expand Down

0 comments on commit 77d4c66

Please sign in to comment.