diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 16d0daf6b3c09b609fc5658877c3387ca163b493..8a0924bcfe60db07ff4a9122962e801fbe526c91 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ tests: - pip3 install --no-deps . - python3 -c "from tffpy.utils import generate_config; generate_config()" - pwd - - python3 -c "from configparser import ConfigParser; from pathlib import Path; config.read('/root/.config/tffpy.conf'); config.set('DATA', 'data_path', '/builds/skmad-suite/tff2020/data'); config.write(open('/root/.config/tffpy.conf', 'w'))" + - python3 -c "from configparser import ConfigParser; from pathlib import Path; config = ConfigParser(); config.read('/root/.config/tffpy.conf'); config.set('DATA', 'data_path', '/builds/skmad-suite/tff2020/data'); config.write(open('/root/.config/tffpy.conf', 'w'))" - pytest-3 # generate the documentation @@ -25,7 +25,7 @@ pages: - pip3 install --no-deps . - python3 setup.py build_sphinx - python3 -c "from tffpy.utils import generate_config; generate_config()" - - python3 -c "from configparser import ConfigParser; from pathlib import Path; config.read('/root/.config/tffpy.conf'); config.set('DATA', 'data_path', '/builds/skmad-suite/tff2020/data'); config.write(open('/root/.config/tffpy.conf', 'w'))" + - python3 -c "from configparser import ConfigParser; from pathlib import Path; config = ConfigParser(); config.read('/root/.config/tffpy.conf'); config.set('DATA', 'data_path', '/builds/skmad-suite/tff2020/data'); config.write(open('/root/.config/tffpy.conf', 'w'))" - cp -r build/sphinx/html public artifacts: paths: diff --git a/python/doc/conf.py b/python/doc/conf.py index 1ec78b6e3c39fec307174d87c9d0b12eff0ac77b..a6066609518b00a765b81d49d3dd587e98b9508d 100755 --- a/python/doc/conf.py +++ b/python/doc/conf.py @@ -274,6 +274,7 @@ intersphinx_mapping = { 'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None), 'skpomade': ('http://valentin.emiya.pages.lis-lab.fr/skpomade/', None), 'yafe': ('http://skmad-suite.pages.lis-lab.fr/yafe/', None), + 'ltfatpy': ('http://dev.pages.lis-lab.fr/ltfatpy/', None), } # Allow errors in notebook diff --git a/python/tffpy/tf_tools.py b/python/tffpy/tf_tools.py index a3dd2d548d243684e84d71e81440c18f9206530f..c7f71e2e51d3414a8dbeb449ef0ee03706a15a03 100755 --- a/python/tffpy/tf_tools.py +++ b/python/tffpy/tf_tools.py @@ -18,24 +18,35 @@ def get_dgt_params(win_type, approx_win_len, hop, n_bins, """ Build dictionary of DGT parameter + The output dictionary `dgt_params` is composed of: + + * dgt_params['win'] : the window array (nd-array) + * dgt_params['hop'] : the hop size (int) + * dgt_params['n_bins'] : the number of frequency bins (int) + * dgt_params['input_win_len'] : the effective window length (input window + length rounded to the nearest power of two). + * dgt_params['phase_conv'] : the phase convention 'freqinv' or 'timeinv', + see `pt` argument in :py:func:`ltfatpy.gabor.dgtreal` + Parameters ---------- win_type : str - Window name, e.g. 'hann', 'gauss' + Window name, e.g. 'hann', 'gauss' (see :py:func:`ltfatpy.arg_firwin`) approx_win_len : int - Approximate window length for FIR windows and + Approximate window length hop : int Hop size n_bins : int Number of frequency bins - phase_conv : + phase_conv : 'freqinv' or 'timeinv' Phase convention sig_len : int Signal length Returns ------- - + dict + DGT parameters (see above) """ supported_wins = arg_firwin() | {'gauss'} msg = '{} not supported, try {}'.format(win_type, supported_wins)