diff --git a/bin/hostless_detection.py b/bin/hostless_detection.py index efa1cc76..40c2114a 100644 --- a/bin/hostless_detection.py +++ b/bin/hostless_detection.py @@ -117,16 +117,17 @@ def main(): F.col("cutoutTemplate.stampData").alias("cutoutTemplate"), ] - cond_science_low = df["kstest_static"][0] >= 0. + cond_science_low = df["kstest_static"][0] >= 0.0 cond_science_high = df["kstest_static"][0] <= 0.5 - cond_template_low = df["kstest_static"][1] >= 0. + cond_template_low = df["kstest_static"][1] >= 0.0 cond_template_high = df["kstest_static"][1] <= 0.85 - pdf = df\ - .filter(cond_science_low & cond_science_high)\ - .filter(cond_template_low & cond_template_high)\ - .select(cols_)\ + pdf = ( + df.filter(cond_science_low & cond_science_high) + .filter(cond_template_low & cond_template_high) + .select(cols_) .toPandas() + ) # load hostless IDs past_ids = read_past_ids(args.hostless_folder)