Open tamaraevst opened 1 year ago
Hi @tamaraevst thanks for opening this issue, I agree we should fix it and I think your second suggestion would be best. Adding it to the Interferometer
meta data in this method might be a good starting point.
This repository is a mirror for our main development repo (git.ligo.org/lscsoft/bilby) so opening a PR will add some complexity. I'm hopeful that we'll be able to support this in future though.
If you're still interested in this, please let me know, otherwise, I'll label this as help wanted.
Hi @ColmTalbot, if it is not very urgent, I would be happy to work on this! My hands are full with some other work, so I will not be able to do it immediately, so it may take some time if that's okay?
This isn't an urgent fix, so let us know when you have time.
The timeline is more likely to be over the late spring or the summer, hope that is okay! When I am done, shall I create a PR on git.ligo.org/lscsoft/bilby repo?
I am new to Bilby, however when using the code for my project I noticed that
plot_interferometer_waveform_posterior()
function uses only the waveform generator of the recovery model when plotting the results. In particular, the following line is responsible for that, whose initialisation of the waveform is subsequently used in the plotting routine:This is not an issue if the same injection and recovery waveforms are used. However, this limits the applicability of this function for more complicated scenarios where these models are not the same. I would like to suggest the following options that could be implemented as changes to account for this issue:
plot_interferometer_waveform_posterior()
. If not passed in the function, the argument can be set to the default, being the recovery waveform with the appropriate injection parameters.result
, for example in the dictionary ofmeta_data
function. It then can be straightforwardly accessed from theplot_interferometer_waveform_posterior()
function. Storing the injection waveform in the result can also be useful for a quick generation of the injected model, especially for cases where the waveform is not one of the GW approximants, but say a numerical-relativity waveform.I would be happy to make the change through a PR, depending what option the developers think is most suitable.