SurfaceTopography.Models package
Submodules
SurfaceTopography.Models.SelfAffine module
- class SurfaceTopography.Models.SelfAffine.AbstractStatisticalRoughness
Bases:
object
- power_spectrum()
- power_spectrum_profile()
- class SurfaceTopography.Models.SelfAffine.AbstractIsotropicRoughness
Bases:
AbstractStatisticalRoughness
- power_spectrum_isotropic()
- variance_derivatice()
- class SurfaceTopography.Models.SelfAffine.SelfAffine(cr, rolloff_wavelength, hurst_exponent, longcut_wavelength=inf, shortcut_wavelength=0, unit=None)
Bases:
AbstractIsotropicRoughness
- __init__(cr, rolloff_wavelength, hurst_exponent, longcut_wavelength=inf, shortcut_wavelength=0, unit=None)
- power_spectrum_isotropic(q)
- power_spectrum_profile(q)
- rms_height(shortcut_wavelength=None, longcut_wavelength=None)
See 10.1088/2051-672X/aa51f8 equations 4, 10 and 11
\[h^2_\mathrm{rms} = \frac{C_r q_r^2}{4 \pi} \left[ 1 + \frac{1}{H} - \left( \frac{q_l}{q_r}\right)^2 - \left( \frac{q_s}{q_r}\right)^{-2H}\right]\]Note that \(C_r q_r^2\) can be interchanged with \(C_0 q_r^{-2H}\)
- Parameters:
shortcut_wavelength (float or array, optional) – makes the rms-height scale dependent by overriding the shortcut
longcut_wavelength – makes the rms-height scale dependent by overriding the longcut
- Return type:
float or array
- variance_derivative(order, shortcut_wavelength=None, longcut_wavelength=None)
Variance of a derivative of arbitrary (fractional) order
The contribution for an isotropic flat PSD with amplite \(C_r\) between the wavevectors \([q_L, q_s]\) is
\[\left[h^{(\alpha)}_\mathrm{rms}\right]^2 = \frac{C_r}{2 \pi} \left[ q_s^{2 + 2\alpha } - q_L ^{2 + 2\alpha} \right] / (2 + 2 \alpha)\]The contribution for a power-law PSD between \([q_L, q_s]\)
For \(\alpha \neq H\)
\[\left[h^{(\alpha)}_\mathrm{rms}\right]^2 = \frac{C_0}{2 \pi} \left[ q_s^{ 2\alpha - 2H} - q_L ^{2\alpha - 2H} \right] / (2\alpha - 2 H)\]and for \(\alpha = H\)
\[\left[h^{(\alpha)}_\mathrm{rms}\right]^2 = \frac{C_0}{2 \pi} \ln\left( q_s/ q_L \right)\]Note that \(C_r q_r^2\) can be interchanged with \(C_0 q_r^{-2H}\)
- Parameters:
order (float) – order of the derivative
shortcut_wavelength (float or array, optional) – makes the result scale dependent by overriding the shortcut
longcut_wavelength – makes the result scale dependent by overriding the longcut
- Return type:
float or array
- generate_roughness(pixel_size, n_pixels, seed, shortcut_wavelength=None, longcut_wavelength=None, **kwargs)
Generates a discrete random realisation of Gaussian noise with variances of the waves given by the PSD
The shortcut_wavelength and longcut_wavelength parameters allow to overwrite the values paramtetrized in the model, since a discrete realization is often shorter.
See fourier synthesis for more arguments