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")