Skip to content
Snippets Groups Projects
Commit 00263d69 authored by Patrick Godwin's avatar Patrick Godwin
Browse files

gstlal_fake_frames: add fix for off by one sample in psd data when recoloring psd

parent 738be819
No related branches found
No related tags found
No related merge requests found
Pipeline #87599 passed with warnings
......@@ -295,6 +295,9 @@ if options.color_psd:
# Truncate to requested output sample rate, if it is higher than the psd provides an assert will fail later
rpsd_data = numpy.array(rpsd.data.data[:max_sample])
if len(rpsd_data) < max_sample: # FIXME this is off by one sample, but shouldn't be.
rpsd_data = numpy.append(rpsd_data, numpy.zeros(max_sample - len(rpsd_data)))
rpsd = lal.CreateCOMPLEX16FrequencySeries(name = rpsd.name, epoch = rpsd.epoch, f0 = rpsd.f0, deltaF = rpsd.deltaF, length = max_sample, sampleUnits = rpsd.sampleUnits)
rpsd.data.data = rpsd_data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment