diff --git a/corrscope/triggers.py b/corrscope/triggers.py index 8c16b12..8171088 100644 --- a/corrscope/triggers.py +++ b/corrscope/triggers.py @@ -625,33 +625,33 @@ class CorrelationTrigger(MainTrigger): edge_score *= -cfg.edge_strength peaks += edge_score - self.custom_line( - "corr_kernel", - corr_kernel, - np.arange(-self.A, self.B) * stride, - False, - ) - self.custom_line( - "peak_kernel", - self._corr_buffer, - np.arange(-self.A, self.B) * stride, - False, - ) + # self.custom_line( + # "corr_kernel", + # corr_kernel, + # np.arange(-self.A, self.B) * stride, + # False, + # ) + # self.custom_line( + # "peak_kernel", + # self._corr_buffer, + # np.arange(-self.A, self.B) * stride, + # False, + # ) - self.custom_line( - "corr", - corr, - np.arange(trigger_begin, trigger_begin + stride * len(corr), stride), - True, - False, - ) - self.custom_line( - "peaks", - peaks, - np.arange(trigger_begin, trigger_begin + stride * len(corr), stride), - True, - False, - ) + # self.custom_line( + # "corr", + # corr, + # np.arange(trigger_begin, trigger_begin + stride * len(corr), stride), + # True, + # False, + # ) + # self.custom_line( + # "peaks", + # peaks, + # np.arange(trigger_begin, trigger_begin + stride * len(corr), stride), + # True, + # False, + # ) # Don't pick peaks more than `period * trigger_radius_periods` away from the # center. @@ -690,17 +690,17 @@ class CorrelationTrigger(MainTrigger): corr[1:][peaks[1:] < peaks[:-1]] = min_corr corr[0] = corr[-1] = min_corr - self.custom_line( - "corr_peaks", - corr, - np.arange( - trigger_begin + stride * (begin_offset), - trigger_begin + stride * (begin_offset + len(corr)), - stride, - ), - True, - False, - ) + # self.custom_line( + # "corr_peaks", + # corr, + # np.arange( + # trigger_begin + stride * (begin_offset), + # trigger_begin + stride * (begin_offset + len(corr)), + # stride, + # ), + # True, + # False, + # ) # Find optimal offset peak_offset = np.argmax(corr) + begin_offset # type: int diff --git a/corrscope/utils/trigger_util.py b/corrscope/utils/trigger_util.py index 1d9797f..7cf60f0 100644 --- a/corrscope/utils/trigger_util.py +++ b/corrscope/utils/trigger_util.py @@ -107,9 +107,10 @@ def get_period( else: peakX = temp_peakX - # self.custom_line( - # "autocorr", corr, np.arange(len(corr)) * self._stride, False, False - # ) + self.custom_vline("minX", minX, False) + self.custom_line( + "autocorr", corr, np.arange(len(corr)) * self._stride, False, False + ) return int(peakX)