error in intervals.union_overlapping

Bug #1079885 reported by Charles G Waldman on 2012-11-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Committed

Bug Description

The function "union_overlapping" in only works if the list of intervals is passed in in sorted order.
However, the ceres backend keeps the slice info in reverse sorted order: slice_info.sort(reverse=True)

which causes errors accessing Ceres data - measure_of_added_coverage in returns erroneous results, because it operates on IntervalSets which are invalid.

the attached patch makes the code more robust: it will work regardless of whether the list of intervals is sorted in forward or reverse direction, it is also more readable since it uses the 'overlaps' and 'union' methods of class Interval, rather than comparing start and end times (which is order-dependent)

Charles G Waldman (cgw) wrote :
Michael Leinartas (mleinartas) wrote :

Thanks, this is a great catch. I've merged this in master:

One question - I'm curious, what branch are you running for carbon to work with Ceres?

Changed in graphite:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers