opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
789 stars 317 forks source link

It would be helpful to alert the user when non-base units are encountered #1598

Open tkuchida opened 7 years ago

tkuchida commented 7 years ago

TimeSeriesTableVec3 markerData = TRCFileAdapter::read(markerDataFilename); can load data from a .trc file with arbitrary units. An API that is aware of units would check for "Units" metadata and, when appropriate, perform a conversion (e.g., mm->m) after loading markerData. It is reasonable to expect OpenSim to do this automatically but it doesn't. Thus, it would be helpful if the user were alerted (a) when loading data in non-base units, or (b) the first time such data are accessed.

tkuchida commented 7 years ago

A similar issue was reported on the Forum: "Experimental Data Preview problem".

klshrinidhi commented 7 years ago

I agree. :+1:

tkuchida commented 7 years ago

@klshrinidhi What do you think about printing 1 line of the most basic info at the end of the XXXFileAdapter::read() methods? Perhaps something like

Read XX rows and XX columns. Units are XX.

for TRCFileAdapter::read()?