コード例 #1
0
	def click_traces(self, x, y):
		t, V_j = self.traces.computeTraces(self.system.load_initial_condition(x, y))
		V_j = np.transpose(V_j)
		ti, d = tl.phase_difference(V_j, V_trigger=type(self).V_trigger)
		last = d[-1, :]
		tl.plot_phase_2D(d[:, 0], d[:, 1], axes=self.ax_traces, color=tl.clmap(tl.PI2*last[1], tl.PI2*last[0]), PI=0.5, arrows=self.PLOT_ARROWS)
		self.fig.canvas.draw()
コード例 #2
0
    def __init__(self,
                 trajectory,
                 initial_state=None):  # trajectory[time, space]
        attractor.__init__(self, trajectory, initial_state)

        self.attractor = self.trajectory[-1, :]
        self.color = tl.clmap(tl.PI2 * self.attractor[1],
                              tl.PI2 * self.attractor[0])
コード例 #3
0
ファイル: torus_2D.py プロジェクト: drakeknapper/Motiftoolbox
 def click_traces(self, x, y):
     t, V_j = self.traces.compute_traces(
         self.system.load_initial_condition(x, y))
     V_j = np.transpose(V_j)
     ti, d = tl.phase_difference(V_j, V_trigger=type(self).V_trigger)
     last = d[-1, :]
     tl.plot_phase_2D(d[:, 0],
                      d[:, 1],
                      axes=self.ax_traces,
                      c=tl.clmap(tl.PI2 * last[1], tl.PI2 * last[0]),
                      PI=0.5)
     #tl.plot_phase_2D(d[:, 0], d[:, 1], axes=self.ax_traces, c=tl.clmap_patterns(last[1], last[0]), PI=0.5)
     self.fig.canvas.draw()
コード例 #4
0
	def __init__(self, x, eigenvalues):
		self.fp = np.mod(np.asarray(x), tl.PI2)
		self.eigenValues = np.asarray(eigenvalues)
		self.color = tl.clmap(self.fp[1], self.fp[0])
		realpart = np.real(self.eigenValues)

		if all(realpart < 0.):
			self.stability_idx = 0 # sink

		elif all(realpart > 0.):
			self.stability_idx = 1 # source

		elif np.prod(realpart) < 0.:
			self.stability_idx = 2 # saddle


		else:
			self.stability_idx = 'undefined'
コード例 #5
0
ファイル: attractor.py プロジェクト: RamiJacob/Motiftoolbox
	def __init__(self, trajectory, initial_state=None):	 # trajectory[time, space]
		attractor.__init__(self, trajectory, initial_state)
		
		self.attractor = self.trajectory[-1, :]
		self.color = tl.clmap(tl.PI2*self.attractor[1], tl.PI2*self.attractor[0])