Commit 4b68ab6d authored by Marina Kreme's avatar Marina Kreme
Browse files

fix path

parents 8dbf8c09 69098d9c
Pipeline #5920 passed with stages
in 11 minutes and 45 seconds
# run the test suite
tests:
image: registry.gitlab.lis-lab.fr:5005/skmad-suite/madarrays/ubuntu:18.04
tags:
- docker
script:
- cd python
- pip3 install --no-deps ltfatpy madarrays yafe skpomade pandas xarray
- pip3 install 'scipy==1.4.1' -U
- pip3 install 'matplotlib==3.1.2' -U
- pip3 install --no-deps .
- python3 tffpy/tests/ci_config.py
- pytest-3
# generate the documentation
pages:
image: registry.gitlab.lis-lab.fr:5005/skmad-suite/madarrays/ubuntu:18.04
tags:
- docker
only:
- master
script:
- cd python
- pip3 install --no-deps ltfatpy madarrays yafe skpomade pandas xarray
- pip3 install 'scipy==1.4.1' -U
- pip3 install 'matplotlib==3.1.2' -U
- pip3 install --no-deps .
- python3 tffpy/tests/ci_config.py
- python3 setup.py build_sphinx
- cp -r build/sphinx/html ../public
artifacts:
paths:
- public
# TFF2020 - Time-Frequency Fading
Code and data to reproduce experiments from paper
*Time-frequency fading algorithms based on Gabor multipliers*
by A. Marina Krémé, Valentin Emiya, Caroline Chaux and Bruno Torré́sani, 2020.
The sound material is available in folder 'data'.
The code is available in folders 'matlab' and 'python'. The main experiments are available in both programming languages:
* Figure 1 can be reproduced in Matlab by running file `run_illustration_cuicui_eigenvalues.m`
* Figure 2 can be reproduced in Matlab by running file `exp_eigenval_win.m`.
* Figure 3 can be reproduced in Matlab by running file `rank_estimation_halko_vs_eigs_gausswin.m`.
* Figure 4 can be reproduced in Python by running the specific tasks 12 and 13 from `tffpy.scripts.script_exp_solve_tff.py`.
* Figure 5 can be reproduced in Python by running the specific tasks 12 and 13 from `tffpy.scripts.script_exp_solve_tff.py`.
* Figure 6 can be reproduced in Python by running the full experiment from `tffpy.scripts.script_exp_solve_tff.py`.
* Table I can be reproduced in Python by running the full experiment from `tffpy.scripts.script_exp_solve_tff.py`.
* Table II can be reproduced in Python by running the full experiment from `tffpy.scripts.script_exp_solve_tff.py`.
This diff is collapsed.
include *.txt
include *.rst
include VERSION
recursive-include doc *.rst *.py *.ipynb
include tffpy/tests/*.py
prune doc/build
# Python code for time-frequency fading
tffpy
=====
A Python package for time-frequency fading using Gabor multipliers based on
the work in paper *Time-frequency fading algorithms based on Gabor
multipliers* by A. Marina Krémé, Valentin Emiya, Caroline
Chaux and Bruno Torré́sani, 2020.
Install
-------
Install the current release with ``pip``::
pip install tffpy
Download the data from `this link <https://gitlab.lis-lab.fr/skmad-suite/tff2020/-/archive/master/tff2020-master.zip?path=data>`_.
Then run function `tffpy.utils.generate_config` in order to create
a configuration file and modify it to specify the path to your data folder.
The location of the configuration file is given by function
`tffpy.utils.get_config_file`.
For additional details, see doc/install.rst.
Usage
-----
See the `documentation <http://skmad-suite.pages.lis-lab.fr/tff2020/>`_.
Bugs
----
Please report any bugs that you find through the `tffpy GitLab project
<https://gitlab.lis-lab.fr/skmad-suite/tff2020/issues>`_.
You can also fork the repository and create a merge request.
Source code
-----------
The source code of tffpy is available via its `GitLab project
<https://gitlab.lis-lab.fr/skmad-suite/tff2020>`_.
You can clone the git repository of the project using the command::
git clone git@gitlab.lis-lab.fr:skmad-suite/tff2020.git
Copyright © 2020
----------------
* `Laboratoire d'Informatique et Systèmes <http://www.lis-lab.fr/>`_
* `Université d'Aix-Marseille <http://www.univ-amu.fr/>`_
* `Centre National de la Recherche Scientifique <http://www.cnrs.fr/>`_
* `Université de Toulon <http://www.univ-tln.fr/>`_
Contributors
------------
* `Valentin Emiya <mailto:valentin.emiya@lis-lab.fr>`_
* `Ama Marina Krémé <mailto:ama-marina.kreme@lis-lab.fr>`_
License
-------
Released under the GNU General Public License version 3 or later
(see `LICENSE.txt`).
tffpy:0.1.3
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -m sphinx
PAPER =
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest epub
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " pickle to make pickle files"
@echo " epub to make an epub"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " gitwash to update the gitwash documentation"
clean:
-rm -rf build/*
-rm -rf ghpages_build
-rm -rf auto_examples modules
-rm -rf reference/generated reference/algorithms/generated reference/classes/generated reference/readwrite/generated
dist: html
test -d build/latex || make latex
make -C build/latex all-pdf
-rm -rf build/dist
(cd build/html; cp -r . ../../build/dist)
(cd build/dist && tar czf ../dist.tar.gz .)
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
@echo
@echo "Build finished. The HTML pages are in build/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) build/dirhtml
@echo
@echo "Build finished. The HTML pages are in build/dirhtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in build/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in build/qthelp, like this:"
@echo "# qcollectiongenerator build/qthelp/test.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile build/qthelp/test.qhc"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) build/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
@echo
@echo "Build finished; the LaTeX files are in build/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
@echo
@echo "The overview file is in build/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in build/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) build/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in build/doctest/output.txt."
latexpdf: latex
@echo "Running LaTeX files through latexmk..."
$(MAKE) -C build/latex all-pdf
@echo "latexmk finished; the PDF files are in build/latex."
docs: clean html latexpdf
cp build/latex/networkx_reference.pdf build/html/_downloads/.
gitwash-update:
python ../tools/gitwash_dumper.py developer networkx \
--project-url=http://networkx.github.io \
--project-ml-url=http://groups.google.com/group/networkx-discuss/ \
--gitwash-url git@github.com:matthew-brett/gitwash.git
If you only want to get the documentation, note that a pre-built
version for the latest release is available
[online](http://skmad-suite.pages.lis-lab.fr/tff2020/).
Sphinx is used to generate the API and reference documentation.
## Instructions to build the documentation
In addition to installing ``tffpy`` and its dependencies, install the
Python packages needed to build the documentation by entering
```
pip install -r ../requirements/doc.txt
```
in the ``doc/`` directory.
To build the HTML documentation, run:
```
make html
```
in the ``doc/`` directory. This will generate a ``build/html`` subdirectory
containing the built documentation.
To build the PDF documentation, run:
```
make latexpdf
```
You will need to have Latex installed for this.
%% Cell type:markdown id: tags:
# Demo for `tffpy.interpolation_solver`
A simple demonstration of the baseline interpolation solver
%% Cell type:code id: tags:
``` python
%load_ext autoreload
%autoreload 2
%matplotlib inline
```
%% Cell type:code id: tags:
``` python
%%javascript
IPython.OutputArea.prototype._should_scroll = function(lines) {
return false;
}
```
%% Cell type:code id: tags:
``` python
import numpy as np
import matplotlib as mpl
mpl.rcParams['figure.figsize'] = [15.0, 7.0]
from tffpy.datasets import get_mix
from tffpy.interpolation_solver import solve_by_interpolation
```
%% Cell type:code id: tags:
``` python
win_type = 'gauss'
win_dur = 256 / 8000
hop_ratio = 1 / 4
n_bins_ratio = 4
delta_mix_db = 0
delta_loc_db = 30
n_iter_closing = n_iter_opening = 3
wb_to_loc_ratio_db = 8
closing_first = True
or_mask = True
fig_dir = 'fig_interpolation'
x_mix, dgt_params, signal_params, mask, x_bird, x_engine = \
get_mix(loc_source='bird', wideband_src='car',
wb_to_loc_ratio_db=wb_to_loc_ratio_db,
win_dur=win_dur, win_type=win_type,
hop_ratio=hop_ratio, n_bins_ratio=n_bins_ratio,
n_iter_closing=n_iter_closing,
n_iter_opening=n_iter_opening,
closing_first=closing_first,
delta_mix_db=delta_mix_db, delta_loc_db=delta_loc_db,
or_mask=or_mask, fig_dir=fig_dir)
```
%% Cell type:code id: tags:
``` python
x_est = solve_by_interpolation(x_mix, mask, dgt_params, signal_params,
fig_dir)
```
%% Cell type:markdown id: tags:
# Demo for `tffpy.create_subregions.create_subregions`
A simple demonstration for creating sub-regions from a boolean time-frequency mask
%% Cell type:code id: tags:
``` python
%load_ext autoreload
%autoreload 2
%matplotlib inline
```
%% Cell type:code id: tags:
``` python
%%javascript
IPython.OutputArea.prototype._should_scroll = function(lines) {