Tidy up of inject signal
- Changes the warning to an Error
- Adds method to InterferometerStrainData to check if a time is within the span
- Clean up logging of warning if the geocent_time is within the data span
- Print infomation about the injection to the terminal
Closes #115 (closed)
Closes #116 (closed)
Merge request reports
Activity
mentioned in issue #115 (closed)
@colm.talbot I'm sorry to keep throwing work at you today.
This fixes #115 (closed) and also just does some minor clean up stuff.
assigned to @gregory.ashton
For the record, the arguments against passing the waveform generator are:
- This breaks if you try to inject into multiple detectors using e.g.,
mass_1
andmass_ratio
for the injection parameters. It succeeds for the first interferometer but then these parameters aren't known for the next interferometers. - It may be the case that the signal you're injecting takes a huge amount of time to generate, in this case you only want to do it once.
I think we can do this in a slick way using an
InterferometerSet
, in that case you can generalise theinject_signal
method in a way which only requires a single waveform evaluation.- This breaks if you try to inject into multiple detectors using e.g.,
@colm.talbot Okay I've reverted to provide backward compatibility. While I appreciate the argument on grounds on it taking a long time to generate [1], but the first argument I don't understand. If we have buggy behaviour, we can surely fix it?
I tried to reproduce it by injecting with
mass_1
andmass_ratio
and got a ValueError thatmass_2
was None (this was when injected using thepolarization
directly) so I don't even think you can do that at the moment. When injecting with the normal parameters everything worked fine in both cases (at least it seemed to sample okay).I think the argument against having the polarization directly is that the user could pass in a polarization injected with one set of parameters, along with another (totally different) set of parameters (by accident). Then the results might look okay, but would be subtlety wrong and it might be difficult to track that error.
[1] I guess this is only a problem for things where your simulation is say a NR result, but your search is a phenom model?
mentioned in commit 86331d59
mentioned in merge request !85 (merged)