biosigpy 0.3.1__tar.gz → 0.3.2__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.
Files changed (88) hide show
  1. {biosigpy-0.3.1 → biosigpy-0.3.2}/CHANGELOG.md +5 -0
  2. {biosigpy-0.3.1/src/biosigpy.egg-info → biosigpy-0.3.2}/PKG-INFO +3 -3
  3. {biosigpy-0.3.1 → biosigpy-0.3.2}/README.md +2 -2
  4. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/_version.py +1 -1
  5. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/hrv/osp.py +16 -2
  6. {biosigpy-0.3.1 → biosigpy-0.3.2/src/biosigpy.egg-info}/PKG-INFO +3 -3
  7. {biosigpy-0.3.1 → biosigpy-0.3.2}/LICENSE +0 -0
  8. {biosigpy-0.3.1 → biosigpy-0.3.2}/MANIFEST.in +0 -0
  9. {biosigpy-0.3.1 → biosigpy-0.3.2}/biosiglib.lock +0 -0
  10. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/ecg/baselineremove.md +0 -0
  11. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/ecg/pantompkins.md +0 -0
  12. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/ecg/sloperange.md +0 -0
  13. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/hrv/fdmetrics.md +0 -0
  14. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/hrv/fillgaps.md +0 -0
  15. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/hrv/ipfm.md +0 -0
  16. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/hrv/osp.md +0 -0
  17. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/hrv/removefp.md +0 -0
  18. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/hrv/tdmetrics.md +0 -0
  19. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/index.md +0 -0
  20. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/tools/lpd-filter.md +0 -0
  21. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/tools/medfilt-threshold.md +0 -0
  22. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/tools/nan-filter.md +0 -0
  23. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/tools/nan-filtfilt.md +0 -0
  24. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/api/tools/snap-to-peak.md +0 -0
  25. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/index.md +0 -0
  26. {biosigpy-0.3.1 → biosigpy-0.3.2}/docs/installation.md +0 -0
  27. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/README.md +0 -0
  28. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/_support/__init__.py +0 -0
  29. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/_support/figures.py +0 -0
  30. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/ecg/baselineremove_example.py +0 -0
  31. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/ecg/pantompkins_example.py +0 -0
  32. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/ecg/sloperange_example.py +0 -0
  33. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/fixtures/ecg/medicom_mtd_ecg_respiration.csv +0 -0
  34. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/fixtures/ecg/medicom_mtd_r_wave_timing.csv +0 -0
  35. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/hrv/fdmetrics_example.py +0 -0
  36. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/hrv/fillgaps_example.py +0 -0
  37. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/hrv/ipfm_example.py +0 -0
  38. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/hrv/osp_example.py +0 -0
  39. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/hrv/removefp_example.py +0 -0
  40. {biosigpy-0.3.1 → biosigpy-0.3.2}/examples/hrv/tdmetrics_example.py +0 -0
  41. {biosigpy-0.3.1 → biosigpy-0.3.2}/mkdocs.yml +0 -0
  42. {biosigpy-0.3.1 → biosigpy-0.3.2}/pyproject.toml +0 -0
  43. {biosigpy-0.3.1 → biosigpy-0.3.2}/pytest.ini +0 -0
  44. {biosigpy-0.3.1 → biosigpy-0.3.2}/requirements-dev.txt +0 -0
  45. {biosigpy-0.3.1 → biosigpy-0.3.2}/setup.cfg +0 -0
  46. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/__init__.py +0 -0
  47. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/ecg/__init__.py +0 -0
  48. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/ecg/baselineremove.py +0 -0
  49. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/ecg/pantompkins.py +0 -0
  50. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/ecg/sloperange.py +0 -0
  51. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/hrv/__init__.py +0 -0
  52. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/hrv/_fillgaps_debug.py +0 -0
  53. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/hrv/fdmetrics.py +0 -0
  54. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/hrv/fillgaps.py +0 -0
  55. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/hrv/ipfm.py +0 -0
  56. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/hrv/removefp.py +0 -0
  57. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/hrv/tdmetrics.py +0 -0
  58. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/tools/__init__.py +0 -0
  59. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/tools/_nan_processing.py +0 -0
  60. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/tools/_validation.py +0 -0
  61. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/tools/lpd_filter.py +0 -0
  62. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/tools/medfilt_threshold.py +0 -0
  63. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/tools/nan_filter.py +0 -0
  64. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/tools/nan_filtfilt.py +0 -0
  65. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy/tools/snap_to_peak.py +0 -0
  66. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy.egg-info/SOURCES.txt +0 -0
  67. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy.egg-info/dependency_links.txt +0 -0
  68. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy.egg-info/requires.txt +0 -0
  69. {biosigpy-0.3.1 → biosigpy-0.3.2}/src/biosigpy.egg-info/top_level.txt +0 -0
  70. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/conformance.py +0 -0
  71. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/conftest.py +0 -0
  72. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_baselineremove.py +0 -0
  73. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_conformance_coverage.py +0 -0
  74. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_example_figures.py +0 -0
  75. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_fdmetrics.py +0 -0
  76. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_fillgaps.py +0 -0
  77. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_ipfm.py +0 -0
  78. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_lpd_filter.py +0 -0
  79. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_medfilt_threshold.py +0 -0
  80. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_nan_filter.py +0 -0
  81. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_nan_filtfilt.py +0 -0
  82. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_osp.py +0 -0
  83. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_package_metadata.py +0 -0
  84. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_pantompkins.py +0 -0
  85. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_removefp.py +0 -0
  86. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_sloperange.py +0 -0
  87. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_snap_to_peak.py +0 -0
  88. {biosigpy-0.3.1 → biosigpy-0.3.2}/tests/test_tdmetrics.py +0 -0
