def inner(self, source, target): (left, right, delay) = super().inner(source, target) for (i, _) in target.range(self.window): r = target.readings.ix[i] if nd.complete(r): dly = round(r.travel.mean()) j = i.shift(dly) l = source.readings.ix[j] if nd.complete(l): delay.append(dly) for (x, y) in zip((left, right), (l, r)): x.append(y.speed.mean()) return (left, right, delay)
def inner_(self, source, target): (left, right, delay) = super().inner(source, target) for i in target.readings.index: rng = pd.date_range(i, periods=self.window.observation, freq=target.freq) r = target.readings.loc[rng] if nd.complete(r): dly = round(r.travel.mean()) l = source.readings.loc[rng.shift(dly)] if nd.complete(l): delay.append(dly) for (x, y) in zip((left, right), (l, r)): x.append(y.speed.mean()) return (left, right, delay)