gbeflow/__init__.py
def calc_track(self,x0,y0,dt,tmin=0):
        '''
        Calculate the trajectory of a single point through space and time
        
        Parameters
        ----------
        x0 : float
            X position of the starting point
        y0 : float
            Y position of the starting point
        dt : float
            Duration of time step
        trange : list or np.array
            Range of t values to iterate over for interpolation
            
        Returns
        -------
        track : np.array
            Array of dimension number_t_steps x 2
        '''
        
        # Check if interpolation has been initialized
        if hasattr(self,'interp_init') and (self.interp_init==True):
            # Continue with function without problem
            pass
        else:
            self.initialize_interpolation()
            
        trange = range(tmin,np.max(self.tval))
            
        # Initialize position list with start value
        xpos = [x0]*(tmin+1)
        ypos = [y0]*(tmin+1)
        
        for t in trange:
            
            # Calculate dx and dy from iterators
            dx = self.Ldx[t].ev(xpos[t],ypos[t])
            dy = self.Ldy[t].ev(xpos[t],ypos[t])
            
            # Update position arrays
            # Multiply velocity vector by time to get distance
            xpos.append(xpos[t] + dx*dt)
            ypos.append(ypos[t] + dy*dt)
            
        return(np.array([xpos,ypos]))

        Calculate the trajectory of a single point through space and time
        
        Parameters
        ----------
        x0 : float
            X position of the starting point
        y0 : float
            Y position of the starting point
        dt : float
            Duration of time step
        trange : list or np.array
            Range of t values to iterate over for interpolation
            
        Returns
        -------
        track : np.array
            Array of dimension number_t_steps x 2
        
Calculate the trajectory of a single point through space and time
Parameters

x0 : float
X position of the starting point
y0 : float
Y position of the starting point
dt : float
Duration of time step
trange : list or np.array
Range of t values to iterate over for interpolation

Returns

track : np.array
Array of dimension number_t_steps x 2
Calculate the trajectory of a single point through space and time Parameters x0 : float X position of the starting point y0 : float Y position of the starting point dt : float Duration of time step trange : list or np . array Range of t values to iterate over for interpolation Returns track : np . array Array of dimension number_t_steps x 2
def calc_track(self,x0,y0,dt,tmin=0):
        if hasattr(self,'interp_init') and (self.interp_init==True):
            pass
        else:
            self.initialize_interpolation()
        trange = range(tmin,np.max(self.tval))
        xpos = [x0]*(tmin+1)
        ypos = [y0]*(tmin+1)
        for t in trange:
            dx = self.Ldx[t].ev(xpos[t],ypos[t])
            dy = self.Ldy[t].ev(xpos[t],ypos[t])
            xpos.append(xpos[t] + dx*dt)
            ypos.append(ypos[t] + dy*dt)
        return(np.array([xpos,ypos]))
def calc_track ( self , x0 , y0 , dt , tmin = 0 ) : if hasattr ( self , 'interp_init' ) and ( self . interp_init == True ) : pass else : self . initialize_interpolation ( ) trange = range ( tmin , np . max ( self . tval ) ) xpos = [ x0 ] * ( tmin + 1 ) ypos = [ y0 ] * ( tmin + 1 ) for t in trange : dx = self . Ldx [ t ] . ev ( xpos [ t ] , ypos [ t ] ) dy = self . Ldy [ t ] . ev ( xpos [ t ] , ypos [ t ] ) xpos . append ( xpos [ t ] + dx * dt ) ypos . append ( ypos [ t ] + dy * dt ) return ( np . array ( [ xpos , ypos ] ) )
Calculate the trajectory of a single point through space and time
Parameters
Calculate the trajectory of a single point through space and time Parameters
'''
        Calculate the trajectory of a single point through space and time
        
        Parameters
        ----------
        x0 : float
            X position of the starting point
        y0 : float
            Y position of the starting point
        dt : float
            Duration of time step
        trange : list or np.array
            Range of t values to iterate over for interpolation
            
        Returns
        -------
        track : np.array
            Array of dimension number_t_steps x 2
        ''' # Check if interpolation has been initialized # Continue with function without problem # Initialize position list with start value # Calculate dx and dy from iterators # Update position arrays # Multiply velocity vector by time to get distance
self
x0
y0
dt
tmin