Skip to main content

A python module to analyze surface roughness

Project description


PyPI version DOI Documentation Status

surfalize is a python package for analyzing microscope topography measurement data in terms of surface roughness and other topographic parameters. It is intended primarily for microtextured surfaces and is supposed to replace software packages such as MountainsMap, MultiFileAnalyzer and Gwyddion for the most common tasks.

Disclaimer

The authors make no guarantees for the correctness of any results obtained using this package. The package is an early work in progress and may introduce changes to both implementation details and public API at any point in time. Any results should be validated against established software to verify their correctness, especially when they are intended to be used for scientific publications.

Some parts of the package are more mature and some are in early development stage. Currently, Gaussian filtering and Profile parameters might suffer from some implementation errors and might not be entirely compliant with ISO standards. Care should be taken when relying on these specific functionalities.

How to install

To install the latest release of surfalize, run the following command:

pip install surfalize

If you want to build from source, clone this git repository and run the following command in the root folder of the cloned repository.

pip install .

However, you will need to have both Cython and a C-Compiler installed (MSVC on Windows, gcc on Linux, MinGW is not supported currently). If you install in editable mode using

pip install -e .

be aware that a change of the pyx files does not reinvoke the Cython build process.

Documentation

The documentation is hosted on readthedocs.

Currently supported file formats

Manufacturer Format Reading Writing
Keyence .vk4, .vk6, .vk7 Yes No
Leica .plu Yes No
Sensofar .plu, .plux Yes No
Digital Surf .sur Yes Yes
KLA Zeta .zmg Yes No
Wyko .opd Yes No
Nanofocus .nms Yes No
Alicona .al3d Yes Yes
Digital Surf .sdf Yes No
Gwyddion .gwy Yes No
General .xyz Yes No

Supported roughness parameters

This package aims to implement all parameters defined in ISO 25178. Currently, the following parameters are supported:

Category Parameter Full name Validated against
Height Sa Arithmetic mean height Gwyddion, MountainsMap
Sq Root mean square height Gwyddion, MountainsMap
Sp Maximum peak height Gwyddion, MountainsMap
Sv Maximum valley depth Gwyddion, MountainsMap
Sz Maximum height Gwyddion, MountainsMap
Ssk Skewness Gwyddion, MountainsMap
Sku Kurtosis Gwyddion, MountainsMap
Hybrid Sdr1 Developed interfacial area ratio Gwyddion2, MountainsMap
Sdq Root mean square gradient MountainsMap
Spatial Sal Autocorrelation length -
Str Texture aspect ratio -
Functional Sk Core roughness depth MountainsMap
Spk Reduced peak height MountainsMap
Svk Reduced dale height MountainsMap
Smr1 Material ratio 1 MountainsMap
Smr2 Material ratio 2 MountainsMap
Sxp Peak extreme height MountainsMap
Functional (volume) Vmp Peak material volume MountainsMap
Vmc Core material volume MountainsMap
Vvv Dale void volume MountainsMap
Vvc Core void volume MountainsMap

1 Per default, Sdr calculation uses the algorithm proposed by ISO 25178 and also used by MountainsMap By keyword argument, the Gwyddion algorithm can be used instead.
2 Gwyddion does not support Sdr calculation directly, but calculates surface area and projected area.

Supported parameters of 1d-periodic surfaces

Additionally, this package supports the calculation of non-standard parameters for periodic textured surfaces with one- dimensional periodic structures. The following parameters can be calculated:

Parameter Description
Period Dominant spatial period of the 1d-surface texture
Depth Peak-to-valley depth of the 1d-texture profiles
Aspect ratio Ratio of peak-to-valley depth to spatial period
Homogeneity Homogeneity factor (0 < H < 1) calculated from Gini analysis
Orientation Clockwise angle of the dominant texture to the vertical axis

Supported operations

Operation Description
Leveling Subtraction of least squares fit to a plane
Zeroing Sets the lowest datapoint of the surface to zero
Centering Sets the average value of the surface elevation to zero
Zooming Magnifies the surface by a specified factor
Cropping Crops the surface in a specified rectangle
Rotation Rotates the surface by a specified angle in degrees
Alignment Aligns the surface with the dominant texture direction by rotation
Outlier removal Removes outliers outside n standard deviation from the mean
Thresholding Thresholding based on areal material ratio
Filtering Applies a Gaussian highpass, lowpass or bandpass filter

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

surfalize-0.9.1-cp312-cp312-win_amd64.whl (217.8 kB view details)

Uploaded CPython 3.12 Windows x86-64

surfalize-0.9.1-cp311-cp311-win_amd64.whl (215.7 kB view details)

Uploaded CPython 3.11 Windows x86-64

surfalize-0.9.1-cp310-cp310-win_amd64.whl (215.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

surfalize-0.9.1-cp39-cp39-win_amd64.whl (243.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

File details

Details for the file surfalize-0.9.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for surfalize-0.9.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 87f1db0b9e14aba8b656ee01a46f2b688e0753ec1cb61cea43d12249ac803105
MD5 20abac60d7e6422b48d8bc36b6428108
BLAKE2b-256 e9954961d82113bb4c2eacf652f900932d3ed6677703e11d34965a5ebe46463b

See more details on using hashes here.

File details

Details for the file surfalize-0.9.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for surfalize-0.9.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9f941d548c7c1d0444f7368f9e31d6fb416845102612ca24348d775e6c6e4388
MD5 666e0dd395cef0089b37487ce42aa2e3
BLAKE2b-256 3bda46f778954d7a76a795a47322b083fd980063fd7b310cf2113d66bf24dec5

See more details on using hashes here.

File details

Details for the file surfalize-0.9.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for surfalize-0.9.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2b159478a94baf76aeeaa48cd5eb101e6bc0728f204a9b69a444cc800784baac
MD5 f88a0cf1bd398a772f1752d1dc7aaa59
BLAKE2b-256 f9c209728b820cbf58b04a4e2128d6d4eb7d77018acf0a61638f36b652dd6c30

See more details on using hashes here.

File details

Details for the file surfalize-0.9.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: surfalize-0.9.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 243.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for surfalize-0.9.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6a4356dcd3880ca887dec0612731bf232984c3b369e042c22968df177a0a7f9d
MD5 0b67c49d1c9f7b2f41a9a3c5e979328b
BLAKE2b-256 c3dd9481e34362ef22dcf155d555f6153e225ff36d973ff43c94c75098f5117d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page