ezmsg-sigproc 1.4.2__tar.gz → 2.13.1__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 (209) hide show
  1. ezmsg_sigproc-2.13.1/.github/workflows/docs.yml +66 -0
  2. ezmsg_sigproc-2.13.1/.github/workflows/python-publish.yml +29 -0
  3. {ezmsg_sigproc-1.4.2 → ezmsg_sigproc-2.13.1}/.github/workflows/python-tests.yml +4 -10
  4. {ezmsg_sigproc-1.4.2 → ezmsg_sigproc-2.13.1}/.gitignore +5 -1
  5. {ezmsg_sigproc-1.4.2 → ezmsg_sigproc-2.13.1}/.pre-commit-config.yaml +1 -2
  6. ezmsg_sigproc-2.13.1/PKG-INFO +60 -0
  7. ezmsg_sigproc-2.13.1/README.md +42 -0
  8. ezmsg_sigproc-2.13.1/docs/Makefile +20 -0
  9. ezmsg_sigproc-2.13.1/docs/make.bat +35 -0
  10. ezmsg_sigproc-2.13.1/docs/source/_templates/autosummary/module.rst +64 -0
  11. ezmsg_sigproc-2.13.1/docs/source/api/index.rst +11 -0
  12. ezmsg_sigproc-2.13.1/docs/source/conf.py +128 -0
  13. ezmsg_sigproc-2.13.1/docs/source/guides/HybridBuffer.md +87 -0
  14. ezmsg_sigproc-2.13.1/docs/source/guides/explanations/array_api.rst +156 -0
  15. ezmsg_sigproc-2.13.1/docs/source/guides/explanations/sigproc.rst +365 -0
  16. ezmsg_sigproc-2.13.1/docs/source/guides/how-tos/signalprocessing/adaptive.rst +4 -0
  17. ezmsg_sigproc-2.13.1/docs/source/guides/how-tos/signalprocessing/checkpoint.rst +4 -0
  18. ezmsg_sigproc-2.13.1/docs/source/guides/how-tos/signalprocessing/composite.rst +6 -0
  19. ezmsg_sigproc-2.13.1/docs/source/guides/how-tos/signalprocessing/content-signalprocessing.rst +13 -0
  20. ezmsg_sigproc-2.13.1/docs/source/guides/how-tos/signalprocessing/processor.rst +8 -0
  21. ezmsg_sigproc-2.13.1/docs/source/guides/how-tos/signalprocessing/standalone.rst +4 -0
  22. ezmsg_sigproc-2.13.1/docs/source/guides/how-tos/signalprocessing/stateful.rst +8 -0
  23. ezmsg_sigproc-2.13.1/docs/source/guides/how-tos/signalprocessing/unit.rst +41 -0
  24. ezmsg_sigproc-2.13.1/docs/source/guides/img/HybridBufferBasic.svg +4 -0
  25. ezmsg_sigproc-2.13.1/docs/source/guides/img/HybridBufferOverflow.svg +4 -0
  26. ezmsg_sigproc-2.13.1/docs/source/guides/sigproc/architecture.rst +41 -0
  27. ezmsg_sigproc-2.13.1/docs/source/guides/sigproc/base.rst +19 -0
  28. ezmsg_sigproc-2.13.1/docs/source/guides/sigproc/content-sigproc.rst +25 -0
  29. ezmsg_sigproc-2.13.1/docs/source/guides/sigproc/processors.rst +149 -0
  30. ezmsg_sigproc-2.13.1/docs/source/guides/sigproc/units.rst +29 -0
  31. ezmsg_sigproc-2.13.1/docs/source/guides/tutorials/signalprocessing.rst +596 -0
  32. ezmsg_sigproc-2.13.1/docs/source/index.md +20 -0
  33. ezmsg_sigproc-2.13.1/pyproject.toml +88 -0
  34. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/__version__.py +34 -0
  35. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/activation.py +78 -0
  36. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/adaptive_lattice_notch.py +212 -0
  37. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/affinetransform.py +534 -0
  38. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/aggregate.py +276 -0
  39. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/bandpower.py +80 -0
  40. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/base.py +149 -0
  41. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/butterworthfilter.py +156 -0
  42. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/butterworthzerophase.py +305 -0
  43. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/cheby.py +125 -0
  44. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/combfilter.py +160 -0
  45. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/coordinatespaces.py +159 -0
  46. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/decimate.py +68 -0
  47. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/denormalize.py +78 -0
  48. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/detrend.py +28 -0
  49. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/diff.py +82 -0
  50. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/downsample.py +111 -0
  51. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/ewma.py +217 -0
  52. {ezmsg_sigproc-1.4.2 → ezmsg_sigproc-2.13.1}/src/ezmsg/sigproc/ewmfilter.py +10 -6
  53. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/extract_axis.py +39 -0
  54. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/fbcca.py +307 -0
  55. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/filter.py +305 -0
  56. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/filterbank.py +292 -0
  57. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/filterbankdesign.py +129 -0
  58. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/fir_hilbert.py +336 -0
  59. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/fir_pmc.py +209 -0
  60. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/firfilter.py +117 -0
  61. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/gaussiansmoothing.py +89 -0
  62. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/kaiser.py +106 -0
  63. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/linear.py +120 -0
  64. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/math/abs.py +35 -0
  65. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/math/add.py +120 -0
  66. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/math/clip.py +48 -0
  67. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/math/difference.py +143 -0
  68. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/math/invert.py +28 -0
  69. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/math/log.py +57 -0
  70. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/math/pow.py +43 -0
  71. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/math/scale.py +39 -0
  72. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/merge.py +358 -0
  73. {ezmsg_sigproc-1.4.2 → ezmsg_sigproc-2.13.1}/src/ezmsg/sigproc/messages.py +3 -5
  74. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/quantize.py +69 -0
  75. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/resample.py +278 -0
  76. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/rollingscaler.py +240 -0
  77. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/sampler.py +278 -0
  78. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/scaler.py +196 -0
  79. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/signalinjector.py +70 -0
  80. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/singlebandpow.py +116 -0
  81. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/slicer.py +138 -0
  82. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/spectrogram.py +90 -0
  83. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/spectrum.py +277 -0
  84. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/transpose.py +134 -0
  85. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/util/asio.py +25 -0
  86. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/util/axisarray_buffer.py +365 -0
  87. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/util/buffer.py +449 -0
  88. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/util/message.py +17 -0
  89. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/util/profile.py +23 -0
  90. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/util/sparse.py +115 -0
  91. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/util/typeresolution.py +17 -0
  92. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/wavelets.py +187 -0
  93. ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/window.py +328 -0
  94. ezmsg_sigproc-2.13.1/tests/__init__.py +0 -0
  95. ezmsg_sigproc-2.13.1/tests/conftest.py +4 -0
  96. ezmsg_sigproc-2.13.1/tests/helpers/__init__.py +0 -0
  97. ezmsg_sigproc-2.13.1/tests/helpers/synth.py +281 -0
  98. ezmsg_sigproc-2.13.1/tests/helpers/util.py +178 -0
  99. ezmsg_sigproc-2.13.1/tests/integration/bytewax/test_spectrum_bytewax.py +68 -0
  100. ezmsg_sigproc-2.13.1/tests/integration/bytewax/test_window_bytewax.py +59 -0
  101. ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_add_system.py +148 -0
  102. ezmsg_sigproc-1.4.2/tests/test_butterworth.py → ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_butterworth_system.py +14 -27
  103. ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_butterworthzerophase_system.py +79 -0
  104. ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_coordinatespaces_system.py +226 -0
  105. ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_decimate_system.py +57 -0
  106. ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_difference_system.py +203 -0
  107. ezmsg_sigproc-1.4.2/tests/test_downsample.py → ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_downsample_system.py +22 -79
  108. ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_filter_system.py +106 -0
  109. ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_fir_hilbert_system.py +48 -0
  110. ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_fir_pmc_system.py +51 -0
  111. ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_rollingscaler_system.py +48 -0
  112. ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_sampler_system.py +97 -0
  113. ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_scaler_system.py +77 -0
  114. ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_spectrum_system.py +103 -0
  115. ezmsg_sigproc-2.13.1/tests/integration/ezmsg/test_window_system.py +185 -0
  116. ezmsg_sigproc-2.13.1/tests/test_profile.py +39 -0
  117. ezmsg_sigproc-2.13.1/tests/unit/buffer/test_axisarray_buffer.py +583 -0
  118. ezmsg_sigproc-2.13.1/tests/unit/buffer/test_buffer.py +443 -0
  119. ezmsg_sigproc-2.13.1/tests/unit/buffer/test_buffer_overflow.py +192 -0
  120. {ezmsg_sigproc-1.4.2/tests → ezmsg_sigproc-2.13.1/tests/unit}/test_activation.py +11 -11
  121. ezmsg_sigproc-2.13.1/tests/unit/test_adaptive_lattice_notch.py +147 -0
  122. ezmsg_sigproc-2.13.1/tests/unit/test_affine_transform.py +783 -0
  123. ezmsg_sigproc-2.13.1/tests/unit/test_aggregate.py +380 -0
  124. {ezmsg_sigproc-1.4.2/tests → ezmsg_sigproc-2.13.1/tests/unit}/test_bandpower.py +22 -17
  125. ezmsg_sigproc-2.13.1/tests/unit/test_base.py +1100 -0
  126. ezmsg_sigproc-2.13.1/tests/unit/test_butter.py +250 -0
  127. ezmsg_sigproc-2.13.1/tests/unit/test_butterworthzerophase.py +545 -0
  128. ezmsg_sigproc-2.13.1/tests/unit/test_combfilter.py +317 -0
  129. ezmsg_sigproc-2.13.1/tests/unit/test_coordinatespaces.py +272 -0
  130. ezmsg_sigproc-2.13.1/tests/unit/test_denormalize.py +232 -0
  131. ezmsg_sigproc-2.13.1/tests/unit/test_diff.py +127 -0
  132. ezmsg_sigproc-2.13.1/tests/unit/test_downsample.py +70 -0
  133. ezmsg_sigproc-2.13.1/tests/unit/test_ewma.py +162 -0
  134. ezmsg_sigproc-2.13.1/tests/unit/test_extract_axis.py +63 -0
  135. ezmsg_sigproc-2.13.1/tests/unit/test_fbcca.py +708 -0
  136. ezmsg_sigproc-2.13.1/tests/unit/test_filter.py +18 -0
  137. {ezmsg_sigproc-1.4.2/tests → ezmsg_sigproc-2.13.1/tests/unit}/test_filterbank.py +9 -24
  138. ezmsg_sigproc-2.13.1/tests/unit/test_filterbankdesign.py +651 -0
  139. ezmsg_sigproc-2.13.1/tests/unit/test_fir_hilbert.py +263 -0
  140. ezmsg_sigproc-2.13.1/tests/unit/test_fir_pmc.py +93 -0
  141. ezmsg_sigproc-2.13.1/tests/unit/test_firfilter.py +285 -0
  142. ezmsg_sigproc-2.13.1/tests/unit/test_gaussian_smoothing_filter.py +247 -0
  143. ezmsg_sigproc-2.13.1/tests/unit/test_kaiser.py +420 -0
  144. ezmsg_sigproc-2.13.1/tests/unit/test_linear.py +307 -0
  145. ezmsg_sigproc-2.13.1/tests/unit/test_math.py +102 -0
  146. ezmsg_sigproc-2.13.1/tests/unit/test_math_add.py +247 -0
  147. ezmsg_sigproc-2.13.1/tests/unit/test_math_difference.py +278 -0
  148. ezmsg_sigproc-2.13.1/tests/unit/test_merge.py +369 -0
  149. ezmsg_sigproc-2.13.1/tests/unit/test_quantize.py +84 -0
  150. ezmsg_sigproc-2.13.1/tests/unit/test_resample.py +138 -0
  151. ezmsg_sigproc-2.13.1/tests/unit/test_rollingscaler.py +147 -0
  152. ezmsg_sigproc-2.13.1/tests/unit/test_sampler.py +78 -0
  153. ezmsg_sigproc-2.13.1/tests/unit/test_scaler.py +236 -0
  154. ezmsg_sigproc-2.13.1/tests/unit/test_singlebandpow.py +180 -0
  155. {ezmsg_sigproc-1.4.2/tests → ezmsg_sigproc-2.13.1/tests/unit}/test_slicer.py +34 -42
  156. {ezmsg_sigproc-1.4.2/tests → ezmsg_sigproc-2.13.1/tests/unit}/test_spectrogram.py +12 -19
  157. ezmsg_sigproc-2.13.1/tests/unit/test_spectrum.py +163 -0
  158. ezmsg_sigproc-2.13.1/tests/unit/test_transpose.py +61 -0
  159. ezmsg_sigproc-2.13.1/tests/unit/test_util.py +87 -0
  160. {ezmsg_sigproc-1.4.2/tests → ezmsg_sigproc-2.13.1/tests/unit}/test_wavelets.py +55 -46
  161. ezmsg_sigproc-2.13.1/tests/unit/test_window.py +238 -0
  162. ezmsg_sigproc-1.4.2/.github/workflows/python-publish-ezmsg-sigproc.yml +0 -30
  163. ezmsg_sigproc-1.4.2/PKG-INFO +0 -59
  164. ezmsg_sigproc-1.4.2/README.md +0 -39
  165. ezmsg_sigproc-1.4.2/pyproject.toml +0 -50
  166. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/__version__.py +0 -16
  167. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/activation.py +0 -87
  168. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/affinetransform.py +0 -233
  169. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/aggregate.py +0 -162
  170. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/bandpower.py +0 -75
  171. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/base.py +0 -39
  172. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/butterworthfilter.py +0 -161
  173. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/decimate.py +0 -43
  174. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/downsample.py +0 -107
  175. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/filter.py +0 -232
  176. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/filterbank.py +0 -280
  177. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/math/abs.py +0 -34
  178. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/math/clip.py +0 -40
  179. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/math/difference.py +0 -69
  180. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/math/invert.py +0 -35
  181. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/math/log.py +0 -52
  182. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/math/scale.py +0 -40
  183. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/sampler.py +0 -322
  184. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/scaler.py +0 -172
  185. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/signalinjector.py +0 -69
  186. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/slicer.py +0 -146
  187. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/spectrogram.py +0 -90
  188. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/spectrum.py +0 -259
  189. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/synth.py +0 -605
  190. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/wavelets.py +0 -169
  191. ezmsg_sigproc-1.4.2/src/ezmsg/sigproc/window.py +0 -289
  192. ezmsg_sigproc-1.4.2/tests/conftest.py +0 -4
  193. ezmsg_sigproc-1.4.2/tests/helpers/util.py +0 -104
  194. ezmsg_sigproc-1.4.2/tests/test_affine_transform.py +0 -152
  195. ezmsg_sigproc-1.4.2/tests/test_aggregate.py +0 -139
  196. ezmsg_sigproc-1.4.2/tests/test_butter.py +0 -157
  197. ezmsg_sigproc-1.4.2/tests/test_math.py +0 -90
  198. ezmsg_sigproc-1.4.2/tests/test_sampler.py +0 -189
  199. ezmsg_sigproc-1.4.2/tests/test_scaler.py +0 -132
  200. ezmsg_sigproc-1.4.2/tests/test_spectrum.py +0 -275
  201. ezmsg_sigproc-1.4.2/tests/test_synth.py +0 -381
  202. ezmsg_sigproc-1.4.2/tests/test_window.py +0 -380
  203. ezmsg_sigproc-1.4.2/uv.lock +0 -595
  204. ezmsg_sigproc-1.4.2/LICENSE.txt → ezmsg_sigproc-2.13.1/LICENSE +0 -0
  205. {ezmsg_sigproc-1.4.2 → ezmsg_sigproc-2.13.1}/src/ezmsg/sigproc/__init__.py +0 -0
  206. {ezmsg_sigproc-1.4.2 → ezmsg_sigproc-2.13.1}/src/ezmsg/sigproc/math/__init__.py +0 -0
  207. {ezmsg_sigproc-1.4.2 → ezmsg_sigproc-2.13.1}/src/ezmsg/sigproc/spectral.py +3 -3
  208. {ezmsg_sigproc-1.4.2/tests/helpers → ezmsg_sigproc-2.13.1/src/ezmsg/sigproc/util}/__init__.py +0 -0
  209. {ezmsg_sigproc-1.4.2 → ezmsg_sigproc-2.13.1}/tests/resources/xform.csv +0 -0
