Skip to content

Commit

Permalink
More test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nschanche committed Apr 2, 2024
1 parent c12a92f commit cf0a635
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/newlk_search/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ def get_sequence_number(self):

# Update 'mission' with the sequence number
self.table["mission"] = [
f" {proj} - Q{seq}"
f"{proj} - Q{seq}"
if seq != '<NA>' else f"{proj}" for proj, seq in zip(self.table["mission"].values.astype(str), seq_num)
]

Expand Down Expand Up @@ -1218,7 +1218,7 @@ def _fix_K2_sequence(self):
seq_num[index] = f"{int(row['sequence_number']):02d}{letter}"

self.table["mission"] = [
f" {proj} - C{seq}"
f"{proj} - C{seq}"
for proj, seq in zip(self.table["mission"].values.astype(str), seq_num)
]

Expand Down
10 changes: 5 additions & 5 deletions tests/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,9 @@ def test_ffi_hlsp():
search = TESSSearch(
"TrES-2b", sector=26
).timeseries # aka TOI 2140.01
assert "QLP" in search.table["pipeline"]
assert "TESS-SPOC" in search.table["pipeline"]
assert "SPOC" in search.table["pipeline"]
assert search.table['pipeline'].str.contains('QLP').any()
assert search.table['pipeline'].str.contains('TESS-SPOC').any()
assert search.table['pipeline'].str.contains('SPOC').any()
# tess-spoc also products tpfs
search = TESSSearch("TrES-2b", sector=26).cubedata
assert "TESS-SPOC" in search.table["pipeline"]
Expand All @@ -545,7 +545,7 @@ def test_qlp_ffi_lightcurve():
#@pytest.mark.remote_data
def test_spoc_ffi_lightcurve():
"""Can we search and download a SPOC FFI light curve?"""
search = TESSSearch("TrES-2b", sector=26, pipeline="tess-spoc")
search = TESSSearch("TrES-2b", sector=26, pipeline="tess-spoc").timeseries
assert len(search) == 1
assert search.author[0] == "TESS-SPOC"
assert search.exptime[0] == 1800. # * u.second # Sector 26 had 30-minute FFIs
Expand Down Expand Up @@ -618,7 +618,7 @@ def test_tesscut():
def test_tesscut():
"""Can we find and download TESS tesscut tpfs"""
assert len(TESSSearch("Kepler 16b", hlsp=False, sector=14)) == 9
assert len(TESSSearch("Kepler 16b", hlsp=False, sector=14).cubedata() == 2)
assert len(TESSSearch("Kepler 16b", hlsp=False, sector=14).cubedata()) == 2



0 comments on commit cf0a635

Please sign in to comment.