gbeflow/__init__.py
def calc_flow_path(xval,yval,vx,vy,x0,y0,dt,timer=True):
    '''
    Calculate the trajectory of a point through the vector field over time
    
    Parameters
    ----------
    xval : np.array
        A list of unique x values that define the meshgrid of xx
    yval : np.array
        A corresponding list of unique y values that define the meshgrid of yy
    vx : np.array
        Array of shape (time,len(xval),len(yval)) containing the x velocity component
    vy : np.array
        Array of shape (time,len(xval),len(yval)) containing y velocity component
    dt : float
        Duration of the time step between intervals
    timer : boolean, optional
        Default true uses the tqdm timer as an iterator
        
    Returns
    -------
    Array of shape (time,2) containing x and y position of trajectory over time
    
    '''
    
    # Initialize position list with start value
    xpos = [x0]
    ypos = [y0]
    
    if timer == True:
        iterator = tqdm.tqdm(range(1,vx.shape[0]))
    else:
        iterator = range(1,vx.shape[0])
    
    for t in iterator:
        
        # Interpolate to find change in x and y
        dx = RectBivariateSpline(xval,yval,dt*vx[t]
                                ).ev(xpos[t-1],ypos[t-1])
        dy = RectBivariateSpline(xval,yval,dt*vy[t]
                                ).ev(xpos[t-1],ypos[t-1])

        # Update position arrays
        xpos.append(xpos[t-1]+dx)
        ypos.append(ypos[t-1]+dy)
        
    return(np.array([xpos,ypos]))

    Calculate the trajectory of a point through the vector field over time
    
    Parameters
    ----------
    xval : np.array
        A list of unique x values that define the meshgrid of xx
    yval : np.array
        A corresponding list of unique y values that define the meshgrid of yy
    vx : np.array
        Array of shape (time,len(xval),len(yval)) containing the x velocity component
    vy : np.array
        Array of shape (time,len(xval),len(yval)) containing y velocity component
    dt : float
        Duration of the time step between intervals
    timer : boolean, optional
        Default true uses the tqdm timer as an iterator
        
    Returns
    -------
    Array of shape (time,2) containing x and y position of trajectory over time
    
    
Calculate the trajectory of a point through the vector field over time
Parameters



Returns

Array of shape (time,2) containing x and y position of trajectory over time
Calculate the trajectory of a point through the vector field over time Parameters Returns Array of shape ( time 2 ) containing x and y position of trajectory over time
def calc_flow_path(xval,yval,vx,vy,x0,y0,dt,timer=True):
    xpos = [x0]
    ypos = [y0]
    if timer == True:
        iterator = tqdm.tqdm(range(1,vx.shape[0]))
    else:
        iterator = range(1,vx.shape[0])
    for t in iterator:
        dx = RectBivariateSpline(xval,yval,dt*vx[t]
                                ).ev(xpos[t-1],ypos[t-1])
        dy = RectBivariateSpline(xval,yval,dt*vy[t]
                                ).ev(xpos[t-1],ypos[t-1])
        xpos.append(xpos[t-1]+dx)
        ypos.append(ypos[t-1]+dy)
    return(np.array([xpos,ypos]))
def calc_flow_path ( xval , yval , vx , vy , x0 , y0 , dt , timer = True ) : xpos = [ x0 ] ypos = [ y0 ] if timer == True : iterator = tqdm . tqdm ( range ( 1 , vx . shape [ 0 ] ) ) else : iterator = range ( 1 , vx . shape [ 0 ] ) for t in iterator : dx = RectBivariateSpline ( xval , yval , dt * vx [ t ] ) . ev ( xpos [ t - 1 ] , ypos [ t - 1 ] ) dy = RectBivariateSpline ( xval , yval , dt * vy [ t ] ) . ev ( xpos [ t - 1 ] , ypos [ t - 1 ] ) xpos . append ( xpos [ t - 1 ] + dx ) ypos . append ( ypos [ t - 1 ] + dy ) return ( np . array ( [ xpos , ypos ] ) )
Calculate the trajectory of a point through the vector field over time
Parameters
Calculate the trajectory of a point through the vector field over time Parameters
'''
    Calculate the trajectory of a point through the vector field over time
    
    Parameters
    ----------
    xval : np.array
        A list of unique x values that define the meshgrid of xx
    yval : np.array
        A corresponding list of unique y values that define the meshgrid of yy
    vx : np.array
        Array of shape (time,len(xval),len(yval)) containing the x velocity component
    vy : np.array
        Array of shape (time,len(xval),len(yval)) containing y velocity component
    dt : float
        Duration of the time step between intervals
    timer : boolean, optional
        Default true uses the tqdm timer as an iterator
        
    Returns
    -------
    Array of shape (time,2) containing x and y position of trajectory over time
    
    ''' # Initialize position list with start value # Interpolate to find change in x and y # Update position arrays
xval
yval
vx
vy
x0
y0
dt
timer