Skip to content

q-transform fails on data that used to work

Created by: areeda

This command: gwpy-plot qtransform --chan L1:GDS-CALIB_STRAIN,reduced --gps 1214870388.0000 --outdir ${HOME}/t --plot 1.00 4.00 16.00 --sample-freq 2048 --frange 0 inf --imin 0.0 --imax 25.5 --search 64 --qrange 4.0 64.0 --cmap viridis Works with 0.10.1 release but fails with current development branch. Here's a code snippet to demo the problem:


ts2 = TimeSeries.fetch('L1:GDS-CALIB_STRAIN,reduced',1214870388,1214870448)

tmin = ts2.min().value
tmax = ts2.max().value
tdelta = (ts2.max() - ts2.min()).value
asd = ts2.asd().value
amin = asd.min()
print ('TimeSeries min: {:g}, max: {:g}, delta {:g}, asd min {:g}'.format(
   tmin, tmax, tdelta, amin))

if amin == 0:
   print 'asd min is really zero'

q = ts2.q_transform()

The error message produced is:

  invasd = 1. / asd
/usr/share/tomcat/.local/lib/python2.7/site-packages/gwpy/timeseries/timeseries.py:1511: RuntimeWarning: invalid value encountered in multiply
  out.value[x:y] += npfft.irfft(in_.fft().value * invasd)
/usr/share/tomcat/.local/lib/python2.7/site-packages/numpy/lib/function_base.py:4033: RuntimeWarning: Invalid value encountered in median
  r = func(a, **kwargs)
/usr/share/tomcat/.local/lib/python2.7/site-packages/numpy/core/_methods.py:26: RuntimeWarning: invalid value encountered in reduce
  return umr_maximum(a, axis, None, out, keepdims)
---------------------------------------------------------------------------
UnboundLocalError                         Traceback (most recent call last)
<ipython-input-10-5bb307ef33cc> in <module>()
----> 1 q = ts2.q_transform()

/usr/share/tomcat/.local/lib/python2.7/site-packages/gwpy/timeseries/timeseries.pyc in q_transform(self, qrange, frange, gps, search, tres, fres, norm, outseg, whiten, **asd_kw)
   1726         # (Q, frequency) `TimeSeries` to have the same time resolution
   1727         nx = int(abs(Segment(*outseg)) / tres)
-> 1728         ny = frequencies.size
   1729         out = Spectrogram(numpy.zeros((nx, ny)), x0=outseg[0], dx=tres,
   1730                           frequencies=frequencies)

UnboundLocalError: local variable 'frequencies' referenced before assignment

This is a collection of plots to help understand the data: https://ldvw.ligo.caltech.edu/ldvw/view?act=imagehistory&strt=0&pageNum=1&usrSel=Joseph+Areeda+%283357%29&group=Zero+ASD&size=original&op_group=Favorites&newGrpName=%3Cnew+group+name%3E