Bug 135038

Summary: Add support for units in vectors
Product: [Applications] kst Reporter: Nicolas Brisset <nicolas.brisset>
Component: generalAssignee: kst
Status: RESOLVED FIXED    
Severity: wishlist CC: arwalker
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: unspecified   
OS: Solaris   
Latest Commit: Version Fixed In:

Description Nicolas Brisset 2006-10-03 10:49:38 UTC
Version:           1.3.0 (using KDE 3.4.0, compiled sources)
Compiler:          gcc version 3.4.3
OS:                SunOS (sun4u) release 5.8

I think it is *essential* to be able to manage units when plotting curves. It would hence give kst a nice professional touch if vectors got a new "unit" property, which would be used throughout kst:
- to generate X/Y labels
- in legend text
- to perform automatic conversions (curve->RMB->convert->to [list of relevant units based on the Y vector's unit])
- ...

I think a couple of new virtual functions in kstdatasource could be added (virtual bool vectorsHaveUnits() const; etc...), for those datasources that support it. ASCII files can have units in a separate line (it is the case with our legacy ASCII format, which is why I had originally included it in my first version of the ASCII config dialog), CDF or netCDF variables often have a "unit" attribute, etc...  
Then, in a first step we could generate label names with 'field + " (" + unit + ")"' if units are available. That would already be a very nice feature :-)
I'd be willing to prepare a patch to add support for units in ASCII, CDF, netCDF datasources...

Are current users (other than me :-)) actually asking for this ? I can't imagine Planck and Blast experiments handling unitless data... how are people actually working right now ?
Comment 1 Andrew Walker 2009-04-14 20:25:30 UTC
This ability was added in revision 934274 (version 1.8.0), to the base KstDataSource.

If there are any specific data sources that units should be added to please submit a new wishlist report.