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

Fix sngls_minifollowup event selection/ordering [master] #4823

Conversation

GarethCabournDavies
Copy link
Contributor

We noticed that the sngls_minifollowup pages had essentially randomly chosen, and randomly-ordered events.

This was due to a bug introduced by an overzealous approach to the scope creep part of #4549 (my fault!)

This will also be fixed on the v23_release_branch ... coming soon

Standard information about the request

This is a bug fix
This change affects the offline search

This change changes result presentation

This change follows style guidelines (See e.g. PEP8), has been proposed using the contribution guidelines

Contents

Return to using the mask_to_n_loudest_clustered_events function rather than trying anything too fancy
Make it so that mask_to_n_loudest_clustered_events can use a ranking statistic rather than sngl-ranking

Testing performed

Currently running given latest version

  • Run pycbc_sngl_minifollow with ranking-statistic both as single-ranking-only (default) and as something more complicated

  • Check by printing values that the top events are in the right order, and that the are the highest-statistic events

  • The author of this pull request confirms they will adhere to the code of conduct

@ahnitz
Copy link
Member

ahnitz commented Jul 24, 2024

@yi-fan-wang You may want to incorporate this fix. I think it is probably the thing we were just looking at!

@yi-fan-wang
Copy link
Member

@GarethCabournDavies Hi! Are the events in the mini follow-up page still the loudest ones but just randomly ordered, or are they not even the loudest events?

@GarethCabournDavies
Copy link
Contributor Author

The ones before this fix are just random ones, not even the loudest

@GarethCabournDavies GarethCabournDavies force-pushed the master_singles_minifollow_order branch from 5cf0e61 to 24edb62 Compare July 29, 2024 09:43
@GarethCabournDavies GarethCabournDavies marked this pull request as ready for review July 29, 2024 12:38
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me. However when reviewing this file, I found issues not related to this PR, (1) events are not defined (see this line) (2) a minor issue that coinc is imported but not used anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that! Those are the types of things which would be caught by #4638, so hopefully that won't happen too much in future

I will fix those bugs and then merge

Copy link
Member

@yi-fan-wang yi-fan-wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll approve as the issues I mentioned in the comments are not related to this PR

@GarethCabournDavies GarethCabournDavies enabled auto-merge (squash) July 29, 2024 15:10
@GarethCabournDavies GarethCabournDavies merged commit e4a9db6 into gwastro:master Jul 29, 2024
32 checks passed
@GarethCabournDavies GarethCabournDavies deleted the master_singles_minifollow_order branch July 29, 2024 15:41
prayush pushed a commit to prayush/pycbc that referenced this pull request Nov 21, 2024
* Fix sngls_minifollowup event selection/ordering [master]

* Remove testing printing

* Still create stat class variable even when there are no triggers

* Ranking -> statistic rename

* minor bugs caught duiring review

* oops, accidentally added to this PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants