allensdk.internal.model.glif.glif_experiment module

class allensdk.internal.model.glif.glif_experiment.GlifExperiment(neuron, dt, stim_list, resp_list, spike_time_steps, grid_spike_times, grid_spike_voltages, param_fit_names, **kwargs)[source]

Bases: object

neuron_parameter_count(self)[source]
run(self, param_guess)[source]

This code will run the loaded neuron model in reference to the target neuron spikes. inputs:

self: is the instance of the neuron model and parameters alone with the values of the target spikes.
NOTE the values in each array of the self.gridSpikeIndexTarge_list and the self.interpolated_spike_times are in reference to the time start of of the stim in each induvidual array (not the universal time)

param_guess: array of scalars of the values that will be inserted into the mapping function below.

returns:
voltage_list: list of array of voltage values. NOTE: IF THE MODEL NEURON SPIKES BEFORE THE TARGET THE VOLTAGE WILL
NOT BE CALCULATED THEREFORE THE RESULTING VECTOR WILL NOT BE AS LONG AS THE TARGET AND ALSO WILL NOT MAKE SENSE WITH THE STIMULUS UNLESS YOU CUT IT AND OUTPUT IT TOO.

grid_spike_times_list: interpolated_spike_time_list: an array of the actual times of the spikes. NOTE: THESE TIMES ARE CALCULATED BY ADDING THE

TIME OF THE INDIVIDUAL SPIKE TO THE TIME OF THE LAST SPIKE.
gridISIFromLastTargSpike_list: list of arrays of spike times of the model in reference to the last target (biological)
spike (not in reference to sweep start)
interpolatedISIFromLastTargSpike_list: list of arrays of spike times of the model in reference to the last target (biological)
spike (not in reference to sweep start)

voltageOfModelAtGridBioSpike_list: list of arrays of scalars that contain the voltage of the model neuron when the target or bio neuron spikes. theshOfModelAtGridBioSpike_list: list of arrays of scalars that contain the threshold of the model neuron when the target or bio neuron spikes.

run_base_model(self, param_guess)[source]

This code will run the loaded neuron model. inputs:

self: is the instance of the neuron model and parameters alone with the values of the target spikes.
NOTE the values in each array of the self.gridSpikeIndexTarge_list and the self.interpolated_spike_times are in reference to the time start of of the stim in each induvidual array (not the universal time)

param_guess: array of scalars of the values that will be inserted into the mapping function below.

returns:
voltage_list: list of array of voltage values. NOTE: IF THE MODEL NEURON SPIKES BEFORE THE TARGET THE VOLTAGE WILL
NOT BE CALCULATED THEREFORE THE RESULTING VECTOR WILL NOT BE AS LONG AS THE TARGET AND ALSO WILL NOT MAKE SENSE WITH THE STIMULUS UNLESS YOU CUT IT AND OUTPUT IT TOO.

gridTime_list: interpolatedTime_list: an array of the actual times of the spikes. NOTE: THESE TIMES ARE CALCULATED BY ADDING THE

TIME OF THE INDIVIDUAL SPIKE TO THE TIME OF THE LAST SPIKE.
grid_ISI_list: list of arrays of spike times of the model in reference to the last target (biological)
spike (not in reference to sweep start)
interpolated_ISI_list: list of arrays of spike times of the model in reference to the last target (biological)
spike (not in reference to sweep start)

grid_spike_voltage_list: list of arrays of scalars that contain the voltage of the model neuron when the target or bio neuron spikes. grid_spike_threshold_list: list of arrays of scalars that contain the threshold of the model neuron when the target or bio neuron spikes.

set_neuron_parameters(self, param_guess)[source]

Maps the parameter guesses to the coefficients of the model. input:

param_guess is vector of values. It is assumed that the length will be