biomechzoo 0.4.4__py3-none-any.whl → 0.4.5__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.

__init__.py ADDED
@@ -0,0 +1,33 @@
1
+ """
2
+ BiomechZoo: A Python toolbox for processing and analyzing human movement data.
3
+
4
+ This package provides functions for converting, processing, analyzing,
5
+ and visualizing biomechanical data (e.g., motion capture, EMG, kinetics).
6
+
7
+ Example:
8
+ from biomechzoo import BiomechZoo
9
+ from biomechzoo.conversion import c3d2zoo
10
+
11
+ zoo = BiomechZoo()
12
+ zoo.conversion.c3d2zoo('path/to/data')
13
+ """
14
+
15
+ # Import main class or entry point
16
+ from .biomechzo import BiomechZoo
17
+
18
+ # Import commonly used submodules
19
+ from . import conversion
20
+ from . import processing
21
+ from . import plotting
22
+ from . import utils
23
+
24
+ # Define what gets exposed with "from biomechzoo import *"
25
+ __all__ = [
26
+ "BiomechZoo",
27
+ "conversion",
28
+ "processing",
29
+ "plotting",
30
+ "utils",
31
+ ]
32
+
33
+ __version__ = "0.4.4"
biomechzoo/biomechzoo.py CHANGED
@@ -20,7 +20,6 @@ from biomechzoo.biomech_ops.normalize_data import normalize_data
20
20
  from biomechzoo.biomech_ops.phase_angle_data import phase_angle_data
21
21
  from biomechzoo.biomech_ops.continuous_relative_phase_data import continuous_relative_phase_data
22
22
 
23
-
24
23
  class BiomechZoo:
25
24
  def __init__(self, in_folder, inplace=False, subfolders=None, name_contains=None, verbose=0):
26
25
  self.verbose = verbose
@@ -1,3 +1,5 @@
1
+ import copy
2
+
1
3
  def explodechannel_data(data, channels=None):
2
4
  """ Explodes 3D channels (n x 3 arrays) into separate X, Y, Z channels.
3
5
 
@@ -10,8 +12,7 @@ def explodechannel_data(data, channels=None):
10
12
  data_new (dict): Modified zoo dictionary with exploded channels.
11
13
  """
12
14
 
13
- data_new = data.copy()
14
-
15
+ data_new = copy.deepcopy(data)
15
16
  # Find default channels if none provided
16
17
  if channels is None:
17
18
  channels = []
@@ -1,5 +1,6 @@
1
1
  from biomechzoo.utils.findfield import findfield
2
2
  import warnings
3
+ import copy
3
4
 
4
5
 
5
6
  def partition_data(data, evt_start, evt_end):
@@ -9,7 +10,7 @@ def partition_data(data, evt_start, evt_end):
9
10
  e1, _ = findfield(data, evt_start)
10
11
  e2, _ = findfield(data, evt_end)
11
12
 
12
- data_new = data.copy()
13
+ data_new = copy.deepcopy(data)
13
14
  for ch_name, ch_data in data_new.items():
14
15
  if ch_name != 'zoosystem':
15
16
  try:
@@ -29,6 +30,7 @@ def partition_data(data, evt_start, evt_end):
29
30
  continue # do not change outlier markers
30
31
  else:
31
32
  new_frame = original_frame - e1[0] + 1
33
+ print(new_frame)
32
34
  data_new[ch_name]['event'][event_name][0] = new_frame
33
35
 
34
36
  return data_new
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: biomechzoo
3
- Version: 0.4.4
3
+ Version: 0.4.5
4
4
  Summary: Python implementation of the biomechZoo toolbox
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/mcgillmotionlab/biomechzoo
@@ -31,3 +31,15 @@ This is a development version of the biomechzoo toolbox for python.
31
31
  - We use Numpy 2.2.6 for compatibility with https://pypi.org/project/numba/
32
32
 
33
33
  See also http://www.github.com/mcgillmotionlab/biomechzoo or http://www.biomechzoo.com for more information
34
+
35
+ ## Developer notes
36
+
37
+ ### Installing a dev environment
38
+ conda create -n biomechzoo-dev python=3.11
39
+ conda activate biomechzoo-dev
40
+ pip install -e ".[dev]"
41
+
42
+ ### import issues
43
+ if using PyCharm:
44
+ - Right-click on src/.
45
+ - Select Mark Directory as → Sources Root.
@@ -1,6 +1,7 @@
1
+ __init__.py,sha256=Uy3ykqw4l_lZKiUWSUFPRZpkZajYUfZLBaQLVhKzxdI,772
1
2
  biomechzoo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
3
  biomechzoo/__main__.py,sha256=hSMHN1Rxn2367fSGTLHoOQ4_pocZw0IWI7HFxl-74oY,88
3
- biomechzoo/biomechzoo.py,sha256=h-XNCm5eFDYUNYLWveQ_16hJDHCi3cCJmKMzsqasYBE,20783
4
+ biomechzoo/biomechzoo.py,sha256=6YpqhUaMH76d9zjNAsnOvyU5zppbCMD1t72FIzA8VyI,20782
4
5
  biomechzoo/biomech_ops/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
