allensdk.internal.model.glif.configure_model module

exception allensdk.internal.model.glif.configure_model.ModelConfigurationException[source]

Bases: Exception

allensdk.internal.model.glif.configure_model.configure_method_parameters(neuron_config, optimizer_config, v_reset_slope, v_reset_intercept, a_spike_component_of_threshold, b_spike_component_of_threshold, a_voltage_component_of_threshold, b_voltage_component_of_threshold, var_of_section, sv_for_expsymm, tau_from_AC)[source]

Configures the methods used to run the models

Parameters:
neuron_config: dict

contains neuron parameters

optimizer_config: dict

contains parameters for optimizaton

v_reset_slope: float

slope of the line in voltage reset

v_reset_intercept: float

intercept of the line in voltage reset

a_spike_component_of_threshold: float or None

amplitude of spike component of the threshold

b_spike_component_of_threshold: float or None

time course of spike component of the threshold

a_voltage_component_of_threshold: float or None

a parameter in voltage component of threshold

b_voltage_component_of_threshold: float or None

b parameter in voltage component of threshold

var_of_section: float

variance in noise of highest amplitude subthreshold long square pulse

sv_for_expsymm: float

parameter in MLIN optimization

tau_from_AC: float

time course of exponential fit to the autocorrelation

allensdk.internal.model.glif.configure_model.configure_model(method_config, preprocessor_values)[source]

Configures the model from the specified method configuration and preprocessor values.

Parameters:
method_config: dictionary

contains values needed to configure the methods for the specified level within the dictionary

preprocessor_values: dictionary

dictionary from preprocessor

allensdk.internal.model.glif.configure_model.main()[source]
allensdk.internal.model.glif.configure_model.specify_parameter_groups(dictionary, dict_specifer, neuron_type)[source]

Specifies which values from the preprocessor will be used in the model configuration. This is helpful if the preprocessor calculates many different values.

Parameters:
dictionary: dict

dictionary from preprocessor

dict_specifier: string

The following are available model levels ‘LIF’ (GLIF1) ‘LIF_R’ (GLIF2) ‘LIF_ASC’ (GLIF3) ‘LIF_R_ASC’ (GLIF_4) ‘LIF_R_ASC_AT’ (GLIF_5)

neuron_type: string

‘simple_neuron’ is the only available option however here would be a good place for the user to implement their own configurations.

Returns:
output_dict: dict

dictionary containing model configuration

allensdk.internal.model.glif.configure_model.update_neuron_method(method_type, arg_method_name, neuron_config)[source]
allensdk.internal.model.glif.configure_model.validate_method_requirements(method_config_name, has_mss)[source]

Confirm that the neuron has the specific sweeps required for the specified configuration

Parameters:
method_config_name: string
Specifies the model level. Options are:

‘LIF’ (GLIF1) ‘LIF_R’ (GLIF2) ‘LIF_ASC’ (GLIF3) ‘LIF_R_ASC’ (GLIF_4) ‘LIF_R_ASC_AT’ (GLIF_5)

has_mss: boolean

Specifies if the neuron has a multi short square sweep (for fitting spike component of threshold).