diff --git a/python/tffpy/experiments/exp_solve_tff.py b/python/tffpy/experiments/exp_solve_tff.py index 2558156cd84a56984524db4132ac9930e906109c..179d011565ad189965a72a75fd53156f450f7e9a 100644 --- a/python/tffpy/experiments/exp_solve_tff.py +++ b/python/tffpy/experiments/exp_solve_tff.py @@ -112,6 +112,8 @@ class SolveTffExperiment(Experiment): data_params['wideband_src'] = 'car' problem_params['win_choice'] = ['gauss 64', 'hann 128'] problem_params['crop'] = 4096 + problem_params['delta_loc_db'] = 20 + problem_params['wb_to_loc_ratio_db'] = 16 solver_params['tolerance_arrf'] = 1e-2 solver_params['proba_arrf'] = 1 - 1e-2 diff --git a/python/tffpy/experiments/tests/test_exp_solve_tff.py b/python/tffpy/experiments/tests/test_exp_solve_tff.py new file mode 100644 index 0000000000000000000000000000000000000000..5364e9ff50a9e6142a5be3a69d67895931f1d3d5 --- /dev/null +++ b/python/tffpy/experiments/tests/test_exp_solve_tff.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- + +"""Test of the module :module:`tffpy.experiments.exp_solve_tff` + +.. moduleauthor:: Valentin Emiya +""" +import unittest + +import matplotlib.pyplot as plt + +from tffpy.experiments.exp_solve_tff import \ + SolveTffExperiment, create_and_run_light_experiment +from tffpy.tests.ci_config import create_config_files + + +class TestSolveTffExperiment(unittest.TestCase): + def setUp(self): + create_config_files() + + def test_light_experiment(self): + create_and_run_light_experiment() + + light_exp = SolveTffExperiment.get_experiment( + setting='light', force_reset=False) + for idt in range(light_exp.n_tasks): + light_exp.plot_task(idt=idt, fontsize=16) + plt.close('all') + light_exp.plot_results() + + def test_create_full_experiment(self): + experiment = SolveTffExperiment.get_experiment( + setting='full', force_reset=False) + experiment.display_status() diff --git a/python/tffpy/scripts/script_exp_solve_tff.py b/python/tffpy/scripts/script_exp_solve_tff.py index 25b8342fe3cb773083d33025de16363aa53101af..e94dfbc19f8a8891af69474bd9f182c28ff6e27f 100644 --- a/python/tffpy/scripts/script_exp_solve_tff.py +++ b/python/tffpy/scripts/script_exp_solve_tff.py @@ -1,9 +1,11 @@ # -*- coding: utf-8 -*- """ +Run this script to handle the main experiment :class:`SolveTffExperiment`. .. moduleauthor:: Valentin Emiya """ from yafe.utils import generate_oar_script + import matplotlib.pyplot as plt from tffpy.experiments.exp_solve_tff import \ diff --git a/python/tffpy/tests/ci_config.py b/python/tffpy/tests/ci_config.py index c47b4d1a702865869627badf5fba6ecfd3411156..4e41b8e24dac87cfafa951c2e531cf801170d02a 100644 --- a/python/tffpy/tests/ci_config.py +++ b/python/tffpy/tests/ci_config.py @@ -12,7 +12,8 @@ from yafe.utils import ConfigParser as YafeConfigParser from tffpy.utils import get_config_file, generate_config -if __name__ == '__main__': + +def create_config_files(): config_file = get_config_file() if not config_file.exists(): generate_config() @@ -37,3 +38,6 @@ if __name__ == '__main__': yafe_config_parser.set('USER', 'data_path', str(yafe_user_path)) yafe_config_parser.set('LOGGER', 'path', str(yafe_logger_path)) yafe_config_parser.write(open(yafe_config_file, 'w')) + +if __name__ == '__main__': + create_config_files() \ No newline at end of file diff --git a/python/tffpy/tf_fading.py b/python/tffpy/tf_fading.py index c0be148e6ddc7241794a2ccb44b82fe1290e887a..28c3f8098cdd2c6e96444c94bef4fc895b194943 100644 --- a/python/tffpy/tf_fading.py +++ b/python/tffpy/tf_fading.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """ -Class :class:`GabMulTff` is the main object to solve a time-frequency fading +Class :class:`GabMulTff` is the main object to solve a time-frequency fading problem. .. moduleauthor:: Valentin Emiya