Open dr-rodriguez opened 6 years ago
SubInterval samples are intended to be separate (have holes between them). In our other code (java) we simply merge overlapping SubIntervals while adding them to the list. As an aside, the same could be said for MultiPolygon: there is an implicit assumption that all samples that can be merged (union) into a single "loop" have been and the remaining samples are really disjoint. It probably is not checked/enforced.
Since we started out having a single standard library that computed Interval(s) and MultiPolygon(s), these validation checks grew out of what were essentially bug-detection checks in that code... some checks are more diligent than others.
I've run into an error when building a CAOM observation in caom2=2.3.5. For an observation with two filters, I create a Plane.energy.bounds object as an Interval with max/min energy wavelengths and samples for each individual filter. However, because the filter coverage overlaps, I get an error:
In this case, one filter is entirely within another so perhaps the error is valid, but this makes it sound like any overlapping filters will give an error and this can be quite common. Or are SubInterval samples meant to be used in a different way?