Exemplo n.º 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()
Exemplo n.º 2
0
 def phase_trace_cpu(self, i, X):
     V_i = np.transpose(
         type(self).model.integrate_three_rk4(
             X[i, :], self.network.coupling_strength,
             self.dt / float(self.stride), self.N_output, self.stride))
     ti, d = tl.phase_difference(V_i, V_trigger=type(self).V_trigger)
     return d
Exemplo n.º 3
0
 def phaseTrace_cpu(self, i, X):
     V_i = np.transpose(
         model.integrate_four_rk4(X[i, :], self.network.get_coupling(),
                                  self.dt / float(self.stride),
                                  self.N_output, self.stride))
     ti, d = tl.phase_difference(V_i, V_trigger=torus.V_trigger)
     return d
Exemplo n.º 4
0
	def phaseTrace_cpu(self, i, X):
		V_i = np.transpose(
			model.integrate_four_rk4(
				X[i, :],
				self.network.get_coupling(),
				self.dt/float(self.stride),
				self.N_output, self.stride))
		ti, d = tl.phase_difference(V_i, V_trigger=torus.V_trigger)
		return d
Exemplo n.º 5
0
	def phase_trace_cpu(self, i, X):
		V_i = np.transpose(
			type(self).model.integrate_three_rk4(
				X[i, :],
				self.network.coupling_strength,
				self.dt/float(self.stride),
				self.N_output,
				self.stride))
		ti, d = tl.phase_difference(V_i, V_trigger=type(self).V_trigger)
		return d
Exemplo n.º 6
0
		def refine_attractor(initial_condition):
			t, V_j = self.traces.computeTraces(initial_condition, plotit=False)
			V_j = np.transpose(V_j)
			ti, trajectory = tl.phase_difference(V_j, V_trigger=type(self).V_trigger)

			try:
				new_attr = att.attractor(trajectory).classify()
				return new_attr

			except:
				return att.attractor( [[0., 0.]], initial_state=[0., 0.] ).classify()
Exemplo n.º 7
0
 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()
Exemplo n.º 8
0
        def refine_attractor(initial_condition):
            t, V_j = self.traces.computeTraces(initial_condition, plotit=False)
            V_j = np.transpose(V_j)
            ti, trajectory = tl.phase_difference(
                V_j, V_trigger=type(self).V_trigger)

            try:
                new_attr = att.attractor(trajectory).classify()
                return new_attr

            except:
                return att.attractor([[0., 0.]],
                                     initial_state=[0., 0.]).classify()
Exemplo n.º 9
0
	def click_torus(self, event):

		if event.button == 1:
			return

		x, y, z = self.ax.guess_coord(event.xdata, event.ydata)

		for z in np.arange(0., 1., 1./float(self.GRID)) + 1./float(2*self.GRID):
			t, V_j = self.traces.compute_traces(self.system.load_initial_condition(x, y, z))
			V_j = np.transpose(V_j)
			ti, d = tl.phase_difference(V_j, V_trigger=torus.V_trigger)
			last = d[-1, :]
			tl.plot_phase_3D(d[:, 0], d[:, 1], d[:, 2], self.ax, c=tl.clmap_patterns(last[1], last[0]), PI=0.5)

		self.fig.canvas.draw()
Exemplo n.º 10
0
	def phase_trace_gpu(self, i, V):
		ti, d = tl.phase_difference(V[i, :, :], V_trigger=type(self).V_trigger)
		return d
Exemplo n.º 11
0
def phase_trace_gpu(i, V):
	ti, d = tl.phase_difference(V[i, :, :], V_trigger=torus.V_trigger)
	return d
Exemplo n.º 12
0
 def phase_trace_gpu(self, i, V):
     ti, d = tl.phase_difference(V[i, :, :], V_trigger=type(self).V_trigger)
     return d