Extending the supported file formats is a continuous work in progress. If
The following file formats are supported. Please click on a file format name in order to expand the description for that format:
SurfaceTopography information can be provided as coordinate data. This is a text file that contains either two columns (for line scans) or three columns (for two-dimensional topographies) of data. The parser does not support reading header information. Units can therefore not be provided directly within this file format.
Line scans can be provided on a non-uniform grid. The x-coordinates do not need to be equally spaced and the surface specified in this format can be reentrant. The code interprets such topographies as piecewise linear between the points that are specified in the file.
Two-dimensional topography maps need to reside on a regular grid. The x- and y-coordinates need to be equally spaced.
SurfaceTopography data stored in plain text (ASCII) format needs to be stored in a matrix format. Each row contains the height information for subsequent points in x-direction separated by a whitespace. The next row belong to the following y-coordinate. Note that if the file has three or less columns, it will be interpreted as a topography stored in a coordinate format (the three columns contain the x, y and z coordinates of the same points). The smallest topography that can be provided in this format is therefore 4 x 1.
The reader supports parsing file headers for additional metadata. This allows to specify the physical size of the topography and the unit. In particular, it supports reading ASCII files exported from SPIP and Gwyddion.
When writing your own ASCII files, we recommend to prepent the header with a '#'. The following file is an example that contains 4 x 3 data points:
# Channel: Main
# Width: 10 µm
# Height: 10 µm
# Value units: m
1.0 2.0 3.0 4.0
5.0 6.0 7.0 8.0
9.0 10.0 11.0 12.0
Digital Instruments Nanoscope (also Veeco Nanoscope and Bruker Dimension) files typically have a three-digit number as the file extension (.001, .002, .003, ...). Newer versions of this file format have the extension .spm. This format contains information on the physical size of the topography map as well as its units. The reader supports V4.3 and later version of the format.
Imports topography data stored in MATLAB workspace files. The reader automatically extracts all 2D arrays stored in the file and interprets those as height information. Matlab files do not store units or physical sizes. These need to be manually provided by the user.
Files generated by the Vision software of the Bruker Wyko white-light interferometer.
File format of the Bruker Dektak XT* series stylus profilometer.
X3P is a container format conforming to the ISO 5436-2 (Geometrical Product Specifications — Surface texture) standard. The format is defined in ISO 25178 and is a standardized format for the exchange of surface topography data. The full specification of the format can be found here.
Igor binary wave is a container format of the Igor Pro language. This format is used by AFMs from Asylum Research (now Oxford Instruments) to store topography information. This format contains information on the physical size of the topography map as well as its units.
Agilent Technologies (Molecular Imaging) AFM saves filed in the MI format. This format contains information on the physical size of the topography map as well as its units.
Load topography information stored as Excel spreadsheet by Mitutoyo SurfTest surface roughness testers.
This reader reads topography data contained in a
NetCDF container. The
reader looks for a variable named heights
containing a two-dimensional
array that is interpreted as height information. The respective dimensions are
named x
and y
.
The reader additionally looks for two (optional) variables x
and y
that
contain the x- and y-coordinates of the first and second index of the height
arrays. The attribute length
of x
and y
must contain the physical size
in the respective direction. The optional attribute length_unit
of these
variables describes the physical unit. The optional additional attribute
periodic
indicates whether the direction contains periodic data. If
periodic
is missing, the reader interprets the data as non-periodic.
If an additional variable mask
is present, this variable is used to mark
undefined points.
An example file layout (output of ncdump -h
) containing a topography map
with 128 x 128 pixels looks like this:
netcdf test_nc_file {
dimensions:
x = 128 ;
y = 128 ;
variables:
double x(x) ;
x:length = 3 ;
x:periodic = 1 ;
x:unit = "um" ;
double y(y) ;
y:length = 3 ;
y:periodic = 1 ;
y:unit = "um" ;
double heights(x, y) ;
heights:unit = "um" ;
}
The following code snippets reads the file and displays the topography data as a two-dimensional color map in Python:
import numpy as np
import matplotlib.pyplot as plt
from scipy.io.netcdf import netcdf_file
nc = netcdf_file('test.nc')
heights = np.array(nc.variables['heights'][...])
x = np.array(nc.variables['x'][...])
y = np.array(nc.variables['y'][...])
unit = nc.variables['x'].unit
plt.figure()
plt.subplot(aspect=1)
plt.pcolormesh(x, y, heights.T)
plt.show()
Import filter for HDF5 files provided
within the contact mechanics challenge. The reader looks for a two-dimensional
array named surface
. HDF5 files do not store units or physical sizes. These
need to be manually provided by the user.
The original contact mechanics challenge data can be downloaded here.
Load topography information stored as a numpy array. The numpy array format is specified here. The reader expects a two-dimensional array and interprets it as a map of heights. Numpy arrays do not store units or physical sizes. These need to be manually provided by the user.
TIFF-based file format of Park Systems instruments.
This reader imports Digital Surf SUR data files.
VK3, VK4, VK6 and VK7 file formats of the Keyence laser confocal microscope.
This reader open ZON files that are written by some Keyence instruments.
AL3D format of Alicona Imaging.
NanoSurf easyScan data file with typical file extension .ezd/.nid
BCR-STM and BCRF file formats
This reader imports Zygo MetroPro data files.
Data format of the NASA shuttle radar topography mission that recorded the ' earths topography. More information can be found here.