WDS - Bio-Behavior Analysis Systems'
openly documented digitized data file format
Background
The file extension associated with this standard is .WDS
| Item |
Size |
Type |
Name |
Description |
| 1 |
2 bytes |
unsigned integer |
HDR_SIZE |
The number of bytes in the header. |
| 2 |
2 bytes |
signed integer |
SAMP_SPEC |
Indication of how the sampling is specified.
| 0 |
Implies a sampling interval is specified.
Also implies that the next two items are
3a and 4a. |
| 1 |
Implies a sampling rate is specified.
Also implies that the next two items are
3b and 4b.
(This option is not yet supported.) |
Other values are not yet supported.
|
|
3a
|
2 bytes
|
signed integer
|
INT_UNITS |
Units in which the specified sampling interval are measured.
| 0 |
Implies that the unit of the sampling interval is milliseconds |
| 1 |
Implies that the unit of the sampling interval is microseconds |
The meanings of other values are not yet defined.
|
|
4a
|
2 bytes
|
unsigned integer
|
INTERVAL |
Sampling Interval |
|
3b
|
2 bytes
|
unsigned integer
|
SRN
|
Sampling Rate Numerator1 |
|
4b
|
2 bytes
|
unsigned integer
|
SRD
|
Sampling Rate Denominator1
|
|
5
|
2 bytes
|
unsigned integer
|
BPS
|
Bytes per sample, the number of bytes for each digitized data value in the
file.
(Only 2 byte samples are currently supported.) |
|
6
|
2 bytes
|
unsigned integer
|
FORMAT
|
Indication of the format of the samples in the file.
| 0 |
means signed 2's complement integers |
| 1 |
means unsigned integers
(Not yet supported.) |
The meanings of other values are not yet defined.
|
|
7
|
BPS bytes
|
FORMAT dependent
|
LOW_VAL
|
The Lowest Digitized Value2 |
|
8
|
BPS bytes
|
FORMAT dependent
|
HIGH_VAL |
The Highest Digitized Value2 |
|
9
|
2 bytes
|
unsigned integer
|
NUM_CHANS
|
The number of channels of data in the file |
|
10
|
many bytes
|
FORMAT dependent
|
DATA
|
The data for the channels. This data is interleaved so that channels change
faster than time points.3 Each sample is stored in BPS bytes. |
1 The sampling rate of the file is SRN / SRD samples per channel per
second.
2 The LOW_VAL and HIGH_VAL values will be used to
map the digitized values in the file onto the channel displays. These values
should not be based on a scan of all the values in the file. They should instead
be "absolute" high and low values based on the digitization technique
and hardware.
For example, if a 16-bit digitizer is used to create signed samples, the
LOW_VAL
would be -(2
15) = -32,768 and the
HIGH_VAL would be +(2
15)-1
= 32,767. If a 12-bit digitizer is used to create signed samples, the data file
produced would have a
LOW_VAL of -(2
11) = -2048 and a
HIGH_VAL
of +(2
11)-1 = 2047.
3An example tends to make this more clear. The data in a file
containing 3 samples per channel for 3 channels (0, 1, and 2) would be stored in
the following order.
| Channel |
Sample Number |
| 0 |
1 |
| 1 |
1 |
| 2 |
1 |
| 0 |
2 |
| 1 |
2 |
| 2 |
2 |
| 0 |
3 |
| 1 |
3 |
| 2 |
3 |
Email comments or questions to: tbb(at)BioBehaviorAnalysis.com