-
Notifications
You must be signed in to change notification settings - Fork 356
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 options to pycbc_create_injections for use with offline search codes #3415
Conversation
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.
Thanks for finally adding this; it's been on the to-do list for way too long. What you did is clever. However, I'm not sure I like having tc being mangled like this. The meaning of tc in the config file is changing depending on what the command-line arguments are; that'll be a bit confusing for users I think.
How about just making this all command line? So, add a time-step argument and a delta-time argument, and use those for generating the times? Also add a check for a tc prior in the config file, printing a warning that it's being ignored.
@cdcapano I've just updated the code to raise an error if 'tc' is set in the config file. However, I do think we want the time delay distribution set this way, so as a compromise I've just changed the name to 'time_delay' in the config file to avoid confusion with tc. |
The config file would now look like
|
@cdcapano Poke |
@ahnitz poke |
@cdcapano Please review again. I've moved everything to an option of the script directly as you've suggested to make it consistent. For now, I suspect this is good enough to cover most cases. |
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.
Looks good. Only issues is you have none
typo (see comment), which is what is causing one of the CI tests to fail. (I'm surprised code climate didn't catch it.) Anyway, once you fix that, feel free to merge.
…des (gwastro#3415) * inj * extend pycbc_create_injections to work for search workflows * update * move options to script * Update pycbc_create_injections
This allows one to set start / end times instead of a number of injections to draw. This is the most common scenario for search workflows and is sufficient to enable pycbc_create_injections to produce reasonable files for use with the offline analysis. There may be a couple distributions that should also be added for simplicity, but I think even there most things can be done with inline transforms, etc.
Example config file and command line