pymks/datasets/microstructure_generator.py
def _assign_phases(self, X_blur):
        """
        Takes in blurred array and assigns phase values.

        Args:
          X_blur: random field that has be blurred by a convolution.
        Returns:
          microstructure with assigned phases
        """
        epsilon = 1e-5
        X0, X1 = np.min(X_blur), np.max(X_blur)
        Xphases = float(self.n_phases) * (X_blur - X0) / (X1 - X0) * \
                                         (1. - epsilon) + epsilon
        return np.floor(Xphases)

        Takes in blurred array and assigns phase values.

        Args:
          X_blur: random field that has be blurred by a convolution.
        Returns:
          microstructure with assigned phases
        
Takes in blurred array and assigns phase values.
Takes in blurred array and assigns phase values .
def _assign_phases(self, X_blur):
        epsilon = 1e-5
        X0, X1 = np.min(X_blur), np.max(X_blur)
        Xphases = float(self.n_phases) * (X_blur - X0) / (X1 - X0) * \
                                         (1. - epsilon) + epsilon
        return np.floor(Xphases)
def _assign_phases ( self , X_blur ) : epsilon = 1e-5 X0 , X1 = np . min ( X_blur ) , np . max ( X_blur ) Xphases = float ( self . n_phases ) * ( X_blur - X0 ) / ( X1 - X0 ) * ( 1. - epsilon ) + epsilon return np . floor ( Xphases )
Takes in blurred array and assigns phase values.
Takes in blurred array and assigns phase values .
"""
        Takes in blurred array and assigns phase values.

        Args:
          X_blur: random field that has be blurred by a convolution.
        Returns:
          microstructure with assigned phases
        """
microstructure with assigned phases
microstructure with assigned phases
self
X_blur
random field that has be blurred by a convolution.
random field that has be blurred by a convolution .