biomechzoo 0.4.0__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of biomechzoo might be problematic. Click here for more details.
- {biomechzoo-0.4.0/src/biomechzoo.egg-info → biomechzoo-0.4.1}/PKG-INFO +1 -1
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/pyproject.toml +1 -1
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/conversion/mvnx2zoo_data.py +18 -7
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/mvn/load_mvnx.py +2 -2
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/mvn/main_mvnx.py +1 -1
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/mvn/mvnx_file_accessor.py +1 -1
- {biomechzoo-0.4.0 → biomechzoo-0.4.1/src/biomechzoo.egg-info}/PKG-INFO +1 -1
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/LICENSE +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/README.md +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/setup.cfg +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/__init__.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/__main__.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/biomech_ops/__init__.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/biomech_ops/continuous_relative_phase_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/biomech_ops/continuous_relative_phase_line.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/biomech_ops/filter_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/biomech_ops/filter_line.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/biomech_ops/normalize_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/biomech_ops/normalize_line.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/biomech_ops/phase_angle_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/biomech_ops/phase_angle_line.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/biomechzoo.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/conversion/__init__.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/conversion/c3d2zoo_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/conversion/csv2zoo_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/conversion/opencap2zoo_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/mvn/__init__.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/mvn/mvn.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/processing/__init__.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/processing/add_channel_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/processing/addchannel_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/processing/addevent_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/processing/explodechannel_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/processing/partition_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/processing/removechannel_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/processing/renamechannel_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/processing/renameevent_data.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/processing/split_trial_by_gait_cycle.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/utils/__init__.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/utils/batchdisp.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/utils/compute_sampling_rate_from_time.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/utils/engine.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/utils/findfield.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/utils/get_split_events.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/utils/split_trial.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/utils/zload.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/utils/zplot.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/utils/zsave.py +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo.egg-info/SOURCES.txt +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo.egg-info/dependency_links.txt +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo.egg-info/entry_points.txt +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo.egg-info/requires.txt +0 -0
- {biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import numpy as np
|
|
2
|
-
from
|
|
3
|
-
from
|
|
2
|
+
from biomechzoo.mvn.load_mvnx import load_mvnx
|
|
3
|
+
from biomechzoo.mvn.mvn import JOINTS, SEGMENTS
|
|
4
4
|
|
|
5
5
|
def mvnx2zoo_data(fl):
|
|
6
6
|
""" loads mvnx file from xsens"""
|
|
@@ -15,7 +15,7 @@ def mvnx2zoo_data(fl):
|
|
|
15
15
|
try:
|
|
16
16
|
r = mvnx_file.get_joint_angle(joint=key)
|
|
17
17
|
data[val] = {
|
|
18
|
-
'line': r,
|
|
18
|
+
'line': np.array(r),
|
|
19
19
|
'event': {}
|
|
20
20
|
}
|
|
21
21
|
except KeyError:
|
|
@@ -25,8 +25,9 @@ def mvnx2zoo_data(fl):
|
|
|
25
25
|
for key, val in SEGMENTS.items():
|
|
26
26
|
try:
|
|
27
27
|
r = mvnx_file.get_sensor_ori(segment=key)
|
|
28
|
+
|
|
28
29
|
data[val] = {
|
|
29
|
-
'line': r,
|
|
30
|
+
'line': np.array(r),
|
|
30
31
|
'event': {}
|
|
31
32
|
}
|
|
32
33
|
except KeyError:
|
|
@@ -40,6 +41,17 @@ def mvnx2zoo_data(fl):
|
|
|
40
41
|
|
|
41
42
|
return data
|
|
42
43
|
|
|
44
|
+
def is_valid_for_zoo(val):
|
|
45
|
+
"""
|
|
46
|
+
Returns True if the value is valid for a MATLAB-compatible zoo structure.
|
|
47
|
+
"""
|
|
48
|
+
if val is None:
|
|
49
|
+
return False
|
|
50
|
+
if isinstance(val, list) and len(val) == 0:
|
|
51
|
+
return False
|
|
52
|
+
if isinstance(val, np.ndarray) and val.size == 0:
|
|
53
|
+
return False
|
|
54
|
+
return True
|
|
43
55
|
|
|
44
56
|
def _get_meta_info(mvnx_file, data):
|
|
45
57
|
# todo: add more, see mvnx_file object
|
|
@@ -51,7 +63,6 @@ def _get_meta_info(mvnx_file, data):
|
|
|
51
63
|
data['zoosystem']['recording_date'] = mvnx_file.recording_date
|
|
52
64
|
data['zoosystem']['original_file_name'] = mvnx_file.original_file_name
|
|
53
65
|
data['zoosystem']['frame_count'] = mvnx_file.frame_count
|
|
54
|
-
data['zoosystem']['comments'] = mvnx_file.comments
|
|
55
66
|
return data
|
|
56
67
|
|
|
57
68
|
|
|
@@ -75,7 +86,7 @@ def _get_foot_strike_events(mvnx_file, data):
|
|
|
75
86
|
if LHeel[i - 1] == 0 and LHeel[i] == 1:
|
|
76
87
|
hs_l.append(i)
|
|
77
88
|
|
|
78
|
-
|
|
89
|
+
# add to event branch of any channel
|
|
79
90
|
if 'jL5S1' in data:
|
|
80
91
|
ch = 'jL5S1'
|
|
81
92
|
else:
|
|
@@ -97,6 +108,6 @@ if __name__ == '__main__':
|
|
|
97
108
|
from src.biomechzoo.utils.zplot import zplot
|
|
98
109
|
# -------TESTING--------
|
|
99
110
|
project_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
|
|
100
|
-
fl = os.path.join(project_root, 'data', 'other', '
|
|
111
|
+
fl = os.path.join(project_root, 'data', 'other', 'Flat001.mvnx')
|
|
101
112
|
data = mvnx2zoo_data(fl)
|
|
102
113
|
zplot(data, 'jRightKnee')
|
|
@@ -6,8 +6,8 @@ Script to load an mvnx
|
|
|
6
6
|
import xml.etree.ElementTree as ET
|
|
7
7
|
import collections
|
|
8
8
|
import numpy as np
|
|
9
|
-
from
|
|
10
|
-
from
|
|
9
|
+
from biomechzoo.mvn.mvnx_file_accessor import MvnxFileAccessor
|
|
10
|
+
from biomechzoo.mvn import mvn
|
|
11
11
|
|
|
12
12
|
# Xml namespace for mvnx files
|
|
13
13
|
ns = {'mvn': 'http://www.xsens.com/mvn/mvnx'}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/biomech_ops/continuous_relative_phase_data.py
RENAMED
|
File without changes
|
{biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/biomech_ops/continuous_relative_phase_line.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/processing/split_trial_by_gait_cycle.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{biomechzoo-0.4.0 → biomechzoo-0.4.1}/src/biomechzoo/utils/compute_sampling_rate_from_time.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|