def get_alpha_beta_at_voltage(self, V, statevar): from morphforgecontrib.simulation.channels.hh_style.summarisers.util import AlphaBetaCalculator AlphaBetaCalculator alpha = self.statevars[statevar][0] beta = self.statevars[statevar][1] alpha = AlphaBetaCalculator.calc_alpha_beta(V, alpha) beta = AlphaBetaCalculator.calc_alpha_beta(V, beta) return (alpha, beta)
def get_alpha_beta_at_voltage(self, V, statevar): from morphforgecontrib.simulation.channels.hh_style.summarisers.util import AlphaBetaCalculator alpha = self.statevars[statevar][0] beta1 = self.statevars[statevar][1] beta2 = self.statevars[statevar][2] threshold = self.beta2threshold alpha = AlphaBetaCalculator.calc_alpha_beta(V, alpha) beta1 = AlphaBetaCalculator.calc_alpha_beta(V, beta1) beta2 = AlphaBetaCalculator.calc_alpha_beta(V, beta2) beta_indices1 = np.nonzero(V < threshold) beta_indices2 = np.nonzero(V >= threshold) beta = np.hstack([beta1[beta_indices1], beta2[beta_indices2]]) return (alpha, beta)