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

pipeline.new_sources: New high sigma is actually the new low sigma #713

Closed
ddobie opened this issue May 23, 2024 · 1 comment · Fixed by #714
Closed

pipeline.new_sources: New high sigma is actually the new low sigma #713

ddobie opened this issue May 23, 2024 · 1 comment · Fixed by #714
Assignees
Labels
bug Something isn't working

Comments

@ddobie
Copy link
Contributor

ddobie commented May 23, 2024

See here:

# We only care about the highest true sigma
new_sources_df = new_sources_df.sort_values(
by=['source', 'true_sigma']
)
# keep only the highest for each source, rename for the daatabase
new_sources_df = (
new_sources_df
.drop_duplicates('source')
.set_index('source')
.rename(columns={'true_sigma': 'new_high_sigma'})
)

sort_values automatically sorts in ascending order, meaning that the lowest true_sigma is sorted to the top. Dropping duplicates then drops all but the top entry, i.e. the lowest.

Fix is to add ascending=False to the sort_values call.

@ddobie
Copy link
Contributor Author

ddobie commented Jan 29, 2025

Fixed in #714

@ddobie ddobie closed this as completed Jan 29, 2025
@github-project-automation github-project-automation bot moved this from To do to Done in Pipeline Backlog Jan 29, 2025
@github-project-automation github-project-automation bot moved this from To do to Done in Nimbus Production Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant