getMidpointFromTimespan¶
- lsst.ap.association.getMidpointFromTimespan(timespan, allowUnbounded=True)¶
 Safely retrieve the midpoint in TAI from a Timespan.
- Parameters:
 - timespan
lsst.daf.butler.Timespanofastropy.time.Time A Timespan centered on the midpoint of a visit.
- allowUnbounded
bool, optional If set, return the start or end of an unbounded timespan.
- timespan
 - Returns:
 - midpoint
astropy.time.Time The midpoint of the timespan.
- midpoint
 - Raises:
 - ValueError
 Raised if either the start or end of the timespan is None, and
allowUnboundedis not set.- ValueError
 Raised if the timespan is empty.