View previous topic :: View next topic |
Author |
Message |
raswaim
Joined: 06 Jan 2005 Posts: 69 Location: Houston, TX
|
Posted: Thu Jan 06, 2005 3:52 pm Post subject: Double Precision Data in Plugin File Reader |
|
|
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 |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Thu Jan 06, 2005 6:03 pm Post subject: |
|
|
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 |
|
|
raswaim
Joined: 06 Jan 2005 Posts: 69 Location: Houston, TX
|
Posted: Thu Jan 06, 2005 9:14 pm Post subject: |
|
|
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 |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Thu Jan 06, 2005 9:37 pm Post subject: |
|
|
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 |
|
|
|