Did I find the right examples for you? yes no      Crawl my project      Python Jobs

# cogent.maths.period.hybrid

All Samples(24)  |  Call(18)  |  Derive(0)  |  Import(6)

from numpy import arange, convolve, random, sin, pi, exp, array, zeros, float64
from cogent.util.unit_test import TestCase, main

from cogent.maths.period import ipdft, dft, auto_corr, hybrid, goertzel

def test_hybrid(self):
"""correctly compute hybrid statistic"""
hybrid_x, hybrid_periods = hybrid(self.sig, llim=None, ulim=50)
hybrid_x = abs(hybrid_x)
max_idx = list(hybrid_x).index(max(hybrid_x))
def test_hybrid_returns_all(self):
"""correctly returns hybrid, ipdft and autocorr statistics"""
ipdft_pwr, ipdft_prd = ipdft(self.sig, llim=2, ulim=50)
auto_x, auto_periods = auto_corr(self.sig, llim=2, ulim=50)
hybrid_x, hybrid_periods = hybrid(self.sig, llim=None, ulim=50)
hybrid_ipdft_autocorr_stats, hybrid_periods = hybrid(self.sig,
ipdft_pwr, ipdft_prd = ipdft(self.sig, llim=10, ulim=10)
auto_x, auto_periods = auto_corr(self.sig, llim=10, ulim=10)
hybrid_x, hybrid_periods = hybrid(self.sig, llim=10, ulim=10)
hybrid_ipdft_autocorr_stats, hybrid_periods = hybrid(self.sig,
llim=10, ulim=10, return_all=True)

from numpy import arange, convolve, random, sin, pi, exp, array, zeros, float64
from cogent.util.unit_test import TestCase, main

from cogent.maths.period import ipdft, dft, auto_corr, hybrid, goertzel

def test_hybrid(self):
"""correctly compute hybrid statistic"""
hybrid_x, hybrid_periods = hybrid(self.sig, llim=None, ulim=50)
hybrid_x = abs(hybrid_x)
max_idx = list(hybrid_x).index(max(hybrid_x))
def test_hybrid_returns_all(self):
"""correctly returns hybrid, ipdft and autocorr statistics"""
ipdft_pwr, ipdft_prd = ipdft(self.sig, llim=2, ulim=50)
auto_x, auto_periods = auto_corr(self.sig, llim=2, ulim=50)
hybrid_x, hybrid_periods = hybrid(self.sig, llim=None, ulim=50)
hybrid_ipdft_autocorr_stats, hybrid_periods = hybrid(self.sig,
ipdft_pwr, ipdft_prd = ipdft(self.sig, llim=10, ulim=10)
auto_x, auto_periods = auto_corr(self.sig, llim=10, ulim=10)
hybrid_x, hybrid_periods = hybrid(self.sig, llim=10, ulim=10)
hybrid_ipdft_autocorr_stats, hybrid_periods = hybrid(self.sig,
llim=10, ulim=10, return_all=True)

circular_indices, _seq_to_symbols, seq_to_symbols, blockwise_bootstrap, \
SeqToSymbols
from cogent.maths.period import ipdft, hybrid, auto_corr, Hybrid, Ipdft, \
AutoCorrelation