delete out of date code
This commit is contained in:
parent
45d47b3818
commit
5165046f20
@ -1,8 +1,3 @@
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
from models.LeakyIntegrateFireModel import LIFModel
|
||||
|
||||
|
||||
g = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
print(g[3:])
|
||||
print(g[:-3])
|
||||
|
42
main.py
42
main.py
@ -4,58 +4,18 @@ from CellData import icelldata_of_dir
|
||||
import os
|
||||
import helperFunctions as hf
|
||||
from AdaptionCurrent import Adaption
|
||||
from models.NeuronModel import NeuronModel
|
||||
from functionalityTests import *
|
||||
# TODO command line interface needed/nice ?
|
||||
|
||||
|
||||
def main():
|
||||
run_tests()
|
||||
quit()
|
||||
|
||||
for cell_data in icelldata_of_dir("./data/"):
|
||||
print()
|
||||
print(cell_data.get_data_path())
|
||||
|
||||
model = NeuronModel(cell_data)
|
||||
|
||||
x_values = np.arange(0, 1000, 0.01)
|
||||
stimulus = [0]*int(200/0.01)
|
||||
stimulus.extend([0.19]*int(400/0.01))
|
||||
stimulus.extend([0]*int(400/0.01))
|
||||
|
||||
v, spikes = model.simulate(0, 1000, stimulus)
|
||||
|
||||
# plt.plot(x_values, v)
|
||||
|
||||
spikes = [s/1000 for s in spikes]
|
||||
time, freq = hf.calculate_isi_frequency(spikes, 0, 0.01/1000)
|
||||
|
||||
plt.plot(time, freq)
|
||||
plt.show()
|
||||
|
||||
quit()
|
||||
continue
|
||||
|
||||
figures_save_path = "./figures/" + os.path.basename(cell_data.get_data_path()) + "/"
|
||||
ficurve = FICurve(cell_data)
|
||||
ficurve.plot_fi_curve(figures_save_path)
|
||||
|
||||
adaption = Adaption(cell_data, ficurve)
|
||||
adaption.plot_exponential_fits(figures_save_path + "exponential_fits/", delete_previous=True)
|
||||
|
||||
for i in range(len(adaption.exponential_fit_vars)):
|
||||
if len(adaption.exponential_fit_vars[i]) == 0:
|
||||
continue
|
||||
tau = round(adaption.exponential_fit_vars[i][1]*1000, 2)
|
||||
contrast = round(ficurve.stimulus_value[i], 3)
|
||||
# print(tau, "ms - tau_eff at", contrast, "contrast")
|
||||
|
||||
# test_plot_inverses(ficurve)
|
||||
print("Chosen tau [ms]:", adaption.tau_real)
|
||||
|
||||
|
||||
def run_tests():
|
||||
test_lifac()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user