6
  biomechzoo/biomech_ops/continuous_relative_phase_data.py,sha256=RePbt6zyOI1iv74CWhxSrunIokTFYVfFmFnoW51781E,1300
6
7
  biomechzoo/biomech_ops/continuous_relative_phase_line.py,sha256=Fa1LFRuPlmGPLQLvln6HVnJy3zMSm9z5YeooHmTu0lc,1365
@@ -24,8 +25,8 @@ biomechzoo/processing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
24
25
  biomechzoo/processing/add_channel_data.py,sha256=U1xLLBSnyJeeDWzgmHSxOz1hyguzuuDXxQCQ8IFoZkw,1955
25
26
  biomechzoo/processing/addchannel_data.py,sha256=rmnnlMRVkoMlQCR-nRg1jjh-hzMDt37Sx9fAmocrpqA,1953
26
27
  biomechzoo/processing/addevent_data.py,sha256=DyTfvjOWZIlsWfnT6XDwvsU1jOzSDf4HhLa1TaKIhwI,1325
27
- biomechzoo/processing/explodechannel_data.py,sha256=t4gC2ZQD4baECexj0hQYDzOnXV5GHb-z068mtZzh0DQ,1470
28
- biomechzoo/processing/partition_data.py,sha256=LU7eCyl66wrQXoH3MNbVF0q0IMitEP9AMqeF6qG1J4k,1703
28
+ biomechzoo/processing/explodechannel_data.py,sha256=AC2BOEw1tXcgJ1WuYWSE-yToS-q9XGdgkOHS4D3iUFo,1490
29
+ biomechzoo/processing/partition_data.py,sha256=8miAL8kzOSJtg6j6WetAxRv8whJD8gtDVR9FEpj6mo8,1760
29
30
  biomechzoo/processing/removechannel_data.py,sha256=ndZcbWJRDvd7drlahGaq8MseT-rsxiu7pgdMtA1cTlo,1218
30
31
  biomechzoo/processing/renamechannel_data.py,sha256=5lEnWJknAwnJYXDlwO6cFe7C8ct5o42tTHW0Y4GeIL4,2210
31
32
  biomechzoo/processing/renameevent_data.py,sha256=9w7C_fQOsQ8XbdTr_hrg_iQe51oDczq2Rj7yJLyYG0M,2215
@@ -40,9 +41,9 @@ biomechzoo/utils/split_trial.py,sha256=Fumz_ZukNBNtPauUhCge5EAHkg05dYDhA1_njQw0l
40
41
  biomechzoo/utils/zload.py,sha256=FPT6_-gwaOOqOckjgPRfnKEVKMsmNVIcenmQZF2KOvo,1535
41
42
  biomechzoo/utils/zplot.py,sha256=WVA8aCy1Pqy_bo_HXab9AmW-cBd8J8MPX2LAOd6dznU,1512
42
43
  biomechzoo/utils/zsave.py,sha256=wnRNuDxQc8bwCji4UrfoGjYrSZmka4eaDxQ5rMa78pE,1759
43
- biomechzoo-0.4.4.dist-info/licenses/LICENSE,sha256=Fsz62nrgRORre3A1wNXUDISaHoostodMvocRPDdXc9w,1076
44
- biomechzoo-0.4.4.dist-info/METADATA,sha256=Xk4_QLJcL54KpN98fvrm8l7y5iFy8agshCJ2WqmYDbc,1296
45
- biomechzoo-0.4.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
- biomechzoo-0.4.4.dist-info/entry_points.txt,sha256=VdryUUiwwvx0WZxrgmMrsyfe5Z1jtyaxdXOi0zWHOqk,41
47
- biomechzoo-0.4.4.dist-info/top_level.txt,sha256=W148kdiK-6L0Nohbw8UALkAzHJvJLAhFDRykuva2WjY,11
48
- biomechzoo-0.4.4.dist-info/RECORD,,
44
+ biomechzoo-0.4.5.dist-info/licenses/LICENSE,sha256=Fsz62nrgRORre3A1wNXUDISaHoostodMvocRPDdXc9w,1076
45
+ biomechzoo-0.4.5.dist-info/METADATA,sha256=tKqy3v7eordmf6uD0bCDHqXtoLBGHAu8rDrIjqhxJWs,1553
46
+ biomechzoo-0.4.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
47
+ biomechzoo-0.4.5.dist-info/entry_points.txt,sha256=VdryUUiwwvx0WZxrgmMrsyfe5Z1jtyaxdXOi0zWHOqk,41
48
+ biomechzoo-0.4.5.dist-info/top_level.txt,sha256=nJEtuEZ9UPoN3EOR-BJ6myevEu7B5quWsWhaM_YeQpw,20
49
+ biomechzoo-0.4.5.dist-info/RECORD,,
@@ -1 +1,2 @@
1
+ __init__
1
2
  biomechzoo