Detector
I added bits of functionality to the Interferometer
class so that it interfaces with the PowerSpectralDensity
object.
The Interferometer
has new attributes:
-
power_spectral_density
: an instance of thePowerSpectralDensity
class -
power_spectral_density_array
: an array of values of the PSD for a user-specified frequency array -
amplitude_spectral_density_array
: as above for the ASD -
data
: as above but h(f) -
whitened_data
:data/amplitude_spectral_density_array
This is what goes into the likelihood
and methods:
-
set_spectral_densities(frequency)
: setpower_spectral_density_array
andamplitude_spectral_density_array
using the provided frequency array -
set_data(frequency_domain_strain)
: setdata
given an array with frequency domain strain
While doing this I updated a bunch of other bits of code to be consistent with the new detector setup.
- I moved some of the code from the
Interferometer
class intoutils.py
so that the methods are shorter and I think the code will have more general use. - I changed how the
PowerSpectralDensity
is initialised, you now pass it either an ASD or PSD file and it sets itself up. - This changed the specific interferometers we have at the bottom of the file.
- I added a new likelihood function that interacts with the new setup of the detector.
- The new likelihood is just a method, rather than a class.
- The new likelihood has a few significant changes, @rory-smith can you check these make sense:
- I changed an overall sign in the logL.
- I changed an
np.sum
tosum
, the old version was treating the model as a number rather than a frequency series.
-
@gregory.ashton I updated the
SimpleSinusoidSource
to follow the convention I described earlier.
Finally, I added a script that goes through:
- initialising a set of interferometers.
- generating noise.
- injecting a signal.
- calculating the likelihood.
This has wound up being quite a bit more extensive than I anticipated, so I'm not going to just push or merge the changes. Does someone want to look over this and give me a thumbs up/down.