Skip to main content

A python module to analyze surface roughness

Project description


PyPI version Documentation Status Publication

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.

Cite this library

If you publish data generated with this library, please consider citing this publication:

F. Schell, C. Zwahr, A. F. Lasagni. Surfalize: A Python Library for Surface Topography and Roughness Analysis Designed for Periodic Surface Structures. Nanomaterials. 2024, 13, 1076.

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 Yes
Gwyddion .gwy Yes No
Digital Metrology .os3d 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.10.0-cp312-cp312-win_amd64.whl (223.6 kB view details)

Uploaded CPython 3.12 Windows x86-64

surfalize-0.10.0-cp311-cp311-win_amd64.whl (221.5 kB view details)

Uploaded CPython 3.11 Windows x86-64

surfalize-0.10.0-cp310-cp310-win_amd64.whl (221.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

surfalize-0.10.0-cp39-cp39-win_amd64.whl (248.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

File details

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

File metadata

File hashes

Hashes for surfalize-0.10.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 79f5557d8dbfb2df596337769be67f74ff347302bc343b3575b3f7c45aeecb90
MD5 1ebc44c2394818a5b3ff12449c4e3a1f
BLAKE2b-256 c09a49f499acde582aaf05fcd1944c7d4ee5cb5cf17d3ad4c4f319176955274c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for surfalize-0.10.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2ba97ef618354bc67557d56d94e5459b50d1d207a06647f6f16dcbcfa530957c
MD5 cc7d32dbbe08a00e28c491e5795d1c02
BLAKE2b-256 05ea7ea1d9ddff733a54736b203777abf6cee761f72eebcadeacfeb973cfca95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for surfalize-0.10.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a8ad701271ade34722ae3cd77fe60e51f10db58e8e68eafc7d488f0f656b3273
MD5 5750d136d5ed7799795a1bd5e217f3c1
BLAKE2b-256 682a83741c69cba55eae538a3faf79f8decd9406afc23876f952eecf5c5262f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for surfalize-0.10.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 592554a2d743e068e0908c73c8675cf8b8026dbf79bea948764779abd26411f6
MD5 6da5b6a1d00e5f74e70ced3ec1406e49
BLAKE2b-256 dfd713388cf14955c66b912ac8804109c6b0e666c83ecd941b7b9647b322c88e

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