Beispiel #1
0
    def correlation(self, r):
        r"""Truncated-Power-Law with Stable modes - correlation function.

        If ``len_low=0`` we have a simple representation:

        .. math::
           \rho(r) =
           \frac{2H}{\alpha} \cdot
           E_{1+\frac{2H}{\alpha}}
           \left[
           \left(\frac{r}{\ell}\right)^{\alpha}
           \right]

        The general case:

        .. math::
           \rho(r) =
           \frac{2H}{\alpha} \cdot
           \frac{\ell_{\mathrm{up}}^{2H} \cdot
           E_{1+\frac{2H}{\alpha}}
           \left[\left(\frac{r}{\ell_{\mathrm{up}}}\right)^{\alpha}\right]
           - \ell_{\mathrm{low}}^{2H} \cdot
           E_{1+\frac{2H}{\alpha}}
           \left[\left(\frac{r}{\ell_{\mathrm{low}}}\right)^{\alpha}\right]}
           {\ell_{\mathrm{up}}^{2H}-\ell_{\mathrm{low}}^{2H}}
        """
        # if lower limit is 0 we use the simplified version (faster)
        if np.isclose(self.len_low, 0.0):
            return tplstable_cor(r, self.len_scale, self.hurst, self.alpha)
        return (self.len_up**(2 * self.hurst) *
                tplstable_cor(r, self.len_up, self.hurst, self.alpha) -
                self.len_low**(2 * self.hurst) *
                tplstable_cor(r, self.len_low, self.hurst, self.alpha)) / (
                    self.len_up**(2 * self.hurst) -
                    self.len_low**(2 * self.hurst))
Beispiel #2
0
 def correlation(self, r):
     """TPL with Stable modes - correlation function."""
     # if lower limit is 0 we use the simplified version (faster)
     if np.isclose(self.len_low_rescaled, 0.0):
         return tplstable_cor(r, self.len_rescaled, self.hurst, self.alpha)
     return (self.len_up_rescaled**(2 * self.hurst) * tplstable_cor(
         r, self.len_up_rescaled, self.hurst, self.alpha) -
             self.len_low_rescaled**(2 * self.hurst) *
             tplstable_cor(r, self.len_low_rescaled, self.hurst, self.alpha)
             ) / (self.len_up_rescaled**(2 * self.hurst) -
                  self.len_low_rescaled**(2 * self.hurst))
Beispiel #3
0
 def cor(self, h):
     """TPL with Stable modes - normalized correlation function."""
     return tplstable_cor(h, 1.0, self.hurst, self.alpha)
Beispiel #4
0
 def cor(self, h):
     """TPL with Exponential modes - normalized correlation function."""
     return tplstable_cor(h, 1.0, self.hurst, 1)
Beispiel #5
0
 def cor(self, h):
     """TPL with Gaussian modes - normalized correlation function."""
     return tplstable_cor(h, 1.0, self.hurst, 2)