From 5165046f2021ac95c952017e93f5d4a7317f61a1 Mon Sep 17 00:00:00 2001 From: "a.ott" Date: Mon, 27 Jan 2020 13:43:42 +0100 Subject: [PATCH] delete out of date code --- generalTests.py | 5 ----- main.py | 42 +----------------------------------------- 2 files changed, 1 insertion(+), 46 deletions(-) diff --git a/generalTests.py b/generalTests.py index 452662e..3f1aa74 100644 --- a/generalTests.py +++ b/generalTests.py @@ -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]) diff --git a/main.py b/main.py index 244ae25..98f905a 100644 --- a/main.py +++ b/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()