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

update ps1 star filtering #995

Merged
merged 1 commit into from
Aug 29, 2024
Merged
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
22 changes: 11 additions & 11 deletions mirar/pipelines/winter/generator/candidates.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@ def winter_candidate_quality_filterer(source_table: SourceBatch) -> SourceBatch:
"""
new_batch = []

min_dist_to_star = 7.0

for source in source_table:
src_df = source.get_data()

Expand All @@ -290,15 +288,17 @@ def winter_candidate_quality_filterer(source_table: SourceBatch) -> SourceBatch:
& (src_df["fwhm"] < 10.0)
& (src_df["mindtoedge"] > 50.0)
& (src_df["isdiffpos"])
& ( # Cut on sgscore1
(src_df["sgscore1"] < 0.5)
| pd.isnull(src_df["sgscore1"])
| (src_df["distpsnr1"] > min_dist_to_star)
)
& ( # Cut on PS1STRM Star Probability
(src_df["ps1strmprobstar1"] < 0.5)
| pd.isnull(src_df["ps1strmprobstar1"])
| (src_df["distpsnr1"] > min_dist_to_star)
& ~( # Not a star according to PS1 or PS1STRM
(
(src_df["distpsnr1"] < 7.0)
& (src_df["srmag"] < 15)
& ((src_df["sgscore"] > 0.7) | (src_df["ps1strmprobstar1"] > 0.7))
)
| (
(src_df["distpsnr1"] < 3.0)
& (src_df["srmag"] < 18)
& ((src_df["sgscore"] > 0.7) | (src_df["ps1strmprobstar1"] > 0.7))
)
)
& (src_df["ndethist"] > 0)
)
Expand Down
Loading