getMidpointFromTimespan¶
- lsst.ap.association.getMidpointFromTimespan(timespan, allowUnbounded=True)¶
- Safely retrieve the midpoint in TAI from a Timespan. - Parameters:
- timespanlsst.daf.butler.Timespanofastropy.time.Time
- A Timespan centered on the midpoint of a visit. 
- allowUnboundedbool, optional
- If set, return the start or end of an unbounded timespan. 
 
- timespan
- Returns:
- midpointastropy.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.