@@ -0,0 +1,66 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+ - dev
11
+ release:
12
+ types: [published]
13
+ workflow_dispatch:
14
+
15
+ permissions:
16
+ contents: read
17
+ pages: write
18
+ id-token: write
19
+
20
+ # Allow only one concurrent deployment
21
+ concurrency:
22
+ group: "pages"
23
+ cancel-in-progress: false
24
+
25
+ jobs:
26
+ build:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 0 # Needed for hatch-vcs to determine version
32
+
33
+ - name: Install uv
34
+ uses: astral-sh/setup-uv@v6
35
+ with:
36
+ enable-cache: true
37
+ python-version: "3.12"
38
+
39
+ - name: Install the project
40
+ run: uv sync --only-group docs
41
+
42
+ - name: Build documentation
43
+ run: |
44
+ cd docs
45
+ uv run make html
46
+
47
+ - name: Add .nojekyll file
48
+ run: touch docs/build/html/.nojekyll
49
+
50
+ - name: Upload artifact
51
+ uses: actions/upload-pages-artifact@v3
52
+ with:
53
+ path: 'docs/build/html'
54
+
55
+ deploy:
56
+ # Only deploy when a release is published
57
+ if: github.event_name == 'release'
58
+ environment:
59
+ name: github-pages
60
+ url: ${{ steps.deployment.outputs.page_url }}
61
+ runs-on: ubuntu-latest
62
+ needs: build
63
+ steps:
64
+ - name: Deploy to GitHub Pages
65
+ id: deployment
66
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,29 @@
1
+ name: Upload Python Package
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ build:
13
+ name: build and upload release to PyPI
14
+ runs-on: ubuntu-latest
15
+ environment: "release"
16
+ permissions:
17
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v6
24
+
25
+ - name: Build Package
26
+ run: uv build
27
+
28
+ - name: Publish package distributions to PyPI
29
+ run: uv publish
@@ -13,7 +13,7 @@ jobs:
13
13
  build:
