QUB writes five kinds of files: sampled data, idealized data, session info, model files, and acquisition protocols.

Sampled data

The simplest sampled data format is DAT, which contains only the samples (no headers).

LDT is the classic QUB data format. It has a single channel of segmented data.

QDF is the most complete format. It has multiple channels of segmented data.

Idealized data

A DWT file contains one or more segments of events (dwells). An event is when the channel stays in one conductance level (class) for some amount of time (duration). So, for example, a DWT segment might record that it was closed for 20 ms, open for 10 ms, then closed for 15 ms:
0     20.0
1     10.0
0     15.0

Session info

Each data file can have an associated QSF (session) file, which is stored in the same folder, with the same name but different extension. Session files keep track of:

Data scaling

Sampled data is stored as integers, but is interpreted as floating point values. Each file has a "Scaling" factor which transforms integers into Volts. If the Scaling is not in the data file (e.g. DAT), it is read from the session file or input by the user.

Voltages may stand for another quantity such as picoAmps. Each data channel has an additional scaling factor, "DataChannelScaling", which transforms Volts into "DataChannelUnits". DataChannelScaling is stored in the session file (SessionFile:DataChannels:Channel:Scaling). To interpret data as Volts, use DataChannelScaling = 1.0.

x Units = v Volts / DataChannelScaling
v Volts = intdata / Scaling

so

x Units = intdata / (Scaling * DataChannelScaling)
intdata = Round( x Units * DataChannelScaling * Scaling )

Model files

QUB has two model formats: the classic MDL and the newer QMF. MDL files are ASCII text. They're good for interchange because the format has been stable for years. QMF files are binary qubtree files. They are extensible -- newer programs can store additional information without breaking backwards compatibility -- but fewer programs can read them.

Acquisition protocols

A QPF file stores a succession of parametrized shapes. The shapes are defined as Python scripts, with an optional icon in QUB\ProtocolShapes\shapename.ico.

qubtree

qubtree is a file format for arbitrary tree-structured data. QDF, QSF, QMF, and QPF are all stored as QUB trees. We provide a library and header files for working with QUB trees in Python, C++, and Delphi.