DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Double Precision Data in Plugin File Reader

 
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions
View previous topic :: View next topic  
Author Message
raswaim



Joined: 06 Jan 2005
Posts: 69
Location: Houston, TX

PostPosted: Thu Jan 06, 2005 3:52 pm    Post subject: Double Precision Data in Plugin File Reader Reply with quote

Is there an interface to pass double precision values into dplot through the plugin/dlls? I've written a plugin for my data format, but I require finer time resolution for the x-axis than is possible with the float data type.... It appears that you must be using 'double' in your built-in readers already.

Thanks - RAS
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Thu Jan 06, 2005 6:03 pm    Post subject: Reply with quote

Yes, though now that you mention it I notice that I haven't updated the plugin examples properly. I'll do that late tonight. In the meantime, the short version is:

#define PLUGIN_DOUBLES 32L

In plugin_init, return DataType as the actual data type + PLUGIN_DOUBLES.

In plugin_readfile the only difference is that the last 2 arguments are (double *) rather than (float *).
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
raswaim



Joined: 06 Jan 2005
Posts: 69
Location: Houston, TX

PostPosted: Thu Jan 06, 2005 9:14 pm    Post subject: Reply with quote

Excellent - with the added PLUGIN_DOUBLES flag and changed return types I'm up to the required precision. Thanks.

On a related question, is DATA_XYYY really not a valid plugin data type (as indicated in the example plugin comments)? My (very long) data files effectively consist of a number of synchronously sampled channels, and it seems a shame to have to take up space for the storage of redundant X values. Do you store redundant X values internally when you read a multicolumn ASCII/CSV file?
_________________
- RAS
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Thu Jan 06, 2005 9:37 pm    Post subject: Reply with quote

You're welcome. Glad it worked out easily.

Yes, DATA_XYYY isn't valid (nor is DATA_DXY). You guessed correctly: all of those redundant X values are stored in DPlot regardless of the data source, so nothing would be gained by using either of those 2 formats. All X values are stored because to do otherwise would become a bookkeeping problem - think appending other files, pasting data, truncating or otherwise operating on only one curve, etc.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group