Page 1 of 1

How to use OpenSim::TableUtilities::resample?

Posted: Mon Apr 17, 2023 9:10 am
by kernalnet
Hi,

I want to resmaple a TimeSeriesTable and found OpenSim::TableUtilities::resample on Doxygen, but I don't know how to use it. TableUtilities doesn't have resample method in Python:

Code: Select all

In [29]: dir(osim.TableUtilities())

['__class__',
 '__delattr__',
 '__dict__',
 '__dir__',
 '__doc__',
 '__eq__',
 '__format__',
 '__ge__',
 '__getattribute__',
 '__gt__',
 '__hash__',
 '__init__',
 '__init_subclass__',
 '__le__',
 '__lt__',
 '__module__',
 '__ne__',
 '__new__',
 '__reduce__',
 '__reduce_ex__',
 '__repr__',
 '__setattr__',
 '__sizeof__',
 '__str__',
 '__subclasshook__',
 '__swig_destroy__',
 '__weakref__',
 'checkNonUniqueLabels',
 'convertRotationsToEulerAngles',
 'filterLowpass',
 'findStateLabelIndex',
 'isInDegrees',
 'pad',
 'this',
 'thisown']
I'm also aware of OpenSim::Storage::resample and the conversion between Strorage and TimeSeriesTable. But I prefer to work with TimeSeriesTable rather than Storage.

Any help is greatly appreciated.
Mohammadreza

Re: How to use OpenSim::TableUtilities::resample?

Posted: Wed Apr 26, 2023 9:13 am
by kernalnet
Any suggestion?

Re: How to use OpenSim::TableUtilities::resample?

Posted: Wed Apr 26, 2023 9:29 am
by aymanh
Hi Mohammadreza,

The method is actually a template in C++ and we didn't expose specific specialization for it when exposing the class to python or java bindings, I opened an issue on github to keep track as this is more of an API issue and we can discuss what possible solutions/workaround exist there.

Thanks for reporting,
-Ayman

Re: How to use OpenSim::TableUtilities::resample?

Posted: Wed Apr 26, 2023 9:36 am
by kernalnet
Thanks Ayman, I'm looking forward this feature in your new release.