Better handling of same GPS start and time error
When the same GPS time is given for start and end by mistake, the code output:
2019-01-23 12:05:11,403 | test-batch : INFO : training with 1 bin within [1134604817.000, 1134604817.000)
2019-01-23 12:05:11,403 | test-batch : WARNING : You are training and evaluating with a single bin. Be careful! This can produce artificially inflated performance estimates.
And go on until exiting with the following error:
2019-01-23 12:05:17,930 | test-batch : ERROR : Traceback (most recent call last):
File "/home/leila.haegel/idq/iDQ/install/bin/idq-batch", line 65, in <module>
batch.batch(gps_start, gps_end, config_path, **kwargs)
File "/home/leila.haegel/idq/iDQ/install/lib/python2.7/site-packages/idq/batch.py", line 232, in batch
skip_report=skip_report,
File "/home/leila.haegel/idq/iDQ/install/lib/python2.7/site-packages/idq/batch.py", line 98, in _batch
timeseries(start, end, elsepath, verbose=verbose, exclude=[])
File "/home/leila.haegel/idq/iDQ/install/lib/python2.7/site-packages/idq/batch.py", line 1404, in timeseries
series = classifier.timeseries(quiver_factory, dt=dt)
File "/home/leila.haegel/idq/iDQ/install/lib/python2.7/site-packages/idq/classifiers/ovl.py", line 451, in timeseries
return [(self.model.metric2rank(v, **self.kwargs), t[0], t[1]-t[0]) for v, t in ans]
IndexError: index 0 is out of bounds for axis 0 with size 0
We could put an safeguard by checking that if end_time == start_time, then the code asks you to put different GPS times and does not follow on.