add plotting and saving of f point detection
This commit is contained in:
parent
a41de94961
commit
d086f4b3a1
@ -5,6 +5,7 @@ from FiCurve import FICurveModel
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
import copy
|
||||
import os
|
||||
|
||||
|
||||
SEARCH_WIDTH = 3
|
||||
@ -66,6 +67,16 @@ def test_parameter_effect(model_parameters, test_parameter):
|
||||
f_zero_s.append(fi_curve.get_f_zero_fit_slope_at_stimulus_value(0.1))
|
||||
f_zero_v.append(fi_curve.get_f_zero_frequencies())
|
||||
|
||||
if not os.path.exists("./figures/f_point_detection/"):
|
||||
os.makedirs("./figures/f_point_detection/")
|
||||
|
||||
detection_save_path = "./figures/f_point_detection/{}_{:.4f}/".format(test_parameter, values[i])
|
||||
if not os.path.exists(detection_save_path):
|
||||
os.makedirs(detection_save_path)
|
||||
|
||||
fi_curve.plot_f_point_detections(detection_save_path)
|
||||
|
||||
|
||||
baseline = BaselineModel(model, 600, trials=10)
|
||||
bf.append(baseline.get_baseline_frequency())
|
||||
vs.append(baseline.get_vector_strength())
|
||||
|
Loading…
Reference in New Issue
Block a user