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

update CI

parent 875f21e1
No related branches found
No related tags found
No related merge requests found
Pipeline #5107 failed
%% Cell type:markdown id: tags:
# Tutorial for package `tffpy.interpolation_solver`
# 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)
x_est = solve_by_interpolation(x_mix, mask, dgt_params, signal_params,
fig_dir)
```
%% Cell type:code id: tags:
``` python
```
......
Tutorials
#########
Tutorials and demonstrations
############################
.. toctree::
:maxdepth: 1
......
......@@ -18,11 +18,7 @@ if __name__ == '__main__':
generate_config()
config = ConfigParser()
config.read(config_file)
print(Path(__file__))
print(Path(__file__).parent)
print(Path(__file__).parent.parent)
print(Path(__file__).parent.parent.absolute())
data_path = Path(__file__).parent.parent.absolute() / 'data'
data_path = Path(__file__).parents[3].absolute() / 'data'
print('Data path:', str(data_path))
config.set('DATA', 'data_path', str(data_path))
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