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 a couple of output/upload value issues in pycbc live #4953

Merged

Conversation

GarethCabournDavies
Copy link
Contributor

Update the chisquared uploaded to gracedb to be reduced, and save the ranking statistic value

Standard information about the request

This is a bug fix
This change affects the live search
This change changes scientific output
This change: follows style guidelines (See e.g. PEP8), has been proposed using the contribution guidelines

Motivation / contents

We noticed that the chisquared for singles was not the reduced chisquared - I tracked it down to where I'd missed that I was using the same trigger set for statistic calculation as I was for the upload, which is not what is done for coincs, this is now set back to the un-modified set of triggers.

We also realised that the ranking statistic isnt being saved - I have added this to the gracedb upload/xml by utilising the "likelihood" value in the coinc row of the table.

Testing performed

Need to test this, but thought it best to get the PR in first

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

@GarethCabournDavies GarethCabournDavies added low latency v27_release_branch Things to be added to the v2.7 release branch labels Nov 22, 2024
pycbc/io/gracedb.py Outdated Show resolved Hide resolved
@maxtrevor
Copy link
Contributor

@GarethCabournDavies would it be possible for you to get single detector candidate info into the foreground section of the 8 second trigger files as well? or too much for this one MR?

@GarethCabournDavies
Copy link
Contributor Author

@GarethCabournDavies would it be possible for you to get single detector candidate info into the foreground section of the 8 second trigger files as well? or too much for this one MR?

Probably too much for this MR (and avoiding scope-creep of this one).

I'll add an issue to say that a lot of this (saving/upload of candidates) seems to be repeated imperfectly between coincs and singles, so trying to get them to use the same code path would be better

@maxtrevor
Copy link
Contributor

@GarethCabournDavies would it be possible for you to get single detector candidate info into the foreground section of the 8 second trigger files as well? or too much for this one MR?

Probably too much for this MR (and avoiding scope-creep of this one).

I'll add an issue to say that a lot of this (saving/upload of candidates) seems to be repeated imperfectly between coincs and singles, so trying to get them to use the same code path would be better

Ok. Getting the likelihood into the xml is already an improvement, thanks!

@@ -303,7 +303,8 @@ def check(self, trigs, data_reader):

# fill in a new candidate event
candidate = {
f'foreground/{self.ifo}/{k}': cutall_trigs[k][i] for k in trigs
f'foreground/{self.ifo}/{k}': cut_trigs[k][sngl_idx][i]
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused by the change to this line? Why do we need sngl_idx here now when we didn't before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cutall_trigs already had the sngl_idx included (line 285 above), but cut_trigs doesnt have that

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I missed the change from cutall_trigs to cut_trigs

Copy link
Contributor

@maxtrevor maxtrevor left a comment

Choose a reason for hiding this comment

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

This looks good to me, approving

@@ -303,7 +303,8 @@ def check(self, trigs, data_reader):

# fill in a new candidate event
candidate = {
f'foreground/{self.ifo}/{k}': cutall_trigs[k][i] for k in trigs
f'foreground/{self.ifo}/{k}': cut_trigs[k][sngl_idx][i]
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I missed the change from cutall_trigs to cut_trigs

@GarethCabournDavies GarethCabournDavies merged commit fd06cfb into gwastro:master Nov 25, 2024
29 checks passed
@GarethCabournDavies GarethCabournDavies deleted the check_output_values branch November 25, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low latency v27_release_branch Things to be added to the v2.7 release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants