Autocorrelation Function¶
- class surfalize.autocorrelation.AutocorrelationFunction(surface)¶
Bases:
CachedInstanceRepresents the 2d autocorrelation function of a Surface object and provides methods to calculate the autocorrelation length Sal and texture aspect ratio Str.
- Parameters:
- surfaceSurface
Surface object on which to calculate the 2d autocorrelation function.
Methods
Sal([s])Calculates the autocorrelation length Sal.
Str([s])Calculates the texture aspect ratio Str.
clear_cache()Clears the cache for the entire instance.
create_cache_entry(method, entry, args, kwargs)Manually creates a cache entry for the specified method.
calculate_autocorrelation
plot_autocorrelation
- Sal(s=0.2)¶
Calculates the autocorrelation length Sal. Sal represents the horizontal distance of the f_ACF(tx,ty) which has the fastest decay to a specified value s, with 0 < s < 1. s represents the fraction of the maximum value of the autocorrelation function. The default value for s is 0.2 according to ISO 25178-3.
- Parameters:
- sfloat
threshold value below which the data is considered to be uncorrelated. The point of fastest and slowest decay are calculated respective to the threshold value, to which the autocorrelation function decays. The threshold s is a fraction of the maximum value of the autocorrelation function.
- Returns:
- Salfloat
autocorrelation length.
- Str(s=0.2)¶
Calculates the texture aspect ratio Str. Str represents the ratio of the horizontal distance of the f_ACF(tx,ty) which has the fastest decay to a specified value s to the horizontal distance of the fACF(tx,ty) which has the slowest decay to s, with 0 < s < 1. s represents the fraction of the maximum value of the autocorrelation function. The default value for s is 0.2 according to ISO 25178-3.
- Parameters:
- sfloat
threshold value below which the data is considered to be uncorrelated. The point of fastest and slowest decay are calculated respective to the threshold value, to which the autocorrelation function decays. The threshold s is a fraction of the maximum value of the autocorrelation function.
- Returns:
- Strfloat
texture aspect ratio.
- calculate_autocorrelation()¶
- plot_autocorrelation(ax=None, cmap='jet', show_cbar=True)¶