biomechzoo 0.4.9__py3-none-any.whl → 0.4.10__py3-none-any.whl
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/biomechzoo.py +4 -4
- biomechzoo/processing/addevent_data.py +10 -0
- {biomechzoo-0.4.9.dist-info → biomechzoo-0.4.10.dist-info}/METADATA +2 -1
- {biomechzoo-0.4.9.dist-info → biomechzoo-0.4.10.dist-info}/RECORD +8 -8
- {biomechzoo-0.4.9.dist-info → biomechzoo-0.4.10.dist-info}/WHEEL +0 -0
- {biomechzoo-0.4.9.dist-info → biomechzoo-0.4.10.dist-info}/entry_points.txt +0 -0
- {biomechzoo-0.4.9.dist-info → biomechzoo-0.4.10.dist-info}/licenses/LICENSE +0 -0
- {biomechzoo-0.4.9.dist-info → biomechzoo-0.4.10.dist-info}/top_level.txt +0 -0
biomechzoo/biomechzoo.py
CHANGED
|
@@ -8,7 +8,7 @@ from biomechzoo.utils.batchdisp import batchdisp
|
|
|
8
8
|
from biomechzoo.utils.get_split_events import get_split_events
|
|
9
9
|
from biomechzoo.utils.split_trial import split_trial
|
|
10
10
|
from biomechzoo.conversion.c3d2zoo_data import c3d2zoo_data
|
|
11
|
-
from biomechzoo.conversion.
|
|
11
|
+
from biomechzoo.conversion.table2zoo_data import table2zoo_data
|
|
12
12
|
from biomechzoo.conversion.mvnx2zoo_data import mvnx2zoo_data
|
|
13
13
|
from biomechzoo.processing.removechannel_data import removechannel_data
|
|
14
14
|
from biomechzoo.processing.renamechannel_data import renamechannel_data
|
|
@@ -306,7 +306,7 @@ class BiomechZoo:
|
|
|
306
306
|
# Update self.folder after processing
|
|
307
307
|
self._update_folder(out_folder, inplace, in_folder)
|
|
308
308
|
|
|
309
|
-
def addevent(self, ch,
|
|
309
|
+
def addevent(self, ch, event_type, event_name, out_folder=None, inplace=None):
|
|
310
310
|
""" adds events of type evt_type with name evt_name to channel ch """
|
|
311
311
|
start_time = time.time()
|
|
312
312
|
verbose = self.verbose
|
|
@@ -316,9 +316,9 @@ class BiomechZoo:
|
|
|
316
316
|
fl = engine(in_folder, extension='.zoo', name_contains=self.name_contains, subfolders=self.subfolders)
|
|
317
317
|
for f in fl:
|
|
318
318
|
if verbose:
|
|
319
|
-
batchdisp('adding event {} to channel {} for {}'.format(
|
|
319
|
+
batchdisp('adding event {} to channel {} for {}'.format(event_type, ch, f), level=2, verbose=verbose)
|
|
320
320
|
data = zload(f)
|
|
321
|
-
data = addevent_data(data, ch,
|
|
321
|
+
data = addevent_data(data, ch, event_type, event_name)
|
|
322
322
|
zsave(f, data, inplace=inplace, out_folder=out_folder, root_folder=in_folder)
|
|
323
323
|
method_name = inspect.currentframe().f_code.co_name
|
|
324
324
|
batchdisp('{} process complete for {} file(s) in {:.2f} secs'.format(method_name, len(fl), time.time() - start_time), level=1, verbose=verbose)
|
|
@@ -37,6 +37,11 @@ def addevent_data(data, ch, ename, etype):
|
|
|
37
37
|
elif etype == 'rom':
|
|
38
38
|
eyd = float(np.max(yd) - np.min(yd))
|
|
39
39
|
exd = 0 # dummy index (like MATLAB version)
|
|
40
|
+
elif etype == 'max_stance':
|
|
41
|
+
# special event for gait and running
|
|
42
|
+
exd = max_stance(yd)
|
|
43
|
+
eyd = float(yd[exd])
|
|
44
|
+
eyd = float(yd[exd])
|
|
40
45
|
else:
|
|
41
46
|
raise ValueError(f'Unknown event type: {etype}')
|
|
42
47
|
|
|
@@ -44,3 +49,8 @@ def addevent_data(data, ch, ename, etype):
|
|
|
44
49
|
data[channel]['event'][ename] = [exd, eyd, 0]
|
|
45
50
|
|
|
46
51
|
return data
|
|
52
|
+
|
|
53
|
+
def max_stance(yd):
|
|
54
|
+
""" extracts max from first 40% of the gait cycle"""
|
|
55
|
+
raise NotImplementedError
|
|
56
|
+
return exd
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: biomechzoo
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.10
|
|
4
4
|
Summary: Python implementation of the biomechZoo toolbox
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/mcgillmotionlab/biomechzoo
|
|
@@ -37,6 +37,7 @@ See also http://www.github.com/mcgillmotionlab/biomechzoo or http://www.biomechz
|
|
|
37
37
|
### Installing a dev environment
|
|
38
38
|
conda create -n biomechzoo-dev python=3.11
|
|
39
39
|
conda activate biomechzoo-dev
|
|
40
|
+
cd biomechzoo root folder
|
|
40
41
|
pip install -e ".[dev]"
|
|
41
42
|
|
|
42
43
|
### import issues
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
__init__.py,sha256=Uy3ykqw4l_lZKiUWSUFPRZpkZajYUfZLBaQLVhKzxdI,772
|
|
2
2
|
biomechzoo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
biomechzoo/__main__.py,sha256=hSMHN1Rxn2367fSGTLHoOQ4_pocZw0IWI7HFxl-74oY,88
|
|
4
|
-
biomechzoo/biomechzoo.py,sha256=
|
|
4
|
+
biomechzoo/biomechzoo.py,sha256=A60kTUaMVWaKl-4ZUZpW8pOKLiZLEpbPYvHZe6urd5w,19800
|
|
5
5
|
biomechzoo/biomech_ops/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
biomechzoo/biomech_ops/continuous_relative_phase_data.py,sha256=RePbt6zyOI1iv74CWhxSrunIokTFYVfFmFnoW51781E,1300
|
|
7
7
|
biomechzoo/biomech_ops/continuous_relative_phase_line.py,sha256=Fa1LFRuPlmGPLQLvln6HVnJy3zMSm9z5YeooHmTu0lc,1365
|
|
@@ -24,7 +24,7 @@ biomechzoo/mvn/mvnx_file_accessor.py,sha256=Gk2vKq9v_gPbnOS_12zgeJehjFz7v3ClTnN2
|
|
|
24
24
|
biomechzoo/processing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
biomechzoo/processing/add_channel_data.py,sha256=U1xLLBSnyJeeDWzgmHSxOz1hyguzuuDXxQCQ8IFoZkw,1955
|
|
26
26
|
biomechzoo/processing/addchannel_data.py,sha256=rmnnlMRVkoMlQCR-nRg1jjh-hzMDt37Sx9fAmocrpqA,1953
|
|
27
|
-
biomechzoo/processing/addevent_data.py,sha256=
|
|
27
|
+
biomechzoo/processing/addevent_data.py,sha256=L9xaoP0yBvaGbseotxpGCVqjr-eSV-gpnQaeRTz4VKE,1631
|
|
28
28
|
biomechzoo/processing/explodechannel_data.py,sha256=AC2BOEw1tXcgJ1WuYWSE-yToS-q9XGdgkOHS4D3iUFo,1490
|
|
29
29
|
biomechzoo/processing/partition_data.py,sha256=XF8dSqvHGpqsT-Q4i6qpoOajAT4LYjP-PJ6KbpoCfFc,2018
|
|
30
30
|
biomechzoo/processing/removechannel_data.py,sha256=ndZcbWJRDvd7drlahGaq8MseT-rsxiu7pgdMtA1cTlo,1218
|
|
@@ -43,9 +43,9 @@ biomechzoo/utils/version.py,sha256=JIXDUuOcaJiZv9ruMP6PtWvJBh4sP0D5kAvlqPiZK_I,1
|
|
|
43
43
|
biomechzoo/utils/zload.py,sha256=FPT6_-gwaOOqOckjgPRfnKEVKMsmNVIcenmQZF2KOvo,1535
|
|
44
44
|
biomechzoo/utils/zplot.py,sha256=WVA8aCy1Pqy_bo_HXab9AmW-cBd8J8MPX2LAOd6dznU,1512
|
|
45
45
|
biomechzoo/utils/zsave.py,sha256=wnRNuDxQc8bwCji4UrfoGjYrSZmka4eaDxQ5rMa78pE,1759
|
|
46
|
-
biomechzoo-0.4.
|
|
47
|
-
biomechzoo-0.4.
|
|
48
|
-
biomechzoo-0.4.
|
|
49
|
-
biomechzoo-0.4.
|
|
50
|
-
biomechzoo-0.4.
|
|
51
|
-
biomechzoo-0.4.
|
|
46
|
+
biomechzoo-0.4.10.dist-info/licenses/LICENSE,sha256=Fsz62nrgRORre3A1wNXUDISaHoostodMvocRPDdXc9w,1076
|
|
47
|
+
biomechzoo-0.4.10.dist-info/METADATA,sha256=P1enuQWmGLcQUQ5Q_6jy1e8o641FncZId2M5wUs1P9Y,1580
|
|
48
|
+
biomechzoo-0.4.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
49
|
+
biomechzoo-0.4.10.dist-info/entry_points.txt,sha256=VdryUUiwwvx0WZxrgmMrsyfe5Z1jtyaxdXOi0zWHOqk,41
|
|
50
|
+
biomechzoo-0.4.10.dist-info/top_level.txt,sha256=nJEtuEZ9UPoN3EOR-BJ6myevEu7B5quWsWhaM_YeQpw,20
|
|
51
|
+
biomechzoo-0.4.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|