Follow-up from "Fix bug that broke BAYESTAR localizations for PyCBC events"
The following discussion from !775 (merged) should be addressed:
Just to make sure, is there any way to write this with the
ifstatement inside the canvas? Then this would be a one line change.
As I replied:
In general, yes, there is: we can use Python's ternary if expression,
a if b else c, inside canvases. However, it's not straightforward to do that here given the existing structure of the function, because PyCBC needs to be triggered by
newLVAlert messages and all the other pipelines need to be triggered by
It's a good idea to refactor this to eliminate the code duplication. Is it OK with you if I open an issue to remind myself to do that at a later date?