Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.lweight = lweight
self.aweight = aweight
self.scale_slow = scale_slow
# perform one-time setup calculations
# Gamma functions used as convolution kernels do not depend on input
# data, hence can be calculated once, then re-used (trade off memory
# for speed).
# gamma_nfl and gamma_inl are used to calculate the fast response in
# bipolar and ganglion cells respectively
t = np.arange(0, 8 * self.tau_inl, self.tsample)
self.gamma_inl = e2cm.gamma(1, self.tau_inl, t)
t = np.arange(0, 10 * self.tau_nfl, self.tsample)
self.gamma_nfl = e2cm.gamma(1, self.tau_nfl, t)
# gamma_ca is used to calculate charge accumulation
t = np.arange(0, 6 * self.tau_ca, self.tsample)
self.gamma_ca = e2cm.gamma(1, self.tau_ca, t)
# gamma_slow is used to calculate the slow response
t = np.arange(0, 10 * self.tau_slow, self.tsample)
self.gamma_slow = e2cm.gamma(3, self.tau_slow, t)
self.tau_slow = tau_slow
self.slope = slope
self.shift = shift
self.lweight = lweight
self.aweight = aweight
self.scale_slow = scale_slow
# perform one-time setup calculations
# Gamma functions used as convolution kernels do not depend on input
# data, hence can be calculated once, then re-used (trade off memory
# for speed).
# gamma_nfl and gamma_inl are used to calculate the fast response in
# bipolar and ganglion cells respectively
t = np.arange(0, 8 * self.tau_inl, self.tsample)
self.gamma_inl = e2cm.gamma(1, self.tau_inl, t)
t = np.arange(0, 10 * self.tau_nfl, self.tsample)
self.gamma_nfl = e2cm.gamma(1, self.tau_nfl, t)
# gamma_ca is used to calculate charge accumulation
t = np.arange(0, 6 * self.tau_ca, self.tsample)
self.gamma_ca = e2cm.gamma(1, self.tau_ca, t)
# gamma_slow is used to calculate the slow response
t = np.arange(0, 10 * self.tau_slow, self.tsample)
self.gamma_slow = e2cm.gamma(3, self.tau_slow, t)