tests Package

tests Package

test Module

fit_neuron.tests.test.test_eval_sav_results(output_dir='test_output_figures', neuron_num=1)[source]

Example procedure for evaluating the estimated model parameters gerenated by test_fit_neuron().

Parameters:
  • output_dir – directory where JSON files and pickle files summarizing fitting results have be saved.
  • neuron_num – number of neuron we want to evaluate (number ranges from 1 to 12)

Warning

This function will not work unless test_fit_neuron() has already been run before.

fit_neuron.tests.test.test_fit_neuron(output_dir='test_output_figures', neuron_num=1)[source]

Example procedure for estimating a LIF model for a single neuron.

Parameters:
  • output_dir – directory where JSON files and pickle files summarizing fitting results will be saved.
  • neuron_num – number of neuron we want to fit (number ranges from 1 to 12)

Note

The output JSON files will contain a dictionary of parameter values. The output pickle file will contain a fit_neuron.optimize.neuron_base_obj.Neuron instance which can simulate the artificial neuron.

test_load_neuron Module

Tests the functionality of the models themselves, independent of fitting procedures.

fit_neuron.tests.test_load_neuron.plot_test_load_neuron()[source]

Loads a neuron instance directly from parameter arrays and simulate a step input current.

fit_neuron.tests.test_load_neuron.test_load_neuron()[source]

Loads a neuron instance directly from parameter arrays and simulate a step input current.

test_model Module

This script demonstrates the simplest way to estimate a model from data, predict new voltage traces, and compare the predicted voltage traces with the true voltage traces.

X_list: list of current injection traces (each element in list is a numpy array) Y_list: list of voltage traces (each element in list is a numpy array) dt: time step between consecutive values in each current injection / voltage trace

fit_neuron.tests.test_model.easy_test()[source]

Table Of Contents

This Page