From f973882e6290a99a5aaeb6ec9f68ae6fa1640e7f Mon Sep 17 00:00:00 2001 From: "a.ott" Date: Sat, 1 Aug 2020 12:03:08 +0200 Subject: [PATCH] mirror mirrored cells for plot --- ModelFit.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ModelFit.py b/ModelFit.py index bd44b66..4ac4254 100644 --- a/ModelFit.py +++ b/ModelFit.py @@ -191,14 +191,14 @@ class ModelFit: fi_curve = get_fi_curve_class(cell, cell.get_fi_contrasts(), save_dir=cell.get_data_path()) f_inf_slope = fi_curve.get_f_inf_slope() - contrasts = np.array(cell.get_fi_contrasts()) + contrasts = np.array(fi_curve.stimulus_values) if f_inf_slope < 0: contrasts = contrasts * -1 - # print("old contrasts:", cell_data.get_fi_contrasts()) - # print("new contrasts:", contrasts) - contrasts = sorted(contrasts) + fi_curve_cell = get_fi_curve_class(cell, contrasts) + print("cell: {} , FI-Curve has saved contrasts that give negative f_inf slope!".format(cell.get_data_path())) + else: + fi_curve_cell = fi_curve - fi_curve_cell = get_fi_curve_class(cell, contrasts, eod_freq=cell.get_eod_frequency(), trials=15) fi_curve_model = get_fi_curve_class(model, contrasts, eod_freq=cell.get_eod_frequency(), trials=15) axes[1].set_title("Fi-Curve")