[Title1]
Label11: Value11
Label12: Value12
... ...
Label1n: Value1n
[Title2]
Label21: Value21
Label22: Value22
... ...
Label2m: Value2m
...
...
...
[TitleX]
LabelX1: ValueX1
LabelX2: ValueX2
... ...
LabelXz: ValueXz
[Header end]
binary data
The PreHeader consists of three lines:
This is a very simple header that specifies only the most important data for an image to be processed (please note that some features will not work properly if any of these parameters is missing in an image. Therefore setting them to incorrect values is better than not setting them at all):
WSxM file copyright Nanotec Electronica
SxM Image file
Image header size: 417
[Control]
Signal Gain: 1
X Amplitude: 100 nm
Y Amplitude: 100 nm
Z Gain: 1
[General Info]
Head type: STM
Number of columns: 512
Number of rows: 512
Z Amplitude: 100 nm
[Head Settings]
Preamp Gain: 1000 mV/nA
X Calibration: 1 Å/V
Z Calibration: 1 Å/V
[Header end]
Signal Gain: It is used for converting the volt-based data to topography data. You can use 1 if you don't know its value.
X Amplitude: It is the X axis Amplitude of the sample, is displayed in real units .
Y Amplitude: It is the Y axis Amplitude of the sample, is displayed in real units .
Z Gain: It is used for converting the volt-based data to topography data. You can use 1 if you don't know about its value.
Head Type: This is typically AFM or STM, but it can take other values like "SNOM" or "Interferometer". It informs about the type of head used when acquiring an image.
Number of columns & Number of rows: These two fields define the size of the data matrix. They are essential for both reading and writing a WSxM image.
Z Amplitude: This is the Z axis Amplitude of the sample, it is displayed in real units and it is essential for a lot of the processing.
Preamp Gain: This is only used in STM for converting the volts-based data to topography data. You can use 1000 mV/nA if you don't know its value.
X Calibration: This is used for converting the volts-based data to length units. You can use 1 Å/V if you don't know its value.
Z Calibration: This is used for converting the volts-based data to length units. You can use 1 Å/V if you don't know its value.
The data described above is only a small part of all the data you can visualise in a WSxM file. However it is the most important part, and the only part you will need in most cases. After reading the header data that you need, you will have to read the data. There are two ways to find where data starts to be displayed: the first is to begin reading after the Image Header Size number of bytes, and the second one is to begin reading after finding [Header end]. Both are useful to get you into the data. The data is read as a matrix Number of columns x Number of rows two-bytes data.
Units management: WSxM uses internally an advanced units management system, so if a field appears in nm, it could appear as well in Ã… or µm . Sometimes it could be important to take care of this.