PowerSpectralDensity class cleanup
Currently there are a few minor issues with the code in PowerSpectralDensity:
frequency_noise_realization
is not doing anything -> The intended functionality lives in get_noise_realisation
(I think).
interpolated_frequency
is not doing anything either and I am not sure what this is supposed to be doing.
amplitude_spectral_density
and power_spectral_density
are related by a power of 2. We can implement this as a @property
to avoid redundant logic in import_amplitude_spectral_density
and import_power_spectral_density
.
import_amplitude_spectral_density
and import_power_spectral_density
contain a lot of similar logic that should probably go in a separate static helper method.
interpolate_power_spectral_density
could reasonably be implemented as an @property
or power_spectral_density_interpolated
-> I would check beforehand how often this is called and what performance impact it has.
Maybe it is reasonable to move PowerSpectralDensity
into a separate module, but I can see why it would be closely tied together with Interferometer
.