-
Notifications
You must be signed in to change notification settings - Fork 81
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
FEAT: add gwsignal waveform generator #877
base: main
Are you sure you want to change the base?
Conversation
condition = 0 | ||
if self.generator.metadata["implemented_domain"] == 'time': | ||
condition = 1 | ||
return condition |
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.
Is there a reason to use 0/1
instead of True/False
?
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 is copied from the existing function (https://github.com/bilby-dev/bilby/blob/main/bilby/gw/source.py#L149). I think this is more of a question for the gwsignal devs, I think @AntoniRamosBuades added this.
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.
The use of 0/1 was added in the first stage of the gwsignal development (see this notebook for more details on the conditioning in gwsignal). Unfortunately, I do not know why 0/1 was chosen, instead of False/True
Thanks for doing things @ColmTalbot, it looks like a good start to me! I had a quick look and added some comments. |
Hi @ColmTalbot I also really like this idea! Just want to mention that for |
Thank you for the PR @ColmTalbot . I am all fine with any changes you make. |
That's a good question, it looks like it currently isn't possible. I see two options:
|
I guess this is the way to go, but I don't know if we can make this ready by the freeze end of March (according to your email).
For this, we would need a wrapper class that acts as a "factory" for the implementation suggested in the PR. I don't know how hard is it to get the change into |
@raffienficiaud this is a quick version of how I had envisioned an extension to the gwsignal support. It doesn't require explicit enumeration of all of the different kinds of source models, users can just do something like
I'm sure there are improvements that could be made to the interface, but I'm hopeful that something like this can be fairly transparent to the underlying
gwsignal
capabilities and ideally not need a lot of modification as more features are added to that. Since you have more experience withgwsignal
I'd be glad to hear any thoughts.Also @adivijaykumar @AntoniRamosBuades and @mj-will