biomechzoo 0.4.4__tar.gz → 0.4.7__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.

Files changed (54) hide show
  1. {biomechzoo-0.4.4/src/biomechzoo.egg-info → biomechzoo-0.4.7}/PKG-INFO +13 -1
  2. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/README.md +13 -1
  3. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/pyproject.toml +1 -1
  4. biomechzoo-0.4.7/src/__init__.py +33 -0
  5. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/biomechzoo.py +0 -1
  6. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/processing/explodechannel_data.py +3 -2
  7. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/processing/partition_data.py +8 -2
  8. {biomechzoo-0.4.4 → biomechzoo-0.4.7/src/biomechzoo.egg-info}/PKG-INFO +13 -1
  9. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo.egg-info/SOURCES.txt +1 -0
  10. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo.egg-info/top_level.txt +1 -0
  11. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/LICENSE +0 -0
  12. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/setup.cfg +0 -0
  13. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/__init__.py +0 -0
  14. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/__main__.py +0 -0
  15. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/biomech_ops/__init__.py +0 -0
  16. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/biomech_ops/continuous_relative_phase_data.py +0 -0
  17. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/biomech_ops/continuous_relative_phase_line.py +0 -0
  18. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/biomech_ops/filter_data.py +0 -0
  19. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/biomech_ops/filter_line.py +0 -0
  20. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/biomech_ops/normalize_data.py +0 -0
  21. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/biomech_ops/normalize_line.py +0 -0
  22. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/biomech_ops/phase_angle_data.py +0 -0
  23. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/biomech_ops/phase_angle_line.py +0 -0
  24. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/conversion/__init__.py +0 -0
  25. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/conversion/c3d2zoo_data.py +0 -0
  26. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/conversion/csv2zoo_data.py +0 -0
  27. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/conversion/mvnx2zoo_data.py +0 -0
  28. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/conversion/opencap2zoo_data.py +0 -0
  29. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/mvn/__init__.py +0 -0
  30. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/mvn/load_mvnx.py +0 -0
  31. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/mvn/main_mvnx.py +0 -0
  32. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/mvn/mvn.py +0 -0
  33. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/mvn/mvnx_file_accessor.py +0 -0
  34. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/processing/__init__.py +0 -0
  35. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/processing/add_channel_data.py +0 -0
  36. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/processing/addchannel_data.py +0 -0
  37. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/processing/addevent_data.py +0 -0
  38. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/processing/removechannel_data.py +0 -0
  39. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/processing/renamechannel_data.py +0 -0
  40. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/processing/renameevent_data.py +0 -0
  41. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/processing/split_trial_by_gait_cycle.py +0 -0
  42. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/utils/__init__.py +0 -0
  43. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/utils/batchdisp.py +0 -0
  44. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/utils/compute_sampling_rate_from_time.py +0 -0
  45. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/utils/engine.py +0 -0
  46. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/utils/findfield.py +0 -0
  47. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/utils/get_split_events.py +0 -0
  48. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/utils/split_trial.py +0 -0
  49. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/utils/zload.py +0 -0
  50. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/utils/zplot.py +0 -0
  51. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo/utils/zsave.py +0 -0
  52. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo.egg-info/dependency_links.txt +0 -0
  53. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo.egg-info/entry_points.txt +0 -0
  54. {biomechzoo-0.4.4 → biomechzoo-0.4.7}/src/biomechzoo.egg-info/requires.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: biomechzoo
3
- Version: 0.4.4
3
+ Version: 0.4.7
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.
@@ -13,4 +13,16 @@ This is a development version of the biomechzoo toolbox for python.
13
13
  - We use Python 3.11 for compatibility with https://github.com/stanfordnmbl/opencap-processing
14
14
  - We use Numpy 2.2.6 for compatibility with https://pypi.org/project/numba/
15
15
 
16
- See also http://www.github.com/mcgillmotionlab/biomechzoo or http://www.biomechzoo.com for more information
16
+ See also http://www.github.com/mcgillmotionlab/biomechzoo or http://www.biomechzoo.com for more information
17
+
18
+ ## Developer notes
19
+
20
+ ### Installing a dev environment
21
+ conda create -n biomechzoo-dev python=3.11
22
+ conda activate biomechzoo-dev
23
+ pip install -e ".[dev]"
24
+
25
+ ### import issues
26
+ if using PyCharm:
27
+ - Right-click on src/.
28
+ - Select Mark Directory as → Sources Root.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "biomechzoo"
3
- version = "0.4.4"
3
+ version = "0.4.7"
4
4
  description = "Python implementation of the biomechZoo toolbox"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11,<3.12" # max version for opencap-process tools is 3.11
@@ -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"
@@ -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,11 +10,15 @@ 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':
16
+ line = ch_data['line']
15
17
  try:
16
- data_new[ch_name]['line'] = ch_data[e1[0]:e2[0],]
18
+ if line.ndim ==1:
19
+ data_new[ch_name]['line'] = line[e1[0]:e2[0]]
20
+ else:
21
+ data_new[ch_name]['line'] = line[e1[0]:e2[0], :]
17
22
  except (IndexError, ValueError) as e:
18
23
  # IndexError: if e1[0]:e2[0] goes beyond the available indices
19
24
  # ValueError: less likely, but may arise with shape mismatches
@@ -29,6 +34,7 @@ def partition_data(data, evt_start, evt_end):
29
34
  continue # do not change outlier markers
30
35
  else:
31
36
  new_frame = original_frame - e1[0] + 1
37
+ print(new_frame)
32
38
  data_new[ch_name]['event'][event_name][0] = new_frame
33
39
 
34
40
  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.7
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
1
  LICENSE
2
2
  README.md
3
3
  pyproject.toml
4
+ src/__init__.py
4
5
  src/biomechzoo/__init__.py
5
6
  src/biomechzoo/__main__.py
6
7
  src/biomechzoo/biomechzoo.py
File without changes
File without changes