From 6b4b7b7e4e37f1c5cc8b446997d1961e37f60c13 Mon Sep 17 00:00:00 2001 From: earthgecko Date: Sun, 7 Jan 2018 12:49:50 +0000 Subject: [PATCH] Passed max_shift_seconds to milliseconds As per https://github.com/linkedin/luminol/issues/38 --- .../algorithms/correlator_algorithms/cross_correlator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/luminol/algorithms/correlator_algorithms/cross_correlator.py b/src/luminol/algorithms/correlator_algorithms/cross_correlator.py index 0bbbb00..21c9724 100644 --- a/src/luminol/algorithms/correlator_algorithms/cross_correlator.py +++ b/src/luminol/algorithms/correlator_algorithms/cross_correlator.py @@ -26,13 +26,13 @@ def __init__(self, time_series_a, time_series_b, max_shift_seconds=None, shift_i Initializer :param TimeSeries time_series_a: TimeSeries a. :param TimeSeries time_series_b: TimeSeries b. - :param int max_shift_milliseconds: allowed maximal shift seconds. + :param int max_shift_seconds: allowed maximal shift seconds. :param time_period: if given, correlate the data inside the time period only. """ super(CrossCorrelator, self).__init__(self.__class__.__name__, time_series_a, time_series_b) self.shift_impact = shift_impact or DEFAULT_SHIFT_IMPACT if max_shift_seconds is not None: - self.max_shift_milliseconds = max_shift_seconds + self.max_shift_milliseconds = max_shift_seconds * 1000 else: self.max_shift_milliseconds = DEFAULT_ALLOWED_SHIFT_SECONDS * 1000