allensdk.internal.model.glif.spike_cutting module

allensdk.internal.model.glif.spike_cutting.calc_spike_cut_and_v_reset_via_expvar_residuals(all_current_list, all_voltage_list, dt, El_reference, deltaV, max_spike_cut_time=False, MAKE_PLOT=False, SHOW_PLOT=False, PUBLICATION_PLOT=False, BLOCK=False)[source]
This function calculates where the spike should be cut based on explained variance.

The goal is to find a model where the voltage after a spike maximally explains the voltage before a spike. This will also specify the voltage reset rule inputs:

spike_determination_method: string specifing the method used to find threshold all_current_list: list of current (list of current traces injected into neuron) all_voltage_list: list of voltages (list of voltage trace)

The change is that if the slope is greater than one or intercept is greater than zero it forces it. Regardless of required force the residuals are used.

allensdk.internal.model.glif.spike_cutting.plotLineRegress1(slope, intercept, r, xlim)[source]
allensdk.internal.model.glif.spike_cutting.plotLineRegressRed(slope, intercept, r, xlim)[source]