-
Notifications
You must be signed in to change notification settings - Fork 357
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
Idq live #4850
Idq live #4850
Conversation
Noting that this is the completed version of a previous draft MR: #4818 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes, mostly to do with style/conventions. Functionally this looks like it does what I would expect
dq_rate = numpy.maximum(dq_rate, 1) | ||
|
||
logr_n = ExpFitFgBgNormStatistic.lognoiserate( | ||
self, trigs) | ||
logr_n += numpy.log(dq_rate) | ||
return logr_n | ||
|
||
def single(self, trigs): | ||
# make sure every trig has a dq state | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think an if hasattr(self, 'ifo')
would be nicer here than the try/except. However I know that is against EAFP, and this is how it is done elsewhere
tnum = trigs.template_num | ||
except AttributeError: | ||
tnum = trigs['template_id'] | ||
|
||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This try/except is used a couple of times now. It would be good to be in a function. Codeclimate will probably complain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments re: formatting, but I think this is good otherwise
Please rebase on master to pick up #4855 and get the tests to pass. |
Co-authored-by: Gareth S Cabourn Davies <gareth.cabourndavies@ligo.org>
* Have pycbc live mark flagged triggers instead of removing * Make stat usable in low-latency * Add command line argument for whether to use idq for reweighting * Add logging for iDQ flagged triggers * Fix bug when using ifo with no dq * Improve logic for getting ifo frm trigs * Update for compatibility with Gareth's stat reloading code * Modify how trig ifo is gotten and add debug statements * Use logging not print for debugging * logger not logging * Fix where tnum is set * Get rid of excess logging * Address Gareth's comments * Codeclimate * Apply suggestions from code review Co-authored-by: Gareth S Cabourn Davies <gareth.cabourndavies@ligo.org> --------- Co-authored-by: Gareth S Cabourn Davies <gareth.cabourndavies@ligo.org>
Standard information about the request
This update allows the DQExpFitFgBgNormStatistic ranking statistic to be used in the low-latency PyCBC Live Search
This change primarily affects code used in the live search. No difference is expected in the Live search unless the DQExpFitFgBgNormStatistic is chosen. The same statistic code is also used in the offline search, but this update should not change the results of using the DQ stat in offline.
This change changes scientific output of the low-latency search if DQExpFitFgBgNormStatistic is selected as the ranking statistic.
Contents
While this change allows the DQExpFitFgBgNormStatistic to be used in low-latency, it does not include code changes needed to produce a new statistic file for that stat to use.
I plan to make a separate merge request in the next few days building on #4813 that will allow a new statistic file to be produced and read in daily.
Testing performed
Ran on the O3 replay MDC for a day