gwpy-plot qtransform fails if more than 1 plot duration is specified
Created by: areeda
This seems to be an issue that produced a warning that has become an error with a current release of astropy.units. The error message produced is:
File "/Users/areeda/mambaforge/envs/igwn-py310/lib/python3.10/site-packages/gwpy/cli/qtransform.py", line 218, in get_spectrogram
if self.qxfrm_args.get("whiten"):
File "/Users/areeda/mambaforge/envs/igwn-py310/lib/python3.10/site-packages/astropy/units/quantity.py", line 1331, in __bool__
raise ValueError(
ValueError: FrequencySeries truthiness is ambiguous, especially for logarithmic units and temperatures. Use explicit comparisons.
This is a result of the qtransform code:
# use the precomputed ASD as the whitener if needed
if self.qxfrm_args.get("whiten"):
self.qxfrm_args["whiten"] = asd
That works for the first image where self.qxfrm_args["whiten"]
is True but fails on the secod where it containsasd
a FrequencySeries object.