Skip to content
Olivier Scholder edited this page Nov 28, 2017 · 19 revisions

Welcome to the pySPM wiki!

pySPM is a python library to handle SPM data. It can read xml fileformat for the moment, but you can import RAW data from any other source and then handle the data with this library.

Documentation

See https://github.com/scholi/pySPM/blob/master/doc/pySPM%20Documentation.ipynb

Fileformat

File structure

The fileformat ITStrF01 is composed by 8-bytes forming the word "ITStrF01" followed by an unknown number of blocks of unknown size. The size can be found in the header of each block. The blocks form a filesystem type where the first block is "root" and its value is a list of children's block. The leaf-blocks are of type 00 19 00 00 00 or 80 19 00 00 00 and contains data.

Block structure

Each block is composed by a header followed by its name and then its value/data.

Block type

Only 4 different types have been encountered in ITA/ITM files. Those are:

Type 00

Those block have no children and the value contains only data. The data type (string/int/float/etc.) is not written in the header. The user should know what is the type of data depending on the block path.

Type 01

Those block are block containing children. Similar to a folder. The value is then composed only of headers defining the name and position of all the children (see Value header and Child header below).

Type 03

Big block are chunked in several smaller blocks. Type 01 are chunks in several blocks and all "Next-Block" are of type 03. The structure is exactly the same as 01 type though.

Type 80 (128 in decimal)

Those blocks have no children and contain data compressed with zlib. It usually stores array of data as a stack of floats.

Value

Value header

Blocks of type 01 and 03 have children. There value thus start with a header composed of 41 bytes.

Child header

The 41 bytes of the value header is then followed by several 33-bytes long block giving info for every children

Supplementary infos

N is usually the number of children. It was found that some block have children with N=0. In this special case, the number of children can be read by "nums" in the value-header.

The blocks after "nums" (green+a+b+c+d+e) are all equal to 0 if there is no Next Block. Otherwise it gives information about NextBlock. It's why the "green" block can only have value of 00 00 00 00 00 or 03 19 00 00 00. c will tell how many children are present in the Next-Block. d seems to be in the same range as the size, but not exactly equal to it. We don't use those information as it's redundant and those can be read in the header of the Next-Block.

Clone this wiki locally