ABF1 files (unlike ABF2 files) use a fixed-length header and values are always
at the same byte positions in the file. This document was created to simplify
the task of finding ABF1 byte offsets. It was created from data found in the
CHM file distributed as part of the ABF1 SDK and from
abfheadr.h.
While the byte offsets are not useful for ABF2 files, the definitions are.
👉 Review the Unofficial Guide to the ABF File Format for a more extensive description of the ABF1 and ABF2 file format, with code examples for how to read structured data from binary files using Python.
File type used for format identification. Possible values are: “ABF “, “CLPX” and “FTCX”. Used to create the numbers in nFileType. (In old pCLAMP and Axotape data files, the first four bytes were a float: 1 = CLAMPEX, 10 = FETCHEX/AxoTape. This is translated on reading into either CLPX or FTCX as appropriate.)
4
fFileVersionNumber
float
File format version stored in the data file during acquisition. The present version is 1.65. (In old pCLAMP and Axotape data files, this parameter is in the range 2.0–5.3.)
Actual number of ADC samples (aggregate) in data file. See lAcqLength. Averaged sweeps are included.
14
nNumPointsIgnored
short
Number of points ignored at data start. Normally zero, but non-zero for gap-free acquisition using AXOLAB configurations with one or more ADS boards.
16
lActualEpisodes
long
Actual number of sweeps in the file including averaged sweeps. See lEpisodesPerRun. If nOperationMode = 3 (gap-free) the value of this parameter is 1.
20
lFileStartDate
long
Date when data portion of this file was first written to. Stored as YYMMDD. If YY is in the range 80–99, prefix with “19” to get the year. If YY is in the range 00–79, prefix with “20” to get the year.
24
lFileStartTime
long
Time of day in seconds past midnight when data portion of this file was first written to.
28
lStopwatchTime
long
Time since the stopwatch was zeroed that the data portion of this file was first written to. Not supported by all programs. Default = 0.
32
fHeaderVersionNumber
float
Version number of the header structure returned by the ABF_ReadOpen function. Currently 1.65. This parameter does not identify the data file format. See fFileVersionNumber above.
36
nFileType
short
Numeric equivalent of file type. 1 = ABF file; 2 = Old FETCHEX file (FTCX); 3 = Old Clampex file (CLPX). See sFileType.
38
nMSBinFormat
short
Storage method for real numbers in the header. Also see nDataFormat. 0 = IEEE format; 1 = Microsoft Binary format (old files only).
short channel_count_acquired; // number of input channels acquired
short nADCNumChannels; // number of input channels recorded
/**
* The two sample intervals must be an integer multiple (or submultiple) of each other.
* The documentation says these two sample intervals are the interval between multiplexed samples, but not all digitisers work like that.
* Instead, these are the per-channel sample rate divided by the number of channels.
* If the user chose 100uS and has two channels, this value will be 50uS.
*/float fADCSampleInterval;
float fADCSecondSampleInterval;
float fSynchTimeUnit;
float fSecondsPerRun;
/**
* The total number of samples per episode, for the recorded channels only.
* This does not include channels which are acquired but not recorded.
* This is the number of samples per episode per channel, times the number of recorded channels.
* If you want the samples per episode for one channel, you must divide this by get_channel_count_recorded().
*/
ABFLONG lNumSamplesPerEpisode;
ABFLONG lPreTriggerSamples;
ABFLONG lEpisodesPerRun;
ABFLONG lRunsPerTrial;
ABFLONG lNumberOfTrials;
short nAveragingMode;
short nUndoRunCount;
short nFirstEpisodeInRun;
float fTriggerThreshold;
short nTriggerSource;
short nTriggerAction;
short nTriggerPolarity;
float fScopeOutputInterval;
float fEpisodeStartToStart;
float fRunStartToStart;
float fTrialStartToStart;
ABFLONG lAverageCount;
ABFLONG lClockChange;
short nAutoTriggerStrategy;
Strategy for the drawing of raw data: 0 = not at all; 1 = update immediately as data is acquired; 2 = update at the end of each sweep or trace; 3 = update at the end of each run;
Experiment type: 0 = Voltage Clamp; 1 = Current Clamp.
262
_nAutosampleEnable
short
Do not use: see Extended Environmental Information. Enable storage of autosample information: 0 = Disabled; 1 = Automatic; 2 = Manual.
264
_nAutosampleADCNum
short
Do not use: see Extended Environmental Information. Physical ADC channel number to which autosampled parameters apply.
266
_nAutosampleInstrument
short
Do not use: see Extended Environmental Information. Note: for most programs this is an information-only field. For example, in Clampex the autosample instrument is chosen as a configuration item and copied into this field.
268
_fAutosampleAdditGain
float
Do not use: see Extended Environmental Information. Additional gain multiplier of Instrument connected to nAutosampleADCNum. (Optionally autosampled by some acquisition programs.) (Default = 1.)
272
_fAutosampleFilter
float
Do not use: see Extended Environmental Information. Lowpass filter cutoff frequency of Instrument connected to nAutosampleADCNum. (Optionally autosampled by some acquisition programs.) (Default = 100000.)
276
_fAutosampleMembraneCap
float
Do not use: see Extended Environmental Information. Patch-clamp membrane capacitance compensation. (Optionally autosampled by some acquisition programs.)
280
nManualInfoStrategy
short
Strategy for writing the manually entered information: 0 = Do not write; 1 = Write each trial; 2 = Prompt each trial.
282
fCellID1
float
Numeric identifier #1, e.g. cell identifier.
286
fCellID2
float
Numeric identifier #2, e.g. temperature in °C.
290
fCellID3
float
Numeric identifier #3.
294
sCreatorInfo
16char
Name and version of program used to create the file. For example, “AxoTape 2.0” or “Clampex 6.0”.
310
_sFileComment
56char
Do not use: see Extended Environmental Information. 56 byte ASCII comment string.
ADC physical-to-logical channel map. The entries are in the physical order 0, 1, 2,…, 14, 15. If there are fewer than 16 logical channels in the system, the array is padded with -1. All channels supported by the hardware are present, even if only a subset is used. For example, for the TL-2 the entries would be 7, 6, 5, 4, 3, 2, 1, 0, -1,…, -1.
410
nADCSamplingSeq(0-15)
short
ADC channel sampling sequence. This is the order in which the physical ADC channels are sampled. If fewer than the maximum number of channels are sampled, pad with -1. For example, if two channels are sampled on the TL-2, this array will contain 6, 7, -1,…, -1. If two channels are sampled on the TL-1, this array will contain 14, 15, -1,…, -1.
442
sADCChannelName(0-15)
10char
ADC channel name in physical channel number order. Default = spaces.
602
sADCUnits(0-15)
8char
The user units for ADC channels in physical channel number order. Default = spaces.
730
fADCProgrammableGain(0-15)
float
ADC programmable gain in physical channel number order (dimensionless). Default = 1.
794
fADCDisplayAmplification(0-15)
float
ADC channel display amplification in physical channel number order (dimensionless). Default = 1.
858
fADCDisplayOffset(0-15)
float
ADC channel display offset in physical channel number order (user units). Default = 0.
922
fInstrumentScaleFactor(0-15)
float
Instrument scale factor in physical ADC channel number order (Volts at ADC / user unit). (Programs would normally display this information to the user as user units / volt at ADC).
986
fInstrumentOffset(0-15)
float
Instrument offset in physical ADC channel number order (user units corresponding to 0 V at the ADC). Default is zero.
1050
fSignalGain(0-15)
float
Signal conditioner gain in physical ADC channel number order (dimensionless). Default = 1.
1114
fSignalOffset(0-15)
float
Signal conditioner offset in physical ADC channel number order (user units). Default = 0.
1178
fSignalLowpassFilter(0-15)
float
Signal-conditioner lowpass filter corner frequency in physical ADC channel number order (Hz). 100000 means lowpass filter is bypassed (i.e. wideband). Default = 100000.
1242
fSignalHighpassFilter(0-15)
float
Signal-conditioner highpass filter corner frequency in physical ADC channel number order (Hz). 0 means highpass filter is bypassed (i.e. DC coupled). -1 means inputs are grounded. Default = 0.
1306
sDACChannelName(0-3)
10char
DAC channel name. Default = spaces.
1346
sDACChannelUnits(0-3)
8char
The user units for this DAC channel. Default = spaces.
1378
fDACScaleFactor(0-3)
float
DAC channel gain (user units / V at DAC). Default = 1.
Synchronous timer outputs were dropped from pCLAMP version 6. These parameters
have been kept in the ABF 1.0 specification for compatibility when reading old
data files. New programs should write zeros to all of the parameters in this
group.
Do not use: see Extended Epoch Waveform and Pulses. Analog waveform source: 0 = Disable; 1 = Generate waveform from epoch definition; 2 = Generate waveform from a DAC file.
1440
nActiveDACChannel
short
Active DAC channel, i.e. the one used for waveform generation.
1442
_nInterEpisodeLevel
short
Do not use: see Extended Epoch Waveform and Pulses. Inter-sweep holding level: 0 = Use holding level; 1 = Use last epoch amplitude.
1444
_nEpochType(0-9)
short
Do not use: see Extended Epoch Waveform and Pulses. Epoch type: 0 = Disabled; 1 = Step; 2 = Ramp.
1464
_fEpochInitLevel(0-9)
float
Do not use: see Extended Epoch Waveform and Pulses. Epoch initial level (user units).
1504
_fEpochLevelInc(0-9)
float
Do not use: see Extended Epoch Waveform and Pulses. Epoch level increment (user units).
1544
_nEpochInitDuration(0-9)
short
Do not use: see Extended Epoch Waveform and Pulses. Epoch initial duration (in sequence counts).
1564
_nEpochDurationInc(0-9)
short
Do not use: see Extended Epoch Waveform and Pulses. Epoch duration increment (in sequence counts).
1584
nDigitalHolding
short
Holding value for digital output.
1586
nDigitalInterEpisode
short
Inter-sweep digital holding value: 0 = Use holding value; 1 = Use last epoch value.
1588
nDigitalValue(0-9)
short
Epoch value for digital output (0…15).
1608
sUnavailable1608 (was fWaveformOffset)
4char
Do not use. This parameter was used by CLAMPFIT 6.0. Offset (in active DAC user units) in instrument command pathway, usually due to a non-zero holding potential or current.
short _nAutopeakEnable;
short _nAutopeakPolarity;
short _nAutopeakADCNum;
short _nAutopeakSearchMode;
ABFLONG _lAutopeakStart;
ABFLONG _lAutopeakEnd;
short _nAutopeakSmoothing;
short _nAutopeakBaseline;
short _nAutopeakAverage;
char sUnavailable1866[2]; // Was nAutopeakSaveStrategy, use nStatisticsSaveStrategy
ABFLONG _lAutopeakBaselineStart;
ABFLONG _lAutopeakBaselineEnd;
ABFLONG _lAutopeakMeasurements;
short _nPNEnable;
short nPNPosition;
short _nPNPolarity;
short nPNNumPulses;
short _nPNADCNum;
float _fPNHoldingLevel;
float fPNSettlingTime;
float fPNInterpulse;
char sUnused009[12];
Do not use: see Extended Variable Parameter User List. Parameter list activation status: 0 = Disable; 1 = Enable.
1968
nBellEnable(0-1)
short
Auditory tone activation status: 0 = Disable; 1 = Enable.
1972
nBellLocation(0-1)
short
Location of bell relative to trial: 0 = Before; 1 = After.
1976
nBellRepetitions(0-1)
short
Number of sounds to produce.
1980
nLevelHysteresis
short
Amount of level hysteresis to use when detecting events. This is the amount that the data has to go past the trigger level before it is considered triggered. Re-arming of the trigger level is always done at the actual nominated trigger level (see fTriggerThreshold).
1982
lTimeHysteresis
long
Amount of time hysteresis to use when detecting events. This is the number of samples that have to be below the trigger point before the trigger is said to be rearmed.
1986
nAllowExternalTags
short
0 = Do not scan for external tags during acquisition. 1 = Scan for external tags.
1988
nLowpassFilterType(0-15)
char
Type of Low Pass filter for each ADC channel: 0 = None; 1 = External; 2 = Simple RC; 3 = Bessell; 4 = Butterworth.
2004
nHighpassFilterType(0-15)
char
Type of High Pass filter for each ADC channel: 0 = None; 1 = External; 2 = Simple RC; 3 = Bessell; 4 = Butterworth.
2020
nAverageAlgorithm
short
Algorithm used for calculating averages: 0 = Cumulative Averaging; 1 = Most Recent Averaging (uses fAverageWeighting below).
2022
fAverageWeighting
float
Weighting Factor for Most Recent Averaging. This is the proportion of the incoming sweep to include in the average.
2026
nUndoPromptStrategy
short
Strategy for Prompting to create an Undo file: 0 = On Abort; 1 = Always.
Analog waveform source: 0 = Disable; 1 = Generate waveform from epoch definitions; 2 = Generate waveform from a DAC file.
2304
nInterEpisodeLevel(0-1)
2short
Inter-sweep holding level: 0 = Use holding level; 1 = Use last epoch amplitude.
2308
nEpochType(0-1) (0-9)
20short
Epoch type: 0 = Disabled; 1 = Step; 2 = Ramp.Indexes: analog out waveform, epoch number.
2348
fEpochInitLevel(0-1) (0-9)
20float
Epoch initial level (user units).
2428
fEpochLevelInc(0-1) (0-9)
20float
Epoch level increment (user units).
2508
lEpochInitDuration(0-1) (0-9)
20long
Epoch initial duration (in sequence counts).
2588
lEpochDurationInc(0-1) (0-9)
20long
Epoch duration increment (in sequence counts).
2668
nDigitalTrainValue(0-9)
10short
Epoch duration increment in physical DAC channel order then epoch order (in sequence counts)
2688
nDigitalTrainActiveLogic
short
Epoch value for digital train output in epoch order. 0000 = Disabled; 0*000 = Generates digital train on bit 3. Train period and pulse width can be controlled by the user list.
Sweep (or column) number to replay from waveforms: -1 = all except the first (which is skipped), repeating last if necessary; 0 = all sweeps; N = sweep number.
2732
nDACFileADCNum(0-1)
2short
Logical ADC channel number to replay from waveform file.
2736
sDACFilePath(0-1)
412char
File path and name of DAC file containing waveform data. Must be ABF or ATF format.
Parameter list activation status: 0 = Disable; 1 = Enable.
3368
nULParamToVary (0-3)
4short
Holds the index of the parameter that varies from sweep to sweep in one run.
3376
sULParamValueList (0-3)
1024char
List of comma-separated values. If the number of entries in the list is fewer than the requested number of sweeps, the last list value is re-used. If there are more values in the list, the excess list values are ignored.
4400
nULRepeat(0-3)
4short
Repeat the list when the current sweep exceeds the number of entries in the list. 0 = Disable, 1 = Repeat the list.
Additional gain multiplier of Instrument. (Default = 1.)Index: ADC channel
4640
fTelegraphFilter(0-15)
16float
Lowpass filter cutoff frequency of Instrument connected to nAutosampleADCNum. (Optionally autosampled by some acquisition programs.) (Default = 100000.)Index: ADC channel
4704
fTelegraphMembraneCap(0-15)
16float
Patch-clamp membrane capacitance compensation.
4768
nTelegraphMode(0-15)
16short
I-Clamp or V-Clamp mode. Currently this field is supported only for MultiClamp
4800
nTelegraphDACScaleFactorEnable(0-3)
16short
Determines whether fDACScaleFactor was telegraphed: 1 = telegraphed; 0 = not telegraphed
4808
sUnused016a
24char
Unused.
4832
nAutoAnalyseEnable
short
Enable auto-analyze
4834
sAutoAnalysisMacroName
64char
Name of auto-analysis macro.
4898
sProtocolPath
256char
File path of protocol.
5154
sFileComment
128char
128 byte ASCII comment string.
5282
FileGUID
16char
FileGUID struct.
5298
fInstrumentHoldingLevel
16float
Instrument holding level
5314
ulFileCRC
long
File CRC value, probably unused for later versions.
short nStatsEnable;
unsignedshort nStatsActiveChannels; // Active stats channel bit flag
unsignedshort nStatsSearchRegionFlags; // Active stats region bit flag
short nStatsSelectedRegion;
short _nStatsSearchMode;
short nStatsSmoothing;
short nStatsSmoothingEnable;
short nStatsBaseline;
ABFLONG lStatsBaselineStart;
ABFLONG lStatsBaselineEnd;
ABFLONG lStatsMeasurements[ABF_STATS_REGIONS]; // Measurement bit flag for each region ABF_STATS_REGIONS == 8
ABFLONG lStatsStart[ABF_STATS_REGIONS];
ABFLONG lStatsEnd[ABF_STATS_REGIONS];
short nRiseBottomPercentile[ABF_STATS_REGIONS];
short nRiseTopPercentile[ABF_STATS_REGIONS];
short nDecayBottomPercentile[ABF_STATS_REGIONS];
short nDecayTopPercentile[ABF_STATS_REGIONS];
short nStatsChannelPolarity[ABF_ADCCOUNT];
short nStatsSearchMode[ABF_STATS_REGIONS]; // Stats mode per region: mode is cursor region, epoch etc
char sUnused018[156];
IHS-1 telegraphs are not supported. Note: for most programs this is an
information-only field. For example, in Clampex the autosample instrument is
chosen as a configuration item and copied into this field.
char sEpochResistanceSignalName[ABF_WAVEFORMCOUNT][ABF_ADCNAMELEN];
short nEpochResistanceState[ABF_WAVEFORMCOUNT];
char sUnused022[16]; // TODO remove??
short nAlternateDACOutputState;
short nAlternateDigitalValue[ABF_EPOCHCOUNT];
short nAlternateDigitalTrainValue[ABF_EPOCHCOUNT];
short nAlternateDigitalOutputState;
char sUnused023[14];
The ABF Synch array is an important array that stores the start time and length
of each portion of the data if the data are not part of a continuous gap-free
acquisition. The data section might contain equal length or variable length
sweeps of data. The Synch Array contains a record to indicate the start time
and length of every sweep or Event in the data file. The ABF reading routines
automatically decode the Synch Array when providing information about the data.
A Synch array is created and used in the following acquisition modes:
ABF_VARLENEVENTS, ABF_FIXLENEVENTS & ABF_HIGHSPEEDOSC. The acquisition modes
ABF_GAPFREEFILE and ABF_WAVEFORMFILE do not always use a Synch array.
During an acquisition, some programs allow the user to tag points of interest
in the input data stream. These tags are saved in the Tag Section. Each tag
consists of a time stamp, a text comment, and a tag type identifier. If the tag
is a voice tag, the data is held in an ABFVoiceTagInfo struct.
ABFTag Structure:
Offset
Header Entry Name
Type
Description
0
lTagTime
long
Time at which the tag was entered in fSynchTimeUnit units.
4
sComment
56char
Optional comment to describe the tag.
60
nTagType
short
Type of tag. Valid types are ABF_TIMETAG=0, ABF_COMMENTTAG=1, ABF_EXTERNALTAG=2, ABF_VOICETAG=3.
62
nVoiceTagNumber
short
If nTagType=ABF_VOICETAG, this is the number of this voice tag.
When acquisition parameters are changed during an acquisition, the changes are
tracked and entered in the ABF deltas section. Each entry is time stamped in
fSynchTimeUnit units, so that the value of the parameter can be determined at
any point during the acquisition.
Offset
Header Entry Name
Type
Description
0
lDeltaTime
long
Time at which the parameter was changed in fSynchTimeUnit units.
4
lParameterID
long
Identifier for the parameter changed. Legal parameter values are: ABF_DELTA_XXXXXXXX.
8
lNewParamValue fNewParamValue
long float
Depending on the value of lParameterID this entry may be either a float or a long.