You are here: Reference Guide > BCR-STM File Format > BCR-STM File Format

BCR-STM File Format

The BCR-STM file format has been developed by the partners, within the project ``Scanning Tunneling Microscopy (STM) methods for roughness and micro hardness measurements Contract No 3423/1/0/184/4/91-BCR-DK(30)'' for easy exchange of SPM files independent of the instruments used

The header is minimum 2048 characters long and written in either ASCII or Unicode characters, which can be edited by a text editor. For Unicode formats the minimum header is 4096 bytes long while it is 2048 for ASCII formats. For SPIP version 4..6.3 and higher the header size can be longer and it is given by the headersize tag, see below. The first line identifies the format and should be one of the following:

fileformat = bcrstm or

fileformat = bcrf

fileformat = bcrstm_unicode

fileformat = bcrf_unicode

 

The "bcrstm" and “bcrstm unicode” formats identifies the data following the header to be in 16 bit integer format while the "bcrf" and “bcrf unicode” formats identifies the data as being in 32 bit floating point. The “bcrstm” and “bcrstm unicode” formats are saved with the “.bcr” extension in the filename and the “bcrf” and “bcrf Unicode” files are saved with the “.bcrf” Extension.

Since version 4.2 bcr files are written in the Unicode formats but the old ASCII based formats can still be read.

 

headersize defines the size of the header in number of characters. For Unicode formats the number of bytes equals the header size times two. If the headersize tag is missing the size of the header is 2048 characters (=4096 bytes in Unicode)

xpixels and ypixels defines the number of pixels in the image.
xlength and ylength defines the scanning range in the given unit.

xunit, yunit and zunit units for the three axes. If not defined nm will be the default unit.
xlabel, ylabel and zlabel labels for the three axes.
current defines the tunneling current in nA (optional)
bias defines the bias voltage in V (optional).
starttime defines the starting time of the scanning (MM DD YY hh:mm:ss:hh) (optional).

scanspeed is measured in nm/sec (optional).
intelmode = 1 indicates that the binary data is written in Little Endian byte order used by Intel processors in PCs.
intelmode = 0 indicates that the data is written in Big Endian byte order typically used by UNIX workstations and Motorola processors.
forcecurve = 1 indicates that the data contain force curves with the approach curve followed by the retraction curve (optional)

bit2nm is the scale factor for scaling the integer height data to nm.
xoffset and yoffset defines physical offset in nm (optional).
voidpixels defines the number of void pixels, if the field is not present the number is set to zero. For the 16 bit integer bcrstm format void pixels should be set equal to 32767. For the 32 bit floating point bcrf format void pixels are set to 3.402823466E+38.


Comments can be written by starting the line with'%'' or '#'

Since version 5.1 it is possible to read and write scatter (x,y) data. Such data is defined by the data tag:

The binary data will be stored with all the x-coordinate values first followed by the y-coordinates. The data length will equal xpixels.

 

For scatter (x,y) data stored as 16 bit integers (.bcr format) the following parameters are used for calculating the physical x, y coordinates. For the .bcrf formats those parameters are not needed as the physical values are given directly.

xmin defines the physical minimum x value of the data

ymin defines the physical minimum y value of the data

bitstepx defines the physical x value per bit increment

 

 

It is possible to integrate new parameters for your own use. SPIP do currently only recognizes the above parameters and will ignore other parameters.

If you want to extend the number of parameters and want the SPIP program to make use of them please contact support@imagemet.com.

 

 

fileformat = bcrstm Unicode
headersize = 2048
xpixels = 256
ypixels = 256
xlength = 88000.0
ylength = 88000.0
xunit = nm
yunit = nm
zunit = nm
xlabel = x-position
ylabel = y-position
zlabel = height
current = 10.0
bias= 0.1
starttime = 10 18 93 16:15:55:99
scanspeed = 10.1
intelmode = 1
bit2nm = 0.0592512
xoffset = 0.0
yoffset = 0.0
voidpixels = 0

# This is a comment
# the size of the header is 2048 characters = 4096 bytes
# the size of the data is xpixels * ypixels * 2 bytes
# the size of the file is 2048 * 2 + xpixels * ypixels * 2 bytes

% this is also a comment

 

Example of a BCR file header, 2048 characters (4096 bytes) are reserved for the header, xpixels x ypixels 16 bit integer data follows just after the characters first bytes.

of