14
14
  strategy:
15
15
  matrix:
16
- python-version: [3.9, "3.10", "3.11", "3.12"]
16
+ python-version: ["3.10.15", "3.11", "3.12", "3.13"]
17
17
  os:
18
18
  - "ubuntu-latest"
19
19
  - "windows-latest"
@@ -23,17 +23,11 @@ jobs:
23
23
  steps:
24
24
  - uses: actions/checkout@v4
25
25
 
26
- - name: Install uv
27
- uses: astral-sh/setup-uv@v2
28
- with:
29
- enable-cache: true
30
- cache-dependency-glob: "uv.lock"
31
-
32
- - name: Set up Python ${{ matrix.python-version }}
33
- run: uv python install ${{ matrix.python-version }}
26
+ - name: Install the latest version of uv
27
+ uses: astral-sh/setup-uv@v6
34
28
 
35
29
  - name: Install the project
36
- run: uv sync --all-extras --dev
30
+ run: uv sync --python ${{ matrix.python-version }}
37
31
 
38
32
  - name: Lint
39
33
  run:
@@ -70,8 +70,10 @@ instance/
70
70
 
71
71
  # Sphinx documentation
72
72
  docs/_build/
73
+ docs/build/
73
74
  docs/source/_build
74
75
  docs/source/generated
