ValueError raised by numpy.max in cli.spectrogram
This LDVW URL request reports an error from the gwpy-plot
CLI process:
Traceback (most recent call last):
File "/usr/local/ldvw/bin/gwpy-plot", line 118, in
result_code = prod.makePlot(args)
File "/usr/lib/python2.6/site-packages/gwpy/cli/cliproduct.py", line 778, in makePlot
self.gen_plot(args)
File "/usr/lib/python2.6/site-packages/gwpy/cli/spectrogram.py", line 87, in gen_plot
stride = max(2*secpfft, stride)
File "/usr/lib64/python2.6/site-packages/numpy/core/fromnumeric.py", line 2135, in amax
out=out, keepdims=keepdims)
File "/usr/lib64/python2.6/site-packages/numpy/core/_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: 'axis' entry is out of bounds
The original command-line is reported as
gwpy-plot spectrogram --chan 'L1:OAF-CAL_DARM_DQ' --start 1109982616 --duration 600 --out '/usr/local/tomcat_base/temp/ldvw8406441437680960249.png' --secpfft '0.500' --overlap '0.900' --fmin 40 --fmax 4000 --imin '0.500' --imax '10.000' --norm
The error comes from misuse of numpy.max
(and probably also numpy.min
). I am preparing a fix which will be submitted via PR.