gwpy / gwsumm

Gravitational-wave interferometer summary information system
GNU General Public License v3.0
12 stars 23 forks source link

The function 'combined_time_volume' encounters an exception when handling empty sequences. #388

Open iaraota opened 9 months ago

iaraota commented 9 months ago

Line 273 of /gwsumm/plot/range.py is encountering an exception:

  File "/home/detchar/.conda/envs/ligo-summary-3.10/lib/python3.10/site-packages/gwsumm/plot/range.py", line 273, in combined_time_volume
    min_x0 = min([r.x0.value for r in allranges])
ValueError: min() arg is an empty sequence

When the range data is not available. Moreover, I think line 279 (allranges[i] = r.pad((missing, 0))) may produce and IndexError exception.

To reproduce this error add #-read = False, which avoids fetching the data.