Accbin file format #2
(a summary by Wayne Davis) (slightly edited by Leon Avery)
Accbin file format #2 is currently being used in our lab to write
binary data files containing single channel electrophysiological data.
This file format is probably the easiest format to convert any other
binary file into for use by xdatplot. The format consists of:
- The magic number: (offset 0) "accbin format #2(header=1k)"
- The list of channel strings. (offset 27) This is a string
of length 30 and is currently ignored by xdatplot, since xdatplot only
deals with single channel data. It should contain a list of channels
separated by commas, or a range of channels separated by colons.
eg. 1,2,3; or 1:3; or 1,2:5,7.
- Time zero. (offset 57) A four byte floating point
number indicating the start time of the recording. This is not
currently used by xdatplot.
- The channel settings. (offset 61) This
is a group of nine sets of four four-byte floating point numbers. (for
a total of 36 numbers, 144 bytes) These are nine sets of amplifier
settings for nine potential channels. The four numbers for each
channel are (in order): the high limit and low limit of the amplifier,
and the multiplier and offset for the data. Xdatplot currently uses
only the multiplier to convert the binary data into output by
multiplying the binary numbers in the file by the multiplier of the
first channel.
- Reserved. (offset 205) 432 bytes.
- The sampling clock frequency. (offset 637) This is a
four byte floating point number used by xdatplot to set the time
scale. The number should indicate the sampling frequency in Hz.
- The interchannel delay. (offset 641) This four byte
floating point number is not used by xdatplot.
- The user supplied comment. (offset (645) This is a
string to be printed in the comment field by xdatplot.
- Padding. The header should be padded with
nulls to 1000 bytes in size.
- The Data. The data are sets of
binary numbers as referenced elsewhere in this help document.
Integers are two's-complement, and floating-point numbers are
single-precision IEEE. All numbers are most significant byte first.
For example, the floating-point number -1.25 is hexadecimal 3f a0 00
00. The integer -74 is hex ff b6.