Skip to content

ContactEngineering/SurfaceTopography

Repository files navigation

Build Status

Ask DeepWiki

SurfaceTopography

Read and analyze surface topographies with Python. This code implements basic classes for handling uniform and nonuniform surface topography data. It contains a rich set of import filters for experimental surface topography data. Surface topographies can be easily analyzed using standard (rms height, power spectrum, ...) and some special purpose (autocorrelation function, variable bandwidth analysis, ...) statistical techniques.

Quick Start

from SurfaceTopography import read_topography

# Read a topography file (format is auto-detected)
topography = read_topography('surface.opd')

# Get basic properties
print(f"Grid size: {topography.nb_grid_pts}")
print(f"Physical size: {topography.physical_sizes}")
print(f"RMS height: {topography.rms_height_from_area()}")

# Compute the power spectral density (PSD)
q, psd = topography.power_spectrum_from_profile()

# Compute the autocorrelation function (ACF)
r, acf = topography.autocorrelation_from_profile()

# Plot the topography
import matplotlib.pyplot as plt
plt.pcolormesh(*topography.positions_and_heights())
plt.colorbar(label='Height')
plt.show()

Supported File Formats

SurfaceTopography supports over 35 file formats from commercial surface profilometers:

Format Description
al3d Alicona AL3D files
asc ASCII text files (generic)
bcr BCR-STM files
datx Zygo DATX files
di Digital Instruments / Bruker AFM files
ezd Nanosurf EZD files
frt FRT profilometer files
gwy Gwyddion GWY files
h5 HDF5 files
hgt NASA SRTM HGT elevation files
ibw Igor Pro binary wave files (Asylum Research)
jpk JPK Instruments files
lext Olympus LEXT files
mat MATLAB .mat files
metropro Zygo MetroPro files
mi Park Systems / Molecular Imaging files
mitutoyo Mitutoyo surface roughness files
mnt Digital Surf Mountains MNT files
nc NetCDF files
nmm PTB NMM files
nms Nanofocus NMS files
npy NumPy binary files
oir Olympus OIR files
opd Wyko OPD files
opdx Wyko OPDx files
os3d Digital Metrology OmniSurf3D files
plu Sensofar PLU files
plux Sensofar PLUX files
poir Olympus POIR (zip) files
ps Keyence profilometer files
sdf ISO 25178-71 SDF files
sur Digital Surf SUR files
tmd TrueMap TMD files
vk Keyence VK files
wsxm WSxM files
x3p ISO 25178-72 X3P files
xyz XYZ point cloud files
zmg KLA Zeta ZMG files
zon Keyence ZON files

If you use this code, please cite:

Documentation

This README file contains a brief introduction into the code. The full documentation can be found at https://contactengineering.github.io/SurfaceTopography/.

Installation

Detailed instruction for the installation are provided in the documentation. If you want to install from source you need to run git submodule update --init after a fresh checkout.

The most basic configuration of SurfaceTopography installs all requirements autonomously python3 -m pip install SurfaceTopgography

If you need an editable install (e.g. for development purposes), make sure you disable build isolation:

python3 -m pip install --no-build-isolation -e .

You need to manually install ninja, meson-python, pytest, runtests, DiscoverVersion and numpy before:

python3 -m pip install ninja meson-python pytest runtests DiscoverVersion numpy

Funding

Development of this project is funded by the European Research Council within Starting Grant 757343 and by the Deutsche Forschungsgemeinschaft within projects PA 2023/2 and EXC 2193.

About

Read and analyze surface topographies

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 13

Languages