def test_size_of_trace_maximum(self): with warnings.catch_warnings(): warnings.simplefilter("ignore", category=UserWarning) dps = DynamicalPowerspectrum(self.lc, segment_size=3) max_pos = dps.trace_maximum() nsegs = int(self.lc.tseg / dps.segment_size) assert len(max_pos) == nsegs
def test_trace_maximum_with_boundaries(self): dps = DynamicalPowerspectrum(self.lc, segment_size=3) minfreq = 21 maxfreq = 24 max_pos = dps.trace_maximum(min_freq=minfreq, max_freq=maxfreq) assert np.max(dps.freq[max_pos]) <= maxfreq assert np.min(dps.freq[max_pos]) >= minfreq
def test_trace_maximum_without_boundaries(self): with warnings.catch_warnings(): warnings.simplefilter("ignore", category=UserWarning) dps = DynamicalPowerspectrum(self.lc, segment_size=3) max_pos = dps.trace_maximum() assert np.max(dps.freq[max_pos]) <= 1 / self.lc.dt assert np.min(dps.freq[max_pos]) >= 1 / dps.segment_size
def test_trace_maximum_with_boundaries(self): dps = DynamicalPowerspectrum(self.lc, segment_size=3) minfreq = 21 maxfreq = 24 max_pos = dps.trace_maximum(min_freq=minfreq, max_freq=maxfreq) assert np.max(dps.freq[max_pos]) <= maxfreq assert np.min(dps.freq[max_pos]) >= minfreq
def test_trace_maximum_with_boundaries(self): with warnings.catch_warnings(): warnings.simplefilter("ignore", category=UserWarning) dps = DynamicalPowerspectrum(self.lc, segment_size=3) minfreq = 21 maxfreq = 24 max_pos = dps.trace_maximum(min_freq=minfreq, max_freq=maxfreq) assert np.max(dps.freq[max_pos]) <= maxfreq assert np.min(dps.freq[max_pos]) >= minfreq
def test_size_of_trace_maximum(self): dps = DynamicalPowerspectrum(self.lc, segment_size=3) max_pos = dps.trace_maximum() nsegs = int(self.lc.tseg / dps.segment_size) assert len(max_pos) == nsegs
def test_trace_maximum_without_boundaries(self): dps = DynamicalPowerspectrum(self.lc, segment_size=3) max_pos = dps.trace_maximum() assert np.max(dps.freq[max_pos]) <= 1 / self.lc.dt assert np.min(dps.freq[max_pos]) >= 1 / dps.segment_size
def test_size_of_trace_maximum(self): dps = DynamicalPowerspectrum(self.lc, segment_size=3) max_pos = dps.trace_maximum() nsegs = int(self.lc.tseg / dps.segment_size) assert len(max_pos) == nsegs
def test_trace_maximum_without_boundaries(self): dps = DynamicalPowerspectrum(self.lc, segment_size=3) max_pos = dps.trace_maximum() assert np.max(dps.freq[max_pos]) <= 1 / self.lc.dt assert np.min(dps.freq[max_pos]) >= 1 / dps.segment_size