pytrax/__RandomWalk__.py
def _build_big_image(self, num_copies=0):
        r'''
        Build the big image by flipping and stacking along each axis a number
        of times on both sides of the image to keep the original in the center

        Parameters
        ----------
        num_copies: int
            the number of times to copy the image along each axis
        '''
        big_im = self.im.copy()
        func = [np.vstack, np.hstack, np.dstack]
        temp_im = self.im.copy()
        for ax in tqdm(range(self.dim), desc='building big image'):
            flip_im = np.flip(temp_im, ax)
            for c in range(num_copies):
                if c % 2 == 0:
                    # Place one flipped copy either side
                    big_im = func[ax]((big_im, flip_im))
                    big_im = func[ax]((flip_im, big_im))
                else:
                    # Place one original copy either side
                    big_im = func[ax]((big_im, temp_im))
                    big_im = func[ax]((temp_im, big_im))
            # Update image to copy for next axis
            temp_im = big_im.copy()
        return big_im
r'''
        Build the big image by flipping and stacking along each axis a number
        of times on both sides of the image to keep the original in the center

        Parameters
        ----------
        num_copies: int
            the number of times to copy the image along each axis
        
r'''
Build the big image by flipping and stacking along each axis a number
of times on both sides of the image to keep the original in the center

Parameters

int
the number of times to copy the image along each axis
r ' ' ' Build the big image by flipping and stacking along each axis a number of times on both sides of the image to keep the original in the center Parameters int the number of times to copy the image along each axis
def _build_big_image(self, num_copies=0):
        big_im = self.im.copy()
        func = [np.vstack, np.hstack, np.dstack]
        temp_im = self.im.copy()
        for ax in tqdm(range(self.dim), desc='building big image'):
            flip_im = np.flip(temp_im, ax)
            for c in range(num_copies):
                if c % 2 == 0:
                    big_im = func[ax]((big_im, flip_im))
                    big_im = func[ax]((flip_im, big_im))
                else:
                    big_im = func[ax]((big_im, temp_im))
                    big_im = func[ax]((temp_im, big_im))
            temp_im = big_im.copy()
        return big_im
def _build_big_image ( self , num_copies = 0 ) : big_im = self . im . copy ( ) func = [ np . vstack , np . hstack , np . dstack ] temp_im = self . im . copy ( ) for ax in tqdm ( range ( self . dim ) , desc = 'building big image' ) : flip_im = np . flip ( temp_im , ax ) for c in range ( num_copies ) : if c % 2 == 0 : big_im = func [ ax ] ( ( big_im , flip_im ) ) big_im = func [ ax ] ( ( flip_im , big_im ) ) else : big_im = func [ ax ] ( ( big_im , temp_im ) ) big_im = func [ ax ] ( ( temp_im , big_im ) ) temp_im = big_im . copy ( ) return big_im
r'''
Build the big image by flipping and stacking along each axis a number
of times on both sides of the image to keep the original in the center
r ' ' ' Build the big image by flipping and stacking along each axis a number of times on both sides of the image to keep the original in the center
r'''
        Build the big image by flipping and stacking along each axis a number
        of times on both sides of the image to keep the original in the center

        Parameters
        ----------
        num_copies: int
            the number of times to copy the image along each axis
        ''' # Place one flipped copy either side # Place one original copy either side # Update image to copy for next axis
self
num_copies