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

Add a script to supervise template fitting in pycbc live #4813

Merged

Conversation

GarethCabournDavies
Copy link
Contributor

@GarethCabournDavies GarethCabournDavies commented Jul 12, 2024

Adding a script, similar to the one for significance fits, to collate triggers and run fit_by_template and fit_over_multiparam on them

Standard information about the request

This is a new feature
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

This is a code so that the ranking statistics which use trigger fit files can be used in the pycbc live search. The triggers will be collected, and fit_over_multiparam files generated using a rolling window of daily fit_by_template

Contents

(Didn't realise I'd missed this originally - added in an edit)

  • Move a lot of the shared content of this and the significance fits into a module
  • Make a new file which runs the collation and fitting: bin/live/pycbc_live_supervise_collated_triggers

A general overview of the supervision script is as follows:

  • Define which options should be read from the input config file for each supervised code
  • Make some functions which run the individual codes
  • the fit_over_multiparam function also checks for previous days' fit_by_template files if needed
    A lot of this is similar to the significance fits code, so I could go through and remove duplicated effort, but it works for now

Links to any issues or associated PRs

#4527, #4670, #4689, #4695, #4697

Testing performed

Run daily (manually) so that plots are produced - see https://ldas-jobs.ligo.caltech.edu/~gareth.cabourndavies/pycbclive/supervise_fit_coeff_dq_files/testing/output_plots/2024/07/ for latest plots

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

@GarethCabournDavies GarethCabournDavies force-pushed the supervise_fit_coeff_dq_files branch from 16668e3 to 9e55544 Compare July 19, 2024 15:04
@GarethCabournDavies
Copy link
Contributor Author

Big changes in the last batch of commits: moving to use one supervision script is the main one.

Fixed a couple of bugs now that we are dealing with fit files which may not contain triggers from the past, which may not have information for templates which triggered today.

I think there isn't too much code duplication and have tried to log / comment / make things obvious at each step

if found_files == 0:
raise RuntimeError("No files found")

if missed_files == 10:
Copy link
Contributor

@titodalcanton titodalcanton Jul 23, 2024

Choose a reason for hiding this comment

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

If not too difficult, could we rather take this value from the config file? If you do, make sure you update the comment and warning message too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have done, but I've made it so that if it isnt given, then 10 is used as a default, as I think that is fairly sensible

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.

I've read through all the changes, I think this is good to go

@maxtrevor maxtrevor merged commit 65b8a89 into gwastro:master Jul 24, 2024
31 of 32 checks passed
@maxtrevor maxtrevor mentioned this pull request Aug 9, 2024
1 task
prayush pushed a commit to prayush/pycbc that referenced this pull request Nov 21, 2024
* Move code which will be shared into a module

* getting more things ready for the trigger fits / dq supervision

* start work on fit_by, fit_over and DQ trigger supervision

* some work - bring in latest trigger file finding

* updates to use latest trigger file finding

* pass cuts through to the collation script

* symlink fit_over_multiparam output to variable file

* remove unused imports, argument ordering, plot titles

* CC

* Fix docstring, formatting

* Move the trigger collatiojn/fitting superviosor to use configparsert

* start moving significance fit supervision to configparser

* Start puttinf template fits into supervision code shared with significance fits

* Deal properly with whene there are no trigers, so we can't calculate the median_sigma

* Remove no-longer-valid efficiency savings

* Some minor fixes for when sending mail from supervision

* Mve to a single supervision file for both trigger and significance fits

* Remove FIXMEs

* Use check=True with subprocess.run

* Remove function checking fit coefficients - it is now unclear what the 'safe' ranges should be for the various different stages

* Fix minor bug

* typo

* Some minor fixes and TDC comments

* CC
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