@@ -2,6 +2,11 @@
2
2
 
3
3
  This file is the authoritative release history. GitHub Releases reuse the corresponding version section.
4
4
 
5
+ ## 0.3.2 - 2026-08-18
6
+
7
+ - Optimized `hrv.osp` by applying the orthogonal projection associatively, avoiding the square projection matrix while preserving the defined decomposition.
8
+ - Reduced the projection step from quadratic to linear memory in the signal length, improving repeated five-minute HRV window processing when the signal is much longer than the respiratory subspace order.
9
+
5
10
  ## 0.3.1 - 2026-08-13
6
11
 
7
12
  - Added trusted publishing to release the verified wheel and source distribution to PyPI without long-lived credentials.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: biosigpy
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Python implementation of the Biosiglib specifications for biomedical signal processing.
5
5
  License-Expression: GPL-3.0-only
6
6
  Project-URL: Documentation, https://bsicos.github.io/biosigpy/
@@ -34,9 +34,9 @@ Dynamic: license-file
34
34
 
35
35
  # Biosigpy
36
36
 
37
- [![Python](https://img.shields.io/badge/Python-3.10--3.13-blue)](https://www.python.org/)
37
+ [![PyPI version](https://img.shields.io/pypi/v/biosigpy.svg)](https://pypi.org/project/biosigpy/)
38
+ [![Python versions](https://img.shields.io/pypi/pyversions/biosigpy.svg)](https://pypi.org/project/biosigpy/)
38
39
  [![License](https://img.shields.io/badge/License-GPL--3.0-green.svg)](LICENSE)
39
- [![Latest release](https://img.shields.io/github/v/release/BSICoS/biosigpy?label=Version)](https://github.com/BSICoS/biosigpy/releases/latest)
40
40
 
41
41
  Python functions for biomedical signal processing, maintained by the [BSICoS Research Group](https://bsicos.i3a.es/).
42
42
 
@@ -1,8 +1,8 @@
1
1
  # Biosigpy
2
2
 
3
- [![Python](https://img.shields.io/badge/Python-3.10--3.13-blue)](https://www.python.org/)
3
+ [![PyPI version](https://img.shields.io/pypi/v/biosigpy.svg)](https://pypi.org/project/biosigpy/)
4
+ [![Python versions](https://img.shields.io/pypi/pyversions/biosigpy.svg)](https://pypi.org/project/biosigpy/)
4
5
  [![License](https://img.shields.io/badge/License-GPL--3.0-green.svg)](LICENSE)
5
- [![Latest release](https://img.shields.io/github/v/release/BSICoS/biosigpy?label=Version)](https://github.com/BSICoS/biosigpy/releases/latest)
6
6
 
7
7
  Python functions for biomedical signal processing, maintained by the [BSICoS Research Group](https://bsicos.i3a.es/).
8
8
 
@@ -1,3 +1,3 @@
1
1
  """Authoritative Biosigpy implementation version."""
2
2
 
3
- __version__ = "0.3.1"
3
+ __version__ = "0.3.2"
@@ -131,9 +131,10 @@ def osp(
131
131
  )
132
132
  gram = subspace.T @ subspace
133
133
  gram_inverse = _gram_pseudoinverse(gram)
134
- projection = subspace @ gram_inverse @ subspace.T
135
134
  delayed_modulation = modulation[delay - 1 :]
136
- m_resp = projection @ delayed_modulation
135
+ m_resp = _project_onto_subspace(
136
+ subspace, gram_inverse, delayed_modulation
137
+ )
137
138
  m_unrelated = delayed_modulation - m_resp
138
139
  return OspResult(
139
140
  m_resp=np.asarray(m_resp, dtype=np.float64),
@@ -142,6 +143,19 @@ def osp(
142
143
  )
143
144
 
144
145
 
146
+ def _project_onto_subspace(
147
+ subspace: NDArray[np.float64],
148
+ gram_inverse: NDArray[np.float64],
149
+ values: NDArray[np.float64],
150
+ ) -> NDArray[np.float64]:
151
+ """Apply the projection without materializing its square matrix."""
152
+
153
+ # By associativity, apply (V G+ V.T) m as V (G+ (V.T m)) to avoid
154
+ # materializing the N-by-N projection matrix when N is much larger than D.
155
+ coefficients = gram_inverse @ (subspace.T @ values)
156
+ return subspace @ coefficients
157
+
158
+
145
159
  def _validate_spectrum(
146
160
  spectrum: NDArray[np.float64], frequencies: NDArray[np.float64]
147
161
  ) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: biosigpy
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Python implementation of the Biosiglib specifications for biomedical signal processing.
5
5
  License-Expression: GPL-3.0-only
6
6
  Project-URL: Documentation, https://bsicos.github.io/biosigpy/
@@ -34,9 +34,9 @@ Dynamic: license-file
34
34
 
35
35
  # Biosigpy
36
36
 
37
- [![Python](https://img.shields.io/badge/Python-3.10--3.13-blue)](https://www.python.org/)
37
+ [![PyPI version](https://img.shields.io/pypi/v/biosigpy.svg)](https://pypi.org/project/biosigpy/)
38
+ [![Python versions](https://img.shields.io/pypi/pyversions/biosigpy.svg)](https://pypi.org/project/biosigpy/)
38
39
  [![License](https://img.shields.io/badge/License-GPL--3.0-green.svg)](LICENSE)
39
- [![Latest release](https://img.shields.io/github/v/release/BSICoS/biosigpy?label=Version)](https://github.com/BSICoS/biosigpy/releases/latest)
40
40
 
41
41
  Python functions for biomedical signal processing, maintained by the [BSICoS Research Group](https://bsicos.i3a.es/).
42
42
 
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