76
+ docs/source/api/generated
75
77
 
76
78
  # PyBuilder
77
79
  .pybuilder/
@@ -142,4 +144,6 @@ cython_debug/
142
144
  # JetBrains
143
145
  .idea/
144
146
 
145
- src/ezmsg/sigproc/__version__.py
147
+ src/ezmsg/sigproc/__version__.py
148
+ uv.lock
149
+ *.local.json
@@ -1,7 +1,6 @@
1
1
  repos:
2
2
  - repo: https://github.com/astral-sh/ruff-pre-commit
3
- # Ruff version.
4
- rev: v0.6.7
3
+ rev: v0.8.3
5
4
  hooks:
6
5
  # Run the linter.
7
6
  - id: ruff
@@ -0,0 +1,60 @@
1
+ Metadata-Version: 2.4
2
+ Name: ezmsg-sigproc
3
+ Version: 2.13.1
4
+ Summary: Timeseries signal processing implementations in ezmsg
5
+ Author-email: Griffin Milsap <griffin.milsap@gmail.com>, Preston Peranich <pperanich@gmail.com>, Chadwick Boulay <chadwick.boulay@gmail.com>, Kyle McGraw <kmcgraw@blackrockneuro.com>
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.10.15
9
+ Requires-Dist: array-api-compat>=1.11.1
10
+ Requires-Dist: ezmsg-baseproc>=1.1.0
11
+ Requires-Dist: ezmsg>=3.6.0
12
+ Requires-Dist: numba>=0.61.0
13
+ Requires-Dist: numpy>=1.26.0
14
+ Requires-Dist: pywavelets>=1.6.0
15
+ Requires-Dist: scipy>=1.13.1
16
+ Requires-Dist: sparse>=0.15.4
17
+ Description-Content-Type: text/markdown
18
+
19
+ # ezmsg-sigproc
20
+
21
+ Signal processing primitives for the [ezmsg](https://www.ezmsg.org) message-passing framework.
22
+
23
+ ## Features
24
+
25
+ * **Filtering** - Chebyshev, comb filters, and more
26
+ * **Spectral analysis** - Spectrogram, spectrum, and wavelet transforms
27
+ * **Resampling** - Downsample, decimate, and resample operations
28
+ * **Windowing** - Sliding windows and buffering utilities
29
+ * **Math operations** - Arithmetic, log, abs, difference, and more
30
+ * **Signal generation** - Synthetic signal generators
31
+
32
+ All modules use `AxisArray` as the primary data structure for passing signals between components.
33
+
34
+ ## Installation
35
+
36
+ Install from PyPI:
37
+
38
+ ```bash
39
+ pip install ezmsg-sigproc
40
+ ```
41
+
42
+ Or install from GitHub for the latest development version:
43
+
44
+ ```bash
45
+ pip install git+https://github.com/ezmsg-org/ezmsg-sigproc.git@dev
46
+ ```
47
+
48
+ ## Documentation
49
+
50
+ Full documentation is available at [ezmsg.org](https://www.ezmsg.org).
51
+
52
+ ## Development
53
+
54
+ We use [`uv`](https://docs.astral.sh/uv/) for development.
55
+
56
+ 1. Fork and clone the repository
57
+ 2. `uv sync` to create a virtual environment and install dependencies
58
+ 3. `uv run pre-commit install` to set up linting and formatting hooks
59
+ 4. `uv run pytest tests` to run the test suite
60
+ 5. Submit a PR against the `dev` branch
@@ -0,0 +1,42 @@
1
+ # ezmsg-sigproc
2
+
3
+ Signal processing primitives for the [ezmsg](https://www.ezmsg.org) message-passing framework.
4
+
5
+ ## Features
6
+
7
+ * **Filtering** - Chebyshev, comb filters, and more
8
+ * **Spectral analysis** - Spectrogram, spectrum, and wavelet transforms
9
+ * **Resampling** - Downsample, decimate, and resample operations
10
+ * **Windowing** - Sliding windows and buffering utilities
11
+ * **Math operations** - Arithmetic, log, abs, difference, and more
12
+ * **Signal generation** - Synthetic signal generators
13
+
14
+ All modules use `AxisArray` as the primary data structure for passing signals between components.
15
+
16
+ ## Installation
17
+
18
+ Install from PyPI:
19
+
20
+ ```bash
21
+ pip install ezmsg-sigproc
22
+ ```
23
+
24
+ Or install from GitHub for the latest development version:
25
+
26
+ ```bash
27
+ pip install git+https://github.com/ezmsg-org/ezmsg-sigproc.git@dev
28
+ ```
29
+
30
+ ## Documentation
31
+
32
+ Full documentation is available at [ezmsg.org](https://www.ezmsg.org).
33
+
34
+ ## Development
35
+
36
+ We use [`uv`](https://docs.astral.sh/uv/) for development.
37
+
38
+ 1. Fork and clone the repository
39
+ 2. `uv sync` to create a virtual environment and install dependencies
40
+ 3. `uv run pre-commit install` to set up linting and formatting hooks
41
+ 4. `uv run pytest tests` to run the test suite
42
+ 5. Submit a PR against the `dev` branch
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = source
9
+ BUILDDIR = build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,35 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=source
11
+ set BUILDDIR=build
12
+
13
+ if "%1" == "" goto help
14
+
15
+ %SPHINXBUILD% >NUL 2>NUL
16
+ if errorlevel 9009 (
17
+ echo.
18
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19
+ echo.installed, then set the SPHINXBUILD environment variable to point
20
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
21
+ echo.may add the Sphinx directory to PATH.
22
+ echo.
23
+ echo.If you don't have Sphinx installed, grab it from
24
+ echo.http://sphinx-doc.org/
25
+ exit /b 1
26
+ )
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd
@@ -0,0 +1,64 @@
1
+ {{ fullname | escape | underline}}
2
+
3
+ .. automodule:: {{ fullname }}
4
+
5
+ {% block attributes %}
6
+ {% if attributes %}
7
+ .. rubric:: Module Attributes
8
+
9
+ .. autosummary::
10
+ :toctree:
11
+ {% for item in attributes %}
12
+ {{ item }}
13
+ {%- endfor %}
14
+ {% endif %}
15
+ {% endblock %}
16
+
17
+ {% block functions %}
18
+ {% if functions %}
19
+ .. rubric:: Functions
20
+
21
+ {% for item in functions %}
22
+ .. autofunction:: {{ item }}
23
+ {%- endfor %}
24
+ {% endif %}
25
+ {% endblock %}
26
+
27
+ {% block classes %}
28
+ {% if classes %}
29
+ .. rubric:: Classes
30
+
31
+ {% for item in classes %}
32
+ .. autoclass:: {{ item }}
33
+ :members:
34
+ :undoc-members:
35
+ :show-inheritance:
36
+ :special-members: __init__
37
+ {%- endfor %}
38
+ {% endif %}
39
+ {% endblock %}
40
+
41
+ {% block exceptions %}
42
+ {% if exceptions %}
43
+ .. rubric:: Exceptions
44
+
45
+ {% for item in exceptions %}
46
+ .. autoexception:: {{ item }}
47
+ :members:
48
+ :show-inheritance:
49
+ {%- endfor %}
50
+ {% endif %}
51
+ {% endblock %}
52
+
53
+ {% block modules %}
54
+ {% if modules %}
55
+ .. rubric:: Modules
56
+
57
+ .. autosummary::
58
+ :toctree:
59
+ :recursive:
60
+ {% for item in modules %}
61
+ {{ item }}
62
+ {%- endfor %}
63
+ {% endif %}
64
+ {% endblock %}
@@ -0,0 +1,11 @@
1
+ API Reference
2
+ =============
3
+
4
+ This page contains auto-generated API reference documentation.
5
+
6
+ .. autosummary::
7
+ :toctree: generated
8
+ :recursive:
9
+ :template: autosummary/module.rst
10
+
11
+ ezmsg.sigproc
@@ -0,0 +1,128 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+
3
+ import os
4
+ import sys
5
+
6
+ # Add the source directory to the path
7
+ sys.path.insert(0, os.path.abspath("../../src"))
8
+
9
+ # -- Project information --------------------------
10
+
11
+ project = "ezmsg.sigproc"
12
+ copyright = "2024, ezmsg Contributors"
13
+ author = "ezmsg Contributors"
14
+
15
+ # The version is managed by hatch-vcs and stored in __version__.py
16
+ try:
17
+ from ezmsg.sigproc.__version__ import version as release
18
+ except ImportError:
19
+ release = "unknown"
20
+
21
+ # For display purposes, extract the base version without git commit info
22
+ version = release.split("+")[0] if release != "unknown" else release
23
+
24
+ # -- General configuration --------------------------
25
+
26
+ extensions = [
27
+ "sphinx.ext.autodoc",
28
+ "sphinx.ext.autosummary",
29
+ "sphinx.ext.napoleon",
30
+ "sphinx.ext.intersphinx",
31
+ "sphinx.ext.viewcode",
32
+ "sphinx.ext.duration",
33
+ # "sphinx_autodoc_typehints", # Disabled due to compatibility issue
34
+ "sphinx_copybutton",
35
+ "myst_parser", # For markdown files
36
+ ]
37
+
38
+ templates_path = ["_templates"]
39
+ source_suffix = {
40
+ ".rst": "restructuredtext",
41
+ ".md": "markdown",
42
+ }
43
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
44
+
45
+ # The toctree master document
46
+ master_doc = "index"
47
+
48
+ # -- Autodoc configuration ------------------------------
49
+
50
+ # Auto-generate API docs
51
+ autosummary_generate = True
52
+ autosummary_imported_members = False
53
+ autodoc_typehints = "description"
54
+ autodoc_member_order = "bysource"
55
+ autodoc_typehints_format = "short"
56
+ python_use_unqualified_type_names = True
57
+ autodoc_default_options = {
58
+ "members": True,
59
+ "member-order": "bysource",
60
+ "special-members": "__init__",
61
+ "undoc-members": True,
62
+ "show-inheritance": True,
63
+ }
64
+
65
+ # Don't show the full module path in the docs
66
+ add_module_names = False
67
+
68
+ # -- Intersphinx configuration --------------------------
69
+
70
+ intersphinx_mapping = {
71
+ "python": ("https://docs.python.org/3/", None),
72
+ "numpy": ("https://numpy.org/doc/stable/", None),
73
+ "scipy": ("https://scipy.org/doc/scipy/", None),
74
+ "ezmsg": ("https://www.ezmsg.org/ezmsg/", None),
75
+ "ezmsg.baseproc": ("https://www.ezmsg.org/ezmsg-baseproc/", None),
76
+ "ezmsg.learn": ("https://www.ezmsg.org/ezmsg-learn/", None),
77
+ "ezmsg.event": ("https://www.ezmsg.org/ezmsg-event/", None),
78
+ "ezmsg.lsl": ("https://www.ezmsg.org/ezmsg-lsl/", None),
79
+ "ezmsg.blackrock": ("https://www.ezmsg.org/ezmsg-blackrock/", None),
80
+ }
81
+ intersphinx_disabled_domains = ["std"]
82
+
83
+ # -- Options for HTML output -----------------------------
84
+
85
+ html_theme = "pydata_sphinx_theme"
86
+ html_static_path = ["_static"]
87
+
88
+ # Set the base URL for the documentation
89
+ html_baseurl = "https://www.ezmsg.org/ezmsg-sigproc/"
90
+
91
+ html_theme_options = {
92
+ "logo": {
93
+ "text": f"ezmsg.sigproc {version}",
94
+ "link": "https://ezmsg.org", # Link back to main site
95
+ },
96
+ "header_links_before_dropdown": 4,
97
+ "navbar_start": ["navbar-logo"],
98
+ "navbar_end": ["theme-switcher", "navbar-icon-links"],
99
+ "icon_links": [
100
+ {
101
+ "name": "GitHub",
102
+ "url": "https://github.com/ezmsg-org/ezmsg-sigproc",
103
+ "icon": "fa-brands fa-github",
104
+ },
105
+ {
106
+ "name": "ezmsg.org",
107
+ "url": "https://www.ezmsg.org",
108
+ "icon": "fa-solid fa-house",
109
+ },
110
+ ],
111
+ }
112
+
113
+ # Timestamp is inserted at every page bottom in this strftime format.
114
+ html_last_updated_fmt = "%Y-%m-%d"
115
+
116
+ # -- Options for linkcode -----------------------------
117
+
118
+ branch = "main"
119
+ code_url = f"https://github.com/ezmsg-org/ezmsg-sigproc/blob/{branch}/"
120
+
121
+
122
+ def linkcode_resolve(domain, info):
123
+ if domain != "py":
124
+ return None
125
+ if not info["module"]:
126
+ return None
127
+ filename = info["module"].replace(".", "/")
128
+ return f"{code_url}src/{filename}.py"
@@ -0,0 +1,87 @@
1
+ ## HybridBuffer
2
+
3
+ The HybridBuffer is a stateful, FIFO buffer that combines a deque for fast appends with a contiguous circular buffer for efficient, advancing reads. The synchronization between the deque and the circular buffer can be immediate, upon threshold reaching, or on demand, allowing for flexible data management strategies.
4
+
5
+ This buffer is designed to be agnostic to the array library used (e.g., NumPy, CuPy, PyTorch) via the Python Array API standard.
6
+
7
+ ### Basic Reading and Writing Behaviour
8
+
9
+ The following diagram illustrates the states of the HybridBuffer across data writes and reads when `update_strategy="on_demand"`:
10
+
11
+ ![HybridBuffer Basic States](img/HybridBufferBasic.svg)
12
+
13
+ **Figure 1**
14
+
15
+ A. In the initial state, the buffer is empty, with no data in either the deque or the circular buffer.
16
+ * deq_len=0; available=0, tell=0
17
+
18
+ B. After we `write()` 4 samples, the deque contains the new data, but the circular buffer is still empty.
19
+ * deq_len=4; available=4, tell=0
20
+
21
+ C. After we `write()` 4 more samples, the deque now has 2 messages, each with 4 samples, and the circular buffer remains untouched.
22
+ * deq_len=8; available=8, tell=0
23
+
24
+ D. Panels D-F depict a single call to `read(4)` which is implemented as calls to other methods. If we don't have 4 unread samples in the circular buffer, but we do have >= 4 samples 'available' (i.e., including the deque), then a `flush()` is performed: the entirety of the data in the deque are copied to the circular buffer and the deque is cleared.
25
+ * deq_len=0; available=8, tell=0
26
+ * TODO: Currently `flush()` copies the data twice, once from the deque to a contiguous array, and then from that contiguous array to the circular buffer. This should be optimized to copy directly from the deque to the circular buffer.
27
+
28
+ E. Next we `peek(4)` which returns the first 4 samples from the circular buffer; the return value may be a view on the data if the data are contiguous in the circular buffer, or a copy if the data are not contiguous. Note that the tail (read pointer) does not advance with `peek()`.
29
+ * deq_len=0; available=8, tell=0
30
+
31
+ F. Finally, we `seek(4)` to advance the tail.
32
+ * deq_len=0; available=4, tell=4
33
+
34
+ G. We `write()` 4 more samples, which are appended to the deque, leaving the circular buffer unchanged from the previous step.
35
+ * deq_len=4; available=8, tell=4
36
+
37
+ H. We then `read(4)` again. This time, a `flush()` is not triggered because we have enough unread samples in the circular buffer, but `peek(4)` and `seek(4)` are still called. The read pointer advances by 4, leaving 0 unread samples in the circular buffer and 4 in the deque.
38
+ * deq_len=4; available=0, tell=8
39
+
40
+ Note: `peek(n)` and `seek(n)`, where `n` > `n_available` will raise an error. However, `peek(None)` will return all available samples without error, and `seek(None)` will advance the tail to the end of the available data.
41
+
42
+ ### Overflow Behaviour
43
+
44
+ The criteria to trigger an overflow are as follows:
45
+ * the deque has more data than there is space in the circular buffer, where space is the combination of previously read samples and unwritten samples in the circular buffer.
46
+ * the caller triggers a flush either manually (`flush()`) or by requesting (via `read`, `peek`, or `seek`) more samples than are available in the circular buffer but not more than the total size of the available samples in the buffer + available samples in the deque.
47
+
48
+ ![HybridBuffer Overflow Behaviour](img/HybridBufferOverflow.svg)
49
+
50
+ **Figure 2**
51
+
52
+ A. We start with a circular buffer that has been running for a while (it has wrapped around several times). At this particular moment, we have more data in the deque (12) than we have room in the buffer (8). The remaining figures describe what happens when `flush()` is called with different overflow strategies. The samples are labeled to make it easier to follow the flow of data.
53
+ * deq_len=12; available=20, tell=1
54
+
55
+ B. "warn-overwrite": If the overflow_strategy is set to 'warn-overwrite', the HybridBuffer will log a warning and overwrite the oldest data in the circular buffer with the new data from the deque. Here, samples 'a-d' are lost.
56
+ * deq_len=0; available=16, tell=0
57
+
58
+ C. "drop": As much as possible of the data from the deque are copied into the circular buffer, but remaining data are dropped. In this case, samples 'q-t' are lost.
59
+ * deq_len=0; available=16, tell=0
60
+
61
+ D. "grow": The HybridBuffer will attempt to grow the circular buffer to the lesser of double its current size or the size required to accommodate all read + unread + deque data. If the buffer cannot grow (e.g., due to memory constraints; default max_size is 1GB), it will raise an error.
62
+ * deq_len=0; available=20, tell=8
63
+
64
+ Additionally, one can configure the HybridBuffer overflow_strategy to 'raise', which will raise an error if there is insufficient space (empty or read samples) in the buffer to perform the flush.
65
+
66
+ There are a few mitigations to defer flushing to help prevent overflows:
67
+
68
+ * If the requested number of samples to read, peek, or seek is less than the number of unread samples in the circular buffer, then no flush is performed.
69
+ * Helper methods `peek_at(k, allow_flush=False)` (False is default), and `peek_last()` will retrieve the target sample from the buffer-OR-deque without flushing.
70
+ * Be cautious relying on repeated calls to `peek_at(k, allow_flush=False)` as it scans over the items in the deque which can be slow.
71
+ * When calling `read(n)`, if a flush is necessary, and it will cause an overflow, and the overflow could be prevented with a pre-emptive read up to `n`, then it will do the read in 2 parts. First it will call `peek(n_unread_in_buffer)` and `seek(n_unread_in_buffer)` to read the unread samples in the circular buffer. Second, it will call `peek(n_remaining)` and `seek(n_remaining)` to trigger a flush -- which should no longer cause an overflow -- then read the remaining requested samples and stitch them together.
72
+
73
+ ### Advanced Pointer Manipulation
74
+
75
+ The previous section describes how `read`, `peek`, `seek`, and `peek_at` function in normal use cases. It is also possible to call `seek` with a negative value, which will attempt to move the tail pointer backwards over previously-read (or previously sought-over) data by that many samples. `seek` returns the number of samples that were actually moved, which may be less than the requested value if there was insufficient room. Negative seeks can only rewind into previously read data, and positive seeks can only advance into unread data, possibly including data that gets flushed from the deque.
76
+
77
+ ## HybridAxisBuffer
78
+
79
+ The `HybridAxisBuffer` carries the semantics of the `HybridBuffer` but it is designed to handle either a `LinearAxis` or a `CoordinateAxis`. Its `write` method expects an axis object and its `peek` and `read` methods return an axis, not just the data.
80
+
81
+ For a `LinearAxis`, the `HybridAxisBuffer` simply maintains the `gain`, the `offset`, and the 'number of samples available'. Since this does not store actual data, it has no capacity. If this object is intended to be synchronized with another `HybridBuffer`-using object that does have a capacity, then the other object should be manipulated first and then the number of samples actually moved should be used to call the `HybridAxisBuffer`'s methods, otherwise these objects will be out of sync.
82
+
83
+ For a `CoordinateAxis`, the `HybridAxisBuffer` maintains the `data` in a `HybridBuffer` and thus behaves like a `HybridBuffer` with respect to the capacity. The returned `CoordinateAxis` object might have its `.data` field as a view on the data in the buffer, so it should not be modified in place.
84
+
85
+ ## HybridAxisArrayBuffer
86
+
87
+ This is a convenience class that combines the `HybridAxisBuffer` and `HybridBuffer` into a single object that can be used to manage both axis and data in a single object. This class is particularly useful when you need to manage both the axis information and the data samples together, as is the case for an `AxisArray` object. Its `write` method expects an `AxisArary` object and its `peek` and `read` methods return an `AxisArray` object. Note that the return object's `.data` field might be a view on the data in the buffer so it should not be modified in place. Similarly so for the `CoordinateAxis` data.