Skip to content

Commit

Permalink
Check filtering step
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienPeloton committed Jun 11, 2024
1 parent b83e397 commit c10a8ef
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bin/raw2science.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,21 @@ def main():
latestfirst=False
)

# DEBUG STATEMENTS
df_static = spark.read.format('parquet').load(
rawdatapath + "/year={}/month={}/day={}".format(
args.night[0:4],
args.night[4:6],
args.night[6:8]
)
)

print("COUNT BEFORE: {}".format(df_static.count()))
df_filtered = df_static\
.filter(df_static['candidate.nbad'] == 0)\
.filter(df_static['candidate.rb'] >= 0.55)
print("COUNT AFTER: {}".format(df_filtered.count()))

# Apply science modules
if 'candidate' in df.columns:
# Apply quality cuts
Expand Down

0 comments on commit c10a8ef

Please sign in to comment.