progress without progress
This commit is contained in:
		
							
								
								
									
										2
									
								
								Model.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Model.py
									
									
									
									
									
								
							| @@ -349,7 +349,7 @@ class Model: | |||||||
|             FCa_0,  # FCa |             FCa_0,  # FCa | ||||||
|         ] |         ] | ||||||
|  |  | ||||||
|     def calculated_current(self, states, t, V): |     def calculated_current(self, states, V): | ||||||
|         ICaL = self.gCaL * states[1, :] * (V - self.ECaL) |         ICaL = self.gCaL * states[1, :] * (V - self.ECaL) | ||||||
|         return ICaL |         return ICaL | ||||||
|  |  | ||||||
|   | |||||||
										
											Binary file not shown.
										
									
								
							| @@ -42,7 +42,7 @@ class Fitter: | |||||||
|             return current |             return current | ||||||
|  |  | ||||||
|         k = np.zeros(current.size) |         k = np.zeros(current.size) | ||||||
|         k[k.size // 2:] = np.exp(-np.arange(k.size // 2) / np.abs(tau)) |         k[k.size // 2 :] = np.exp(-np.arange(k.size // 2) / np.abs(tau)) | ||||||
|         k /= k.sum() |         k /= k.sum() | ||||||
|  |  | ||||||
|         if tau > 0: |         if tau > 0: | ||||||
| @@ -65,13 +65,13 @@ class Fitter: | |||||||
|             times=self.time_points, |             times=self.time_points, | ||||||
|             tspan=self.tspan, |             tspan=self.tspan, | ||||||
|             dt=self.dt, |             dt=self.dt, | ||||||
|             initial_values=self.initial_values |             initial_values=self.initial_values, | ||||||
|         ) |         ) | ||||||
|  |  | ||||||
|         states = self.initial_values |         states = self.initial_values | ||||||
|         t = [0, 1000] |         t = [0, 1000] | ||||||
|         V = model.mem_potential(t) |         V = model.mem_potential(t) | ||||||
|         _calc_curr = model.calculated_current(states, t, V) |         _calc_curr = model.calculated_current(states, V) | ||||||
|         calculated_current = ( |         calculated_current = ( | ||||||
|             self.convolve_current(_calc_curr, tau=tau_RC)[self.current_time_indecies] |             self.convolve_current(_calc_curr, tau=tau_RC)[self.current_time_indecies] | ||||||
|             + offset |             + offset | ||||||
| @@ -153,7 +153,7 @@ class Fitter: | |||||||
|             initial_values=self.initial_values, |             initial_values=self.initial_values, | ||||||
|             tspan=self.tspan, |             tspan=self.tspan, | ||||||
|             dt=self.dt, |             dt=self.dt, | ||||||
|             times=self.time_points |             times=self.time_points, | ||||||
|         ) |         ) | ||||||
|  |  | ||||||
|         _calc_curr = model.calculated_current() |         _calc_curr = model.calculated_current() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user