Skip to content

Commit

Permalink
Error Check Failed
Browse files Browse the repository at this point in the history
An empty list if statement check failed when the list was empty and was replaced with a try except statement instead.
  • Loading branch information
kjkoeller committed Dec 1, 2022
1 parent d944aa5 commit 90ac01c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions APASS_AIJ_comparison_selector.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Author: Kyle Koeller
Created: 2/8/2022
Last Updated: 11/22/2022
Last Updated: 12/01/2022
APASS Star comparison finding for the most accurate magnitudes from the list of stars made in AIJ
"""
Expand Down Expand Up @@ -134,11 +134,12 @@ def angle_dist(df, dh):

# removes all duplicate rows from the dataframe
duplicate_df = comp.drop_duplicates()

if list(duplicate_df[0]):
try:
list(duplicate_df[0])
pass
else:
print("There were not comparison stars found between the two text files.")
except KeyError:
print("There were not comparison stars found between APASS and the RADEC file.")
exit()

return duplicate_df

Expand Down

0 comments on commit 90ac01c

Please sign in to comment.