Open jeanconn opened 8 years ago
This is unrelated to ltt_bads
(renamed issue accordingly):
telem = fetch.Msid('AOATTER1', d.tstart + 50, d.tstart + 40)
telem.remove_intervals(events.dwells)
...
ValueError: Start time 558163104.332 must be less than stop time 558163094.332
I believe that it only works for dumps and TSC moves because there is no intersection of the event interval(s) with the fetch data interval.
The question is whether to issue an error or warning when a fetch query has effectively invalid inputs, or whether to allow invalid time intervals in remove intervals. Maybe a warning would be useful to discover potential errors in the calling code. In this particular case I would say there is a bug in the upstream code for not checking that the fetch interval is valid.
When you say "because there is no intersection", which do you mean?
Comment updated.
I'm still a little confused about the "fetch data interval". If I had a bad time range for fetch or I have removed intervals so I now have an empty set of times and values, is the "fetch data interval" useful? Also, should a "backwards" fetch range be able to intersect with a valid interval?
I get an error when trying to remove ltt bads from an empty (inverted range) contained within a day that has an entry in the ltt_bads file. This is obviously a special case, but isn't a problem for the other kadi event intervals.