Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placed the call to tess_stars2px_function_entry inside a try/except block #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions src/tess_locator/locate.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,23 @@ def locate(
dec = np.atleast_1d(target.dec.to("deg").value)
result = []
for idx in range(len(ra)):
(
_,
_,
_,
out_sector,
out_camera,
out_ccd,
out_col,
out_row,
scinfo,
) = tess_stars2px_function_entry(
0, ra[idx], dec[idx], trySector=sectors_to_search[idx], aberrate=aberrate
)
# tess_stars2px_function_entry will error if sector is not in range
try:
(
_,
_,
_,
out_sector,
out_camera,
out_ccd,
out_col,
out_row,
scinfo,
) = tess_stars2px_function_entry(
0, ra[idx], dec[idx], trySector=sectors_to_search[idx], aberrate=aberrate
)
except:
continue

for idx_out in range(len(out_sector)):
if out_sector[idx_out] < 0:
Expand Down