ENH: Add triangular interferometer#333
Conversation
|
Hi, This PR addresses a limitation in Background Currently, Proposed fix The cleanest solution is to decouple the two concepts:
This PR updates Next steps If this approach looks good, we should audit all places in the codebase where Happy to discuss further. Best, |
|
Hi @filippo-santoliquido, I think this is a good change and makes sense. Currently, I am not approving due to the "Next steps" which I agree with. Is there anywhere else in the code that this should be updated? |
|
Hi @nihargupte-ph, thanks a lot for your reply. I searched for ifo should instead iterate over ifo_names. I also think the usage of ["train_settings"]["data"]["detectors"] should be carefully reviewed and fixed wherever necessary.
|
Sorry for the delay I missed this in my inbox.. Gotcha, I agree with your statement. I think in any case where ifo_names is called one should not iterate over the |
|
The line here: https://github.com/filippo-santoliquido/dingo-ET/blob/feature/add-triangular-interferometer/dingo/gw/inference/gw_samplers.py#L319 should be (e.g., ( |
|
This line here is also currently failing: https://github.com/filippo-santoliquido/dingo-ET/blob/feature/add-triangular-interferometer/dingo/pipe/main.py#L179 The problem is a naming mismatch: bilby expands A potential fix is to read one arm's ASD as the representative but keep the psd_dict key as 'ET', e.g.: for ifo_name in args.detectors:
if ifo_name in asd_dataset.asds:
asd_key = ifo_name # normal detector, e.g. 'H1'
else:
asd_key = [ifo.name for ifo in InterferometerList([ifo_name])][0] # 'ET'-> 'ET1'
psd_path = asd_dataset.save_psd(args.outdir, asd_key, rng=rng)
psd_dict[ifo_name] = str(psd_path) # keyed by 'ET'One thing to confirm: this saves a single PSD, assuming it is the same across the three arms. That is consistent with how ET is currently defined in bilby (all three arms use the same PSD), so I think it's probably fine, do you think this makes sense @filippo-santoliquido? If we want independent per-arm PSDs it won't be enough however (though that likely needs a fix in bilby/bilby_pipe as well to understand ET1/ET2/ET3 as separate detectors). |
|
Thank you @filippo-santoliquido! I have tried running a quick end-to-end test for an injection based on #386 (changing |
|
Hi @lorenzopompili00! Thanks a lot for your work! I believe that in the future we'll need to implement ET with different PSDs for each detector, to make our simulations as close to reality as possible. In any case, we'll need to fix bilby first, as you said, and this fix will then be automatically inherited by dingo. |
|
Dear @lorenzopompili00 ! Thanks a lot again for your thorough review. I should have implemented all your comments. |
Hi,
I am opening this pull request to enable Dingo to work automatically with a triangular interferometer configuration, such as the Einstein Telescope (ET).
I am aware that the current implementation is not particularly elegant. In its present form, creating a new interferometer object in Bilby also requires modifying the sections of code shown below, which is not ideal. The main issue is that Dingo currently expects
data_settings["detectors"]to contain the full list of interferometers, and this list is directly passed toInterferometerList. However, doing so results in an error from Bilby, since the interferometer'ET-1'does not exist.This happens because when
InterferometerListis called with a triangular configuration (i.e., just'ET'), it automatically generates all the individual interferometers defined indata_settings["detectors"].I would appreciate any suggestions for a cleaner or more flexible solution.
Thanks a lot in advance,
Kind regards,
Filippo