Commit 401b25d8 authored by Andrew Quinn's avatar Andrew Quinn
Browse files

Move periodogram module to stft and tweak debugging print statements

parent d72b6a36
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -9,10 +9,7 @@ from .mvar_metrics import * # noqa: F401, F403
from .diags import *  # noqa: F401, F403
from .plotting import *  # noqa: F401, F403
from .circular_plots import *  # noqa: F401, F403
from .stats import *  # noqa: F401, F403
from .tutorial_utils import *  # noqa: F401, F403
from .simulate import *  # noqa: F401, F403
from .orthogonalise import *  # noqa: F401, F403
from .utils import *  # noqa: F401, F403
from .wavelet import *  # noqa: F401, F403
from .periodogram import *  # noqa: F401, F403
from . import stft, wavelet, orthogonalise, stats  # noqa: F401, F403
+1 −2
Original line number Diff line number Diff line
@@ -221,7 +221,6 @@ def compute_stft(x, nperseg=256, nstep=256, window=None, detrend_func=None,
    y = apply_delay_embedding(x, nperseg, nstep, detrend_func=detrend_func, window=window, padded=padded)

    # Run actual FFT
    print(scale)
    result, freqs = compute_fft(y, nfft=nfft, axis=axis, side=side, mode=mode,
                                scale=scale, fs=fs, fmin=fmin, fmax=fmax)

@@ -406,7 +405,7 @@ def _set_noverlap(noverlap, nperseg):

def _set_scaling(scaling, fs, win):
    """Set scaling to be applied to FFT output."""
    print('setting scaling {0} {1} {2}'.format(scaling, fs, win))
    print("setting scaling '{0}' {1}".format(scaling, fs))
    if scaling == 'density':
        scale = 1.0 / (fs * (win*win).sum())
    elif scaling == 'spectrum':