Skip to content
Snippets Groups Projects

minor fixes to waveform plot

Merged Colm Talbot requested to merge waveform-plot-fixes into master
+ 5
6
@@ -344,7 +344,9 @@ class CompactBinaryCoalescenceResult(CoreResult):
logger.debug("Downsampling frequency mask to {} values".format(
len(frequency_idxs))
)
plot_times = interferometer.time_array[time_idxs] - interferometer.strain_data.start_time
plot_times = interferometer.time_array[time_idxs]
if format == "html":
plot_times -= interferometer.strain_data.start_time
plot_frequencies = interferometer.frequency_array[frequency_idxs]
waveform_generator = WaveformGenerator(
@@ -377,7 +379,7 @@ class CompactBinaryCoalescenceResult(CoreResult):
ht_inj_det = infft(
hf_inj_det /
interferometer.amplitude_spectral_density_array,
self.sampling_frequency)[time_idxs],
self.sampling_frequency)[time_idxs]
if format == "html":
fig.add_trace(
go.Scatter(
@@ -415,10 +417,7 @@ class CompactBinaryCoalescenceResult(CoreResult):
1 / interferometer.strain_data.duration),
color='k', label='injected', linestyle='--')
axs[1].plot(
plot_times,
infft(hf_inj_det /
interferometer.amplitude_spectral_density_array,
self.sampling_frequency)[time_idxs],
plot_times, ht_inj_det,
color='k', linestyle='--')
logger.debug('Plotted injection.')
except IndexError:
Loading