Пример #1
0
 def __init__(self, omegasOrN = None, es=None, as_=None, bs=None, cs=None, transient_couplings = [], reset_offset = 100, amplitudes=None):
     """Create independent Roessler-systems from the list of arguments
     amplitudes: list of amplitude-factors, eg. [ [0.0,1.0,0.2] , [0.0,1.0,1.0] ] would create two output-signals
     """
     NRoesslerTransientCouplings.__init__(self,omegasOrN,es,as_,bs,cs,transient_couplings,reset_offset)
     
     if amplitudes==None:
         amplitudes = [np.ones((self.N))]
     for i_a in range(len(amplitudes)):
         assert self.N == len(amplitudes[i_a]), "Number of Roesslers and amplitudes must be equal for each amplitude-list"
     self._amplitudes = amplitudes
     print self._amplitudes
     self.v = None #integration-output of parent, not set yet
Пример #2
0
 def integrate(self,ts):
     self.v = NRoesslerTransientCouplings.integrate(self,ts)
     rv = np.zeros((self.v.shape[0],len(self._amplitudes)))
     for i_a1 in range(len(self._amplitudes)):
         for i_a2 in range(len(self._amplitudes[i_a1])):
             print rv[:,i_a1].shape, (self._amplitudes[i_a1][i_a2]*self.v[:,3*i_a2]).shape
             rv[:,i_a1] += self._amplitudes[i_a1][i_a2]*self.v[:,3*i_a2] #take x-components, sum up
     return rv