Draft: Stokes parameters
Features introduced (all changes are in BayesWavePost):
- Calculate reconstructed median and CI of Stokes parameters (as a function of frequency) if
--noPolarization
flag is used. - Calculate injected Stokes parameters (as a function of frequency) if
--noPolarization
flag is used and there is anH1_FD_geocenter_pols.dat
file in the rundir (or whatever the first ifo is). This is created by the BayesWave run if the--dump-geocenter-pols
is used (might only work for FD waveforms, I'm not totally sure). - Print reconstructed plus and cross waveforms to file. This is also done in elliptical polarization mode, but then the geocenter (whatever that may mean nowadays) is printed in the plus file and the cross file is left blank.
I marked this as draft, because although we tested it with @katerina.chatziioannou last year, I haven't tested the final version with all the if loops to only do things when we have the --noPolarization
flag. I also haven't tested this on an elliptical polarization run to see if it breaks anything. But before doing so, I have a few questions to make sure I do it as we want to do it:
- I renamed
hgeo
tohpol
everywhere since I don't believe it is the geocenter waveform anymore even in elliptical mode. Is this okay? If not I can revert back tohgeo
. - I changed the function
median_and_CIs_fourierdom
so that it prints imag and real parts instead of magnitudes. I think this should be fine because it looks like it wasn't used anywhere in BayesWavePost, but wanted to ask explicitly if anyone might be relying on its current form? - This is not something I introduced, but I think there might be an issue in how the injected plus and cross are printed to file (https://git.ligo.org/bence.becsy/bayeswave/-/blob/4ed0e3f98fc87ffac0de15e5bd6a27bc8ad7131d/src/BayesWavePost.c#L753). I'm a bit confused, because it's within a loop over the ifos. Why is that? Shouldn't there only be one injected cross and plus polarization?
- This is probably a minor thing, but I didn't put the variable assignment for the stokes parameters within an if loop, so they will be created regardless of the state of the
--noPolarization
flag. Is that fine, or do we want to put those in an if loop too?
Let me know what you think about these questions, and if you have any other suggestions. Also let me know if you have any thoughts on what tests we would want before merging this.