lair.transects.lag_positions#

lair.transects.lag_positions(time, xy, lag_s, max_gap_s=600.0)[source]#

Positions where the air of each sample was actually taken in.

A sample logged at time t is air that entered the inlet lag_s seconds earlier, so it belongs at the platform’s position at t - lag. Positions are interpolated linearly in time along xy ((n, 2), planar or lon/lat; time sorted). lag_s is a scalar or one value per sample (the lag differs by instrument epoch).

The record is cut into runs at gaps longer than max_gap_s, and t - lag is not allowed to reach back before the start of the sample’s own run: the first seconds of a run keep its first position instead of being interpolated across the gap to wherever the previous run ended.

Parameters:
Return type:

ndarray