IMU (.imu)#

Contains functions for resampling, processing and correcting IMU data.

worklab.imu.change_imu_orientation(sessiondata, inplace=False)[source]#

Changes IMU orientation from in-wheel to on-wheel

Parameters:
  • sessiondata (dict) – original sessiondata structure

  • inplace (bool) – perform operation inplace

Returns:

sessiondata – sessiondata with reoriented gyroscope data

Return type:

dict

worklab.imu.movesense_offset(sessiondata, n_sensors=2, right_wheel=True, gyro_offset=False)[source]#

Remove offset MoveSense sensors

Parameters:
  • sessiondata (dict) – resampled sessiondata structure

  • right_wheel (boolean) – if set to True, right wheel is used, if set to False, left wheel is used

  • n_sensors (float) – number of sensors used, 2: right wheel and frame, 3: right, left wheel and frame

  • gyro_offset (boolean) – if set to True, an additional gyroscope offset will be used

Returns:

sessiondata – sessiondata with offset removed

Return type:

dict

worklab.imu.process_imu(sessiondata, camber=18, wsize=0.32, wbase=0.8, n_sensors=3, sensor_type='ngimu', inplace=False)[source]#

Calculate wheelchair kinematic variables based on NGIMU data

Parameters:
  • sessiondata (dict) – original sessiondata structure

  • camber (float) – camber angle in degrees

  • wsize (float) – radius of the wheels

  • wbase (float) – width of wheelbase

  • n_sensors (float) – number of sensors used: 2: right wheel and frame, 3: right, left wheel and frame

  • sensor_type (string) – type of sensor, ‘ngimu’ or ‘ximu3’ is for xio-technologies, ‘move’ is for movesense

  • inplace (bool) – performs operation inplace

Returns:

sessiondata – sessiondata structure with processed data

Return type:

dict

worklab.imu.process_imu_left(sessiondata, camber=18, wsize=0.32, wbase=0.8, sensor_type='ngimu', inplace=False)[source]#

Calculate wheelchair kinematic variables based on NGIMU data

Parameters:
  • sessiondata (dict) – original sessiondata structure

  • camber (float) – camber angle in degrees

  • wsize (float) – radius of the wheels

  • wbase (float) – width of wheelbase

  • sensor_type (string) – type of sensor, ‘ngimu’ or ‘ximu3’ is xio-technologies, ‘move’ is movesense

  • inplace (bool) – performs operation inplace

Returns:

sessiondata – sessiondata structure with processed data

Return type:

dict

worklab.imu.push_imu(acceleration, sfreq=400.0)[source]#

Push detection based on velocity signal of IMU on a wheelchair.

Parameters:
  • acceleration (np.array, pd.Series) – acceleration data structure

  • sfreq (float) – sampling frequency

Return type:

push_idx, acc_filt, n_pushes, cycle_time, push_freq

References

van der Slikke, R., Berger, M., Bregman, D., & Veeger, D. (2016). Push characteristics in wheelchair court sport sprinting. Procedia engineering, 147, 730-734.

worklab.imu.resample_imu(sessiondata, sfreq=400.0)[source]#

Resample all devices and sensors to new sample frequency.

Resamples all devices and sensors to new sample frequency. Sample intervals are not fixed with ngimu so resampling before further analysis is recommended. Translated from xio-Technologies.

Parameters:
  • sessiondata (dict) – original session data structure to be resampled

  • sfreq (float) – new intended sample frequency

Returns:

sessiondata – resampled session data structure

Return type:

dict

References

xioTechnologies/NGIMU-MATLAB-Import-Logged-Data-Example