Skip to content
Snippets Groups Projects
Commit 78bac599 authored by valentin.emiya's avatar valentin.emiya
Browse files

update CI

parent 875f21e1
Branches
No related tags found
No related merge requests found
Pipeline #5107 failed
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
# Tutorial for package `tffpy.interpolation_solver` # Demo for `tffpy.interpolation_solver`
A simple demonstration of the baseline interpolation solver A simple demonstration of the baseline interpolation solver
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
%load_ext autoreload %load_ext autoreload
%autoreload 2 %autoreload 2
%matplotlib inline %matplotlib inline
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
%%javascript %%javascript
IPython.OutputArea.prototype._should_scroll = function(lines) { IPython.OutputArea.prototype._should_scroll = function(lines) {
return false; return false;
} }
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
import numpy as np import numpy as np
import matplotlib as mpl import matplotlib as mpl
mpl.rcParams['figure.figsize'] = [15.0, 7.0] mpl.rcParams['figure.figsize'] = [15.0, 7.0]
from tffpy.datasets import get_mix from tffpy.datasets import get_mix
from tffpy.interpolation_solver import solve_by_interpolation from tffpy.interpolation_solver import solve_by_interpolation
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
win_type = 'gauss' win_type = 'gauss'
win_dur = 256 / 8000 win_dur = 256 / 8000
hop_ratio = 1 / 4 hop_ratio = 1 / 4
n_bins_ratio = 4 n_bins_ratio = 4
delta_mix_db = 0 delta_mix_db = 0
delta_loc_db = 30 delta_loc_db = 30
n_iter_closing = n_iter_opening = 3 n_iter_closing = n_iter_opening = 3
wb_to_loc_ratio_db = 8 wb_to_loc_ratio_db = 8
closing_first = True closing_first = True
or_mask = True or_mask = True
fig_dir = 'fig_interpolation' fig_dir = 'fig_interpolation'
x_mix, dgt_params, signal_params, mask, x_bird, x_engine = \ x_mix, dgt_params, signal_params, mask, x_bird, x_engine = \
get_mix(loc_source='bird', wideband_src='car', get_mix(loc_source='bird', wideband_src='car',
wb_to_loc_ratio_db=wb_to_loc_ratio_db, wb_to_loc_ratio_db=wb_to_loc_ratio_db,
win_dur=win_dur, win_type=win_type, win_dur=win_dur, win_type=win_type,
hop_ratio=hop_ratio, n_bins_ratio=n_bins_ratio, hop_ratio=hop_ratio, n_bins_ratio=n_bins_ratio,
n_iter_closing=n_iter_closing, n_iter_closing=n_iter_closing,
n_iter_opening=n_iter_opening, n_iter_opening=n_iter_opening,
closing_first=closing_first, closing_first=closing_first,
delta_mix_db=delta_mix_db, delta_loc_db=delta_loc_db, delta_mix_db=delta_mix_db, delta_loc_db=delta_loc_db,
or_mask=or_mask, fig_dir=fig_dir) or_mask=or_mask, fig_dir=fig_dir)
x_est = solve_by_interpolation(x_mix, mask, dgt_params, signal_params, x_est = solve_by_interpolation(x_mix, mask, dgt_params, signal_params,
fig_dir) fig_dir)
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
``` ```
......
Tutorials Tutorials and demonstrations
######### ############################
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
......
...@@ -18,11 +18,7 @@ if __name__ == '__main__': ...@@ -18,11 +18,7 @@ if __name__ == '__main__':
generate_config() generate_config()
config = ConfigParser() config = ConfigParser()
config.read(config_file) config.read(config_file)
print(Path(__file__)) data_path = Path(__file__).parents[3].absolute() / 'data'
print(Path(__file__).parent)
print(Path(__file__).parent.parent)
print(Path(__file__).parent.parent.absolute())
data_path = Path(__file__).parent.parent.absolute() / 'data'
print('Data path:', str(data_path)) print('Data path:', str(data_path))
config.set('DATA', 'data_path', str(data_path)) config.set('DATA', 'data_path', str(data_path))
config.write(open(config_file, 'w')) config.write(open(config_file, 'w'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment