Binary Type E uses single precision floats for time values.

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
Don White
Posts: 2
Joined: Thu May 24, 2007 4:45 pm

Binary Type E uses single precision floats for time values.

Post by Don White »

For type E binary plot files, long recordings at high rates cause time values that exceed the resolution of the single precision time values specified by the format.
It cannot properly represent time values with a mantissa that is too large.
Example using a recording rate of 50K samples per second, the interval is 0.00002 seconds. If your data goes longer than 100 seconds, the mantissa of your time value will exceed the number of significant digits of a single precision float. 100.00002 seconds cannot be represented by a single precision float time value. It resolves to approximately 100.000023 Seconds.

The ideal solution (for data with high precision sample rates) would be a binary type C format that can handle an arbitrary starting time and multiple channels. (ASCII is just too cumbersome for some huge recordings)

ie
dx
start_time_in_seconds
channel_count // ie 'n' channels will be interlaced in this format
y1[1],y2[1],...yn[1],y1[2],y2[2],...yn[2],etc

example for 2 channels of data y1=.5,.6,.7,.8 and y2=1.5,1.6,1.7,1.8 with a starting time of 120.5 seconds and and interval (dx) of 0.00002 the file would look as follows ...

0.00002
120.5
2
.5,1.5,.6,1.6,.7,1.7,.8,1.8

Don
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

A repeat of e-mail reply:

I know you mentioned "Type E" in our phone conversation but it didn't register with me until reading your mail. Just noticed your post on the forums, and you obviously already figured out the problem. There *is* a plugin that handles double precision nicely (Raw data), but unfortunately doesn't allow you to specify a start time (just number of records and sample rate). I can easily modify that plugin or create a new format, but in your case my guess is you already have a file format that your recorder produces that I could write a reader for. If so, and if you'll give me some details on the format, I'm sure I can come up with a file import plugin fairly quickly.
Visualize Your Data
support@dplot.com
Don White
Posts: 2
Joined: Thu May 24, 2007 4:45 pm

Binary Type E uses single precision floats for time values

Post by Don White »

I will send email with the format for the Pacific Instruments BEU format.

Thanks for the fast response!

Don
Post Reply