'Non-float data format:\n%s' % pprint.pformat(chan_info)
data = numpy.frombuffer(
buffer(f.read()),
- dtype=numpy.dtype(numpy.float32).newbyteorder('>'),
- # Is JPK data always big endian? I can't find a config
- # setting. The ForceRobot brochure
- # http://www.jpk.com/forcerobot300-1.download.6d694150f14773dc76bc0c3a8a6dd0e8.pdf
- # lists a PowerPC chip on page 4, under Control
- # electronics, and PPCs are usually big endian.
- # http://en.wikipedia.org/wiki/PowerPC#Endian_modes
- )
+ dtype=numpy.dtype(numpy.float32).newbyteorder('>'))
+ # '>' (big endian) byte order.
+ # From version 0.3 of JPKForceSpec.txt in the "Binary data" section:
+ # All forms of raw data are stored in chronological order
+ # (the order in which they were collected), and the
+ # individual values are stored in network byte order
+ # (big-endian). The data type used to store the data is
+ # specified by the "channel.*.data.type" property, and is
+ # either short (2 bytes per value), integer (4 bytes), or
+ # float (4 bytes, IEEE format).
f.close()
return data