coastalimagelib/corefunctions.py
def initXYZ(self, xlims, ylims, dx, dy, z):
        """
        Function to initialize the XYZ grid

        xlims and ylims can either be an array of two numbers,
        or one value if a 1D transect is desired.

        """

        if len(xlims) < 2:
            xvec = xlims
        else:
            xvec = np.arange(xlims[0], xlims[1] + dx, dx)

        if len(ylims) < 2:
            yvec = ylims
        else:
            yvec = np.arange(ylims[0], ylims[1] + dy, dy)

        # Make XYZ grid
        self.X, self.Y = np.meshgrid(xvec, yvec)
        self.Z = np.zeros_like(self.X) + z
        x = self.X.copy().T.flatten()
        y = self.Y.copy().T.flatten()
        z = self.Z.copy().T.flatten()
        self.xyz = np.vstack((x, y, z)).T

        Function to initialize the XYZ grid

        xlims and ylims can either be an array of two numbers,
        or one value if a 1D transect is desired.

        
Function to initialize the XYZ grid
xlims and ylims can either be an array of two numbers,
or one value if a 1D transect is desired.
Function to initialize the XYZ grid xlims and ylims can either be an array of two numbers or one value if a 1D transect is desired .
def initXYZ(self, xlims, ylims, dx, dy, z):
        if len(xlims) < 2:
            xvec = xlims
        else:
            xvec = np.arange(xlims[0], xlims[1] + dx, dx)
        if len(ylims) < 2:
            yvec = ylims
        else:
            yvec = np.arange(ylims[0], ylims[1] + dy, dy)
        self.X, self.Y = np.meshgrid(xvec, yvec)
        self.Z = np.zeros_like(self.X) + z
        x = self.X.copy().T.flatten()
        y = self.Y.copy().T.flatten()
        z = self.Z.copy().T.flatten()
        self.xyz = np.vstack((x, y, z)).T
def initXYZ ( self , xlims , ylims , dx , dy , z ) : if len ( xlims ) < 2 : xvec = xlims else : xvec = np . arange ( xlims [ 0 ] , xlims [ 1 ] + dx , dx ) if len ( ylims ) < 2 : yvec = ylims else : yvec = np . arange ( ylims [ 0 ] , ylims [ 1 ] + dy , dy ) self . X , self . Y = np . meshgrid ( xvec , yvec ) self . Z = np . zeros_like ( self . X ) + z x = self . X . copy ( ) . T . flatten ( ) y = self . Y . copy ( ) . T . flatten ( ) z = self . Z . copy ( ) . T . flatten ( ) self . xyz = np . vstack ( ( x , y , z ) ) . T
Function to initialize the XYZ grid
xlims and ylims can either be an array of two numbers,
or one value if a 1D transect is desired.
Function to initialize the XYZ grid xlims and ylims can either be an array of two numbers or one value if a 1D transect is desired .
"""
        Function to initialize the XYZ grid

        xlims and ylims can either be an array of two numbers,
        or one value if a 1D transect is desired.

        """ # Make XYZ grid
self
xlims
ylims
dx
dy
z