kinemotion 0.12.0__py3-none-any.whl → 0.12.1__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 kinemotion might be problematic. Click here for more details.

@@ -210,5 +210,3 @@ def common_output_options(func: Callable) -> Callable: # type: ignore[type-arg]
210
210
  help="Path for JSON metrics output (default: stdout)",
211
211
  )(func)
212
212
  return func
213
-
214
- return func
@@ -255,55 +255,6 @@ def _find_precise_phase_timing(
255
255
  return contact_start_frac, contact_end_frac
256
256
 
257
257
 
258
- def _calculate_calibration_scale(
259
- drop_height_m: float | None,
260
- phases: list[tuple[int, int, ContactState]],
261
- air_phases_indexed: list[tuple[int, int, int]],
262
- foot_y_positions: np.ndarray,
263
- ) -> float:
264
- """Calculate calibration scale factor from known drop height.
265
-
266
- Args:
267
- drop_height_m: Known drop height in meters
268
- phases: All phase tuples
269
- air_phases_indexed: Air phases with indices
270
- foot_y_positions: Vertical position array
271
-
272
- Returns:
273
- Scale factor (1.0 if no calibration possible)
274
- """
275
- scale_factor = 1.0
276
-
277
- if drop_height_m is None or len(phases) < 2:
278
- return scale_factor
279
-
280
- if not air_phases_indexed:
281
- return scale_factor
282
-
283
- # Get first air phase (the drop)
284
- first_air_start, first_air_end, _ = air_phases_indexed[0]
285
-
286
- # Initial position: at start of drop (on the box)
287
- lookback_start = max(0, first_air_start - 5)
288
- if lookback_start < first_air_start:
289
- initial_position = float(
290
- np.mean(foot_y_positions[lookback_start:first_air_start])
291
- )
292
- else:
293
- initial_position = float(foot_y_positions[first_air_start])
294
-
295
- # Landing position: at the ground after drop
296
- landing_position = float(foot_y_positions[first_air_end])
297
-
298
- # Drop distance in normalized coordinates (y increases downward)
299
- drop_normalized = landing_position - initial_position
300
-
301
- if drop_normalized > 0.01: # Sanity check
302
- scale_factor = drop_height_m / drop_normalized
303
-
304
- return scale_factor
305
-
306
-
307
258
  def _analyze_flight_phase(
308
259
  metrics: DropJumpMetrics,
309
260
  phases: list[tuple[int, int, ContactState]],
@@ -311,9 +262,6 @@ def _analyze_flight_phase(
311
262
  contact_end: int,
312
263
  foot_y_positions: np.ndarray,
313
264
  fps: float,
314
- drop_height_m: float | None,
315
- scale_factor: float,
316
- kinematic_correction_factor: float,
317
265
  smoothing_window: int,
318
266
  polyorder: int,
319
267
  ) -> None:
@@ -329,9 +277,6 @@ def _analyze_flight_phase(
329
277
  contact_end: End of contact phase
330
278
  foot_y_positions: Vertical position array
331
279
  fps: Video frame rate
332
- drop_height_m: Known drop height (optional, for RSI calculation)
333
- scale_factor: Calibration scale factor
334
- kinematic_correction_factor: Correction for kinematic method
335
280
  smoothing_window: Window size for acceleration computation
336
281
  polyorder: Polynomial order for Savitzky-Golay filter
337
282
  """
@@ -489,11 +434,6 @@ def calculate_drop_jump_metrics(
489
434
  metrics.contact_start_frame_precise = contact_start_frac
490
435
  metrics.contact_end_frame_precise = contact_end_frac
491
436
 
492
- # Calculate calibration scale factor
493
- scale_factor = _calculate_calibration_scale(
494
- drop_height_m, phases, air_phases_indexed, foot_y_positions
495
- )
496
-
497
437
  # Analyze flight phase and calculate jump height
498
438
  _analyze_flight_phase(
499
439
  metrics,
@@ -502,9 +442,6 @@ def calculate_drop_jump_metrics(
502
442
  contact_end,
503
443
  foot_y_positions,
504
444
  fps,
505
- drop_height_m,
506
- scale_factor,
507
- kinematic_correction_factor,
508
445
  smoothing_window,
509
446
  polyorder,
510
447
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kinemotion
3
- Version: 0.12.0
3
+ Version: 0.12.1
4
4
  Summary: Video-based kinematic analysis for athletic performance
5
5
  Project-URL: Homepage, https://github.com/feniix/kinemotion
6
6
  Project-URL: Repository, https://github.com/feniix/kinemotion
@@ -9,7 +9,7 @@ kinemotion/cmj/joint_angles.py,sha256=8ucpDGPvbt4iX3tx9eVxJEUv0laTm2Y58_--VzJCog
9
9
  kinemotion/cmj/kinematics.py,sha256=Xl_PlC2OqMoA-zOc3SRB_GqI0AgLlJol5FTPe5J_qLc,7573
10
10
  kinemotion/core/__init__.py,sha256=3yzDhb5PekDNjydqrs8aWGneUGJBt-lB0SoB_Y2FXqU,1010
11
11
  kinemotion/core/auto_tuning.py,sha256=cvmxUI-CbahpOJQtR2r5jOx4Q6yKPe3DO1o15hOQIdw,10508
12
- kinemotion/core/cli_utils.py,sha256=uCGOsXRpxhRpu8VW9b3tAsHBySyaVl_YMMVCrEZqB-Y,7271
12
+ kinemotion/core/cli_utils.py,sha256=Pq1JF7yvK1YbH0tOUWKjplthCbWsJQt4Lv7esPYH4FM,7254
13
13
  kinemotion/core/debug_overlay_utils.py,sha256=TyUb5okv5qw8oeaX3jsUO_kpwf1NnaHEAOTm-8LwTno,4587
14
14
  kinemotion/core/filtering.py,sha256=f-m-aA59e4WqE6u-9MA51wssu7rI-Y_7n1cG8IWdeRQ,11241
15
15
  kinemotion/core/pose.py,sha256=Wfd1RR-2ZznYpWeQUbySwcV3mvReqn8n3XO6S7pGq4M,8390
@@ -19,10 +19,10 @@ kinemotion/dropjump/__init__.py,sha256=yc1XiZ9vfo5h_n7PKVSiX2TTgaIfGL7Y7SkQtiDZj
19
19
  kinemotion/dropjump/analysis.py,sha256=crO0SUq8TiMHdK5hPuHHuOFrEGhGdPoeb5rXQUvqCog,26103
20
20
  kinemotion/dropjump/cli.py,sha256=emnMlg2Td4iS7go9ckTFnolPEytX9MKoPRhfjBwyArU,21731
21
21
  kinemotion/dropjump/debug_overlay.py,sha256=2L4VAZwWFnaOQ7LAF3ALXCjEaVNzkfpLT5-h0qKL_6g,5707
22
- kinemotion/dropjump/kinematics.py,sha256=bHQFeBHGNDKyusHKN_hHmeNHLEK2xMIHBMvL2tScm88,17935
22
+ kinemotion/dropjump/kinematics.py,sha256=WC1HuIKx3CfEg9m9jFME74IAHSJRcbqo2_yysZIBqJw,15880
23
23
  kinemotion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- kinemotion-0.12.0.dist-info/METADATA,sha256=bwCv7u1ErLWVmzFcFYK_Lx7_XRAOajSp6YFTYWtXhRg,18990
25
- kinemotion-0.12.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
26
- kinemotion-0.12.0.dist-info/entry_points.txt,sha256=zaqnAnjLvcdrk1Qvj5nvXZCZ2gp0prS7it1zTJygcIY,50
27
- kinemotion-0.12.0.dist-info/licenses/LICENSE,sha256=KZajvqsHw0NoOHOi2q0FZ4NBe9HdV6oey-IPYAtHXfg,1088
28
- kinemotion-0.12.0.dist-info/RECORD,,
24
+ kinemotion-0.12.1.dist-info/METADATA,sha256=50i4pFgm8p1uND7dmF4WhjQu5FL0p60qeARx29b39QY,18990
25
+ kinemotion-0.12.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
26
+ kinemotion-0.12.1.dist-info/entry_points.txt,sha256=zaqnAnjLvcdrk1Qvj5nvXZCZ2gp0prS7it1zTJygcIY,50
27
+ kinemotion-0.12.1.dist-info/licenses/LICENSE,sha256=KZajvqsHw0NoOHOi2q0FZ4NBe9HdV6oey-IPYAtHXfg,1088
28
+ kinemotion-0.12.1.dist-info/RECORD,,