Commit 45b9714d authored by valentin.emiya's avatar valentin.emiya
Browse files

minor fixes

parent e1dcfd40
......@@ -641,7 +641,7 @@ class SolveTffExperiment(Experiment):
plot_spectrogram(x=x_wb, dgt_params=dgt_params,
fs=signal_params['fs'],
clim=clim)
plt.title('True source')
plt.title('True signal')
plt.tight_layout()
plt.savefig(fig_dir / 'spectrogram_true_wb_source.pdf')
......
......@@ -20,12 +20,18 @@ class VarianceExperiment(SolveTffExperiment):
def display_results(self):
res = self.load_results(array_type='xarray')
res = res.squeeze()
print('std(sdr_tff):', float(res.sel(measure='sdr_tff').std()))
print('std(sdr_tffo):', float(res.sel(measure='sdr_tffo').std()))
print('std(sdr_tffe):', float(res.sel(measure='sdr_tffe').std()))
print('std(is_tff):', float(res.sel(measure='is_tff').std()))
print('std(is_tffo):', float(res.sel(measure='is_tffo').std()))
print('std(is_tffe):', float(res.sel(measure='is_tffe').std()))
tff_list = res.to_dict()['coords']['solver_tol_subregions']['data']
for measure in ['sdr_tff', 'sdr_tffo', 'sdr_tffe',
'is_tff', 'is_tffo', 'is_tffe']:
for solver_tol_subregions in tff_list:
std_res = float(res.sel(
measure=measure,
solver_tol_subregions=solver_tol_subregions).std())
if solver_tol_subregions is None:
measure_name = measure + '-1'
else:
measure_name = measure + '-P'
print('std({}): {}'.format(measure_name, std_res))
def plot_results(self):
# No more need for this method
......
......@@ -63,10 +63,12 @@ from tffpy.experiments.exp_solve_tff import \
try:
experiment = SolveTffExperiment.get_experiment(setting='full',
force_reset=False)
except RuntimeError:
except RuntimeError as e:
experiment = None
except FileNotFoundError:
print(e)
except FileNotFoundError as e:
experiment = None
print(e)
if __name__ == '__main__':
answer = 1
......@@ -142,7 +144,8 @@ if __name__ == '__main__':
'win_choice': 'gauss 256',
'crop': None},
'solver_params': {'proba_arrf': 0.9999,
'tolerance_arrf': 0.001}}
'tolerance_arrf': 0.001,
'rand_state': 0}}
if answer == 8:
task_params['solver_params']['tol_subregions'] = None
elif answer == 9:
......
......@@ -110,8 +110,8 @@ if __name__ == '__main__':
experiment.display_status()
elif answer == 6:
to_dir = str(experiment.xp_path)
from_dir = \
'/data1/home/valentin.emiya/data_exp/SolveTffExperiment/'
from_dir = '/data1/home/valentin.emiya/data_exp/{}/'\
.format(experiment.name)
print('Run:')
print(' '.join(['rsync', '-rv',
'valentin.emiya@sms-ext.lis-lab.fr:'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment