ezmsg-sigproc 2.6.0__py3-none-any.whl → 2.7.0__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.
- ezmsg/sigproc/__version__.py +2 -2
- ezmsg/sigproc/activation.py +1 -1
- ezmsg/sigproc/adaptive_lattice_notch.py +1 -2
- ezmsg/sigproc/affinetransform.py +3 -4
- ezmsg/sigproc/aggregate.py +6 -6
- ezmsg/sigproc/bandpower.py +6 -6
- ezmsg/sigproc/coordinatespaces.py +142 -0
- ezmsg/sigproc/decimate.py +1 -1
- ezmsg/sigproc/downsample.py +5 -6
- ezmsg/sigproc/ewma.py +1 -2
- ezmsg/sigproc/fbcca.py +4 -4
- ezmsg/sigproc/filterbank.py +5 -5
- ezmsg/sigproc/filterbankdesign.py +4 -4
- ezmsg/sigproc/math/abs.py +3 -0
- ezmsg/sigproc/math/add.py +1 -1
- ezmsg/sigproc/math/clip.py +3 -0
- ezmsg/sigproc/math/difference.py +2 -0
- ezmsg/sigproc/math/invert.py +2 -0
- ezmsg/sigproc/math/log.py +3 -0
- ezmsg/sigproc/math/scale.py +2 -0
- ezmsg/sigproc/quantize.py +1 -2
- ezmsg/sigproc/resample.py +4 -4
- ezmsg/sigproc/sampler.py +6 -6
- ezmsg/sigproc/scaler.py +4 -5
- ezmsg/sigproc/signalinjector.py +3 -4
- ezmsg/sigproc/slicer.py +5 -6
- ezmsg/sigproc/spectrogram.py +4 -4
- ezmsg/sigproc/spectrum.py +5 -6
- ezmsg/sigproc/transpose.py +5 -6
- ezmsg/sigproc/util/axisarray_buffer.py +2 -0
- ezmsg/sigproc/util/buffer.py +4 -0
- ezmsg/sigproc/util/sparse.py +2 -0
- ezmsg/sigproc/wavelets.py +4 -4
- ezmsg/sigproc/window.py +5 -5
- ezmsg_sigproc-2.7.0.dist-info/METADATA +60 -0
- ezmsg_sigproc-2.7.0.dist-info/RECORD +64 -0
- ezmsg_sigproc-2.6.0.dist-info/METADATA +0 -73
- ezmsg_sigproc-2.6.0.dist-info/RECORD +0 -63
- {ezmsg_sigproc-2.6.0.dist-info → ezmsg_sigproc-2.7.0.dist-info}/WHEEL +0 -0
- {ezmsg_sigproc-2.6.0.dist-info → ezmsg_sigproc-2.7.0.dist-info}/licenses/LICENSE +0 -0
ezmsg/sigproc/__version__.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '2.
|
|
32
|
-
__version_tuple__ = version_tuple = (2,
|
|
31
|
+
__version__ = version = '2.7.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (2, 7, 0)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
ezmsg/sigproc/activation.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import ezmsg.core as ez
|
|
2
2
|
import scipy.special
|
|
3
|
+
from ezmsg.baseproc import BaseTransformer, BaseTransformerUnit
|
|
3
4
|
from ezmsg.util.messages.axisarray import AxisArray
|
|
4
5
|
from ezmsg.util.messages.util import replace
|
|
5
6
|
|
|
6
|
-
from .base import BaseTransformer, BaseTransformerUnit
|
|
7
7
|
from .spectral import OptionsEnum
|
|
8
8
|
|
|
9
9
|
|
|
@@ -2,11 +2,10 @@ import ezmsg.core as ez
|
|
|
2
2
|
import numpy as np
|
|
3
3
|
import numpy.typing as npt
|
|
4
4
|
import scipy.signal
|
|
5
|
+
from ezmsg.baseproc import BaseStatefulTransformer, processor_state
|
|
5
6
|
from ezmsg.util.messages.axisarray import AxisArray, CoordinateAxis
|
|
6
7
|
from ezmsg.util.messages.util import replace
|
|
7
8
|
|
|
8
|
-
from .base import BaseStatefulTransformer, processor_state
|
|
9
|
-
|
|
10
9
|
|
|
11
10
|
class AdaptiveLatticeNotchFilterSettings(ez.Settings):
|
|
12
11
|
"""Settings for the Adaptive Lattice Notch Filter."""
|
ezmsg/sigproc/affinetransform.py
CHANGED
|
@@ -4,15 +4,14 @@ from pathlib import Path
|
|
|
4
4
|
import ezmsg.core as ez
|
|
5
5
|
import numpy as np
|
|
6
6
|
import numpy.typing as npt
|
|
7
|
-
from ezmsg.
|
|
8
|
-
from ezmsg.util.messages.util import replace
|
|
9
|
-
|
|
10
|
-
from .base import (
|
|
7
|
+
from ezmsg.baseproc import (
|
|
11
8
|
BaseStatefulTransformer,
|
|
12
9
|
BaseTransformer,
|
|
13
10
|
BaseTransformerUnit,
|
|
14
11
|
processor_state,
|
|
15
12
|
)
|
|
13
|
+
from ezmsg.util.messages.axisarray import AxisArray, AxisBase
|
|
14
|
+
from ezmsg.util.messages.util import replace
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
class AffineTransformSettings(ez.Settings):
|
ezmsg/sigproc/aggregate.py
CHANGED
|
@@ -4,6 +4,12 @@ import ezmsg.core as ez
|
|
|
4
4
|
import numpy as np
|
|
5
5
|
import numpy.typing as npt
|
|
6
6
|
from array_api_compat import get_namespace
|
|
7
|
+
from ezmsg.baseproc import (
|
|
8
|
+
BaseStatefulTransformer,
|
|
9
|
+
BaseTransformer,
|
|
10
|
+
BaseTransformerUnit,
|
|
11
|
+
processor_state,
|
|
12
|
+
)
|
|
7
13
|
from ezmsg.util.messages.axisarray import (
|
|
8
14
|
AxisArray,
|
|
9
15
|
AxisBase,
|
|
@@ -11,12 +17,6 @@ from ezmsg.util.messages.axisarray import (
|
|
|
11
17
|
slice_along_axis,
|
|
12
18
|
)
|
|
13
19
|
|
|
14
|
-
from .base import (
|
|
15
|
-
BaseStatefulTransformer,
|
|
16
|
-
BaseTransformer,
|
|
17
|
-
BaseTransformerUnit,
|
|
18
|
-
processor_state,
|
|
19
|
-
)
|
|
20
20
|
from .spectral import OptionsEnum
|
|
21
21
|
|
|
22
22
|
|
ezmsg/sigproc/bandpower.py
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
from dataclasses import field
|
|
2
2
|
|
|
3
3
|
import ezmsg.core as ez
|
|
4
|
+
from ezmsg.baseproc import (
|
|
5
|
+
BaseProcessor,
|
|
6
|
+
BaseStatefulProcessor,
|
|
7
|
+
BaseTransformerUnit,
|
|
8
|
+
CompositeProcessor,
|
|
9
|
+
)
|
|
4
10
|
from ezmsg.util.messages.axisarray import AxisArray
|
|
5
11
|
|
|
6
12
|
from .aggregate import (
|
|
@@ -8,12 +14,6 @@ from .aggregate import (
|
|
|
8
14
|
RangedAggregateSettings,
|
|
9
15
|
RangedAggregateTransformer,
|
|
10
16
|
)
|
|
11
|
-
from .base import (
|
|
12
|
-
BaseProcessor,
|
|
13
|
-
BaseStatefulProcessor,
|
|
14
|
-
BaseTransformerUnit,
|
|
15
|
-
CompositeProcessor,
|
|
16
|
-
)
|
|
17
17
|
from .spectrogram import SpectrogramSettings, SpectrogramTransformer
|
|
18
18
|
|
|
19
19
|
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Coordinate space transformations for streaming data.
|
|
3
|
+
|
|
4
|
+
This module provides utilities and ezmsg nodes for transforming between
|
|
5
|
+
Cartesian (x, y) and polar (r, theta) coordinate systems.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from enum import Enum
|
|
9
|
+
from typing import Tuple
|
|
10
|
+
|
|
11
|
+
import ezmsg.core as ez
|
|
12
|
+
import numpy as np
|
|
13
|
+
import numpy.typing as npt
|
|
14
|
+
from ezmsg.baseproc import (
|
|
15
|
+
BaseTransformer,
|
|
16
|
+
BaseTransformerUnit,
|
|
17
|
+
)
|
|
18
|
+
from ezmsg.util.messages.axisarray import AxisArray, replace
|
|
19
|
+
|
|
20
|
+
# -- Utility functions for coordinate transformations --
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def polar2z(r: npt.ArrayLike, theta: npt.ArrayLike) -> npt.ArrayLike:
|
|
24
|
+
"""Convert polar coordinates to complex number representation."""
|
|
25
|
+
return r * np.exp(1j * theta)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def z2polar(z: npt.ArrayLike) -> Tuple[npt.ArrayLike, npt.ArrayLike]:
|
|
29
|
+
"""Convert complex number to polar coordinates (r, theta)."""
|
|
30
|
+
return np.abs(z), np.angle(z)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def cart2z(x: npt.ArrayLike, y: npt.ArrayLike) -> npt.ArrayLike:
|
|
34
|
+
"""Convert Cartesian coordinates to complex number representation."""
|
|
35
|
+
return x + 1j * y
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def z2cart(z: npt.ArrayLike) -> Tuple[npt.ArrayLike, npt.ArrayLike]:
|
|
39
|
+
"""Convert complex number to Cartesian coordinates (x, y)."""
|
|
40
|
+
return np.real(z), np.imag(z)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def cart2pol(x: npt.ArrayLike, y: npt.ArrayLike) -> Tuple[npt.ArrayLike, npt.ArrayLike]:
|
|
44
|
+
"""Convert Cartesian coordinates (x, y) to polar coordinates (r, theta)."""
|
|
45
|
+
return z2polar(cart2z(x, y))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def pol2cart(r: npt.ArrayLike, theta: npt.ArrayLike) -> Tuple[npt.ArrayLike, npt.ArrayLike]:
|
|
49
|
+
"""Convert polar coordinates (r, theta) to Cartesian coordinates (x, y)."""
|
|
50
|
+
return z2cart(polar2z(r, theta))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
# -- ezmsg transformer classes --
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class CoordinateMode(str, Enum):
|
|
57
|
+
"""Transformation mode for coordinate conversion."""
|
|
58
|
+
|
|
59
|
+
CART2POL = "cart2pol"
|
|
60
|
+
"""Convert Cartesian (x, y) to polar (r, theta)."""
|
|
61
|
+
|
|
62
|
+
POL2CART = "pol2cart"
|
|
63
|
+
"""Convert polar (r, theta) to Cartesian (x, y)."""
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class CoordinateSpacesSettings(ez.Settings):
|
|
67
|
+
"""
|
|
68
|
+
Settings for :obj:`CoordinateSpaces`.
|
|
69
|
+
|
|
70
|
+
See :obj:`coordinate_spaces` for argument details.
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
mode: CoordinateMode = CoordinateMode.CART2POL
|
|
74
|
+
"""The transformation mode: 'cart2pol' or 'pol2cart'."""
|
|
75
|
+
|
|
76
|
+
axis: str | None = None
|
|
77
|
+
"""
|
|
78
|
+
The name of the axis containing the coordinate components.
|
|
79
|
+
Defaults to the last axis. Must have exactly 2 elements (x,y or r,theta).
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class CoordinateSpacesTransformer(BaseTransformer[CoordinateSpacesSettings, AxisArray, AxisArray]):
|
|
84
|
+
"""
|
|
85
|
+
Transform between Cartesian and polar coordinate systems.
|
|
86
|
+
|
|
87
|
+
The input must have exactly 2 elements along the specified axis:
|
|
88
|
+
- For cart2pol: expects (x, y), outputs (r, theta)
|
|
89
|
+
- For pol2cart: expects (r, theta), outputs (x, y)
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
def _process(self, message: AxisArray) -> AxisArray:
|
|
93
|
+
axis = self.settings.axis or message.dims[-1]
|
|
94
|
+
axis_idx = message.get_axis_idx(axis)
|
|
95
|
+
|
|
96
|
+
if message.data.shape[axis_idx] != 2:
|
|
97
|
+
raise ValueError(
|
|
98
|
+
f"Coordinate transformation requires exactly 2 elements along axis '{axis}', "
|
|
99
|
+
f"got {message.data.shape[axis_idx]}."
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# Extract components along the specified axis
|
|
103
|
+
slices_a = [slice(None)] * message.data.ndim
|
|
104
|
+
slices_b = [slice(None)] * message.data.ndim
|
|
105
|
+
slices_a[axis_idx] = 0
|
|
106
|
+
slices_b[axis_idx] = 1
|
|
107
|
+
|
|
108
|
+
component_a = message.data[tuple(slices_a)]
|
|
109
|
+
component_b = message.data[tuple(slices_b)]
|
|
110
|
+
|
|
111
|
+
if self.settings.mode == CoordinateMode.CART2POL:
|
|
112
|
+
# Input: x, y -> Output: r, theta
|
|
113
|
+
out_a, out_b = cart2pol(component_a, component_b)
|
|
114
|
+
else:
|
|
115
|
+
# Input: r, theta -> Output: x, y
|
|
116
|
+
out_a, out_b = pol2cart(component_a, component_b)
|
|
117
|
+
|
|
118
|
+
# Stack results back along the same axis
|
|
119
|
+
result = np.stack([out_a, out_b], axis=axis_idx)
|
|
120
|
+
|
|
121
|
+
# Update axis labels if present
|
|
122
|
+
axes = message.axes
|
|
123
|
+
if axis in axes and hasattr(axes[axis], "data"):
|
|
124
|
+
if self.settings.mode == CoordinateMode.CART2POL:
|
|
125
|
+
new_labels = np.array(["r", "theta"])
|
|
126
|
+
else:
|
|
127
|
+
new_labels = np.array(["x", "y"])
|
|
128
|
+
axes = {**axes, axis: replace(axes[axis], data=new_labels)}
|
|
129
|
+
|
|
130
|
+
return replace(message, data=result, axes=axes)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
class CoordinateSpaces(
|
|
134
|
+
BaseTransformerUnit[CoordinateSpacesSettings, AxisArray, AxisArray, CoordinateSpacesTransformer]
|
|
135
|
+
):
|
|
136
|
+
"""
|
|
137
|
+
Unit for transforming between Cartesian and polar coordinate systems.
|
|
138
|
+
|
|
139
|
+
See :obj:`CoordinateSpacesSettings` for configuration options.
|
|
140
|
+
"""
|
|
141
|
+
|
|
142
|
+
SETTINGS = CoordinateSpacesSettings
|
ezmsg/sigproc/decimate.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import typing
|
|
2
2
|
|
|
3
3
|
import ezmsg.core as ez
|
|
4
|
+
from ezmsg.baseproc import BaseTransformerUnit
|
|
4
5
|
from ezmsg.util.messages.axisarray import AxisArray
|
|
5
6
|
|
|
6
|
-
from .base import BaseTransformerUnit
|
|
7
7
|
from .cheby import ChebyshevFilterSettings, ChebyshevFilterTransformer
|
|
8
8
|
from .downsample import Downsample, DownsampleSettings
|
|
9
9
|
from .filter import BACoeffs, SOSCoeffs
|
ezmsg/sigproc/downsample.py
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import ezmsg.core as ez
|
|
2
2
|
import numpy as np
|
|
3
|
+
from ezmsg.baseproc import (
|
|
4
|
+
BaseStatefulTransformer,
|
|
5
|
+
BaseTransformerUnit,
|
|
6
|
+
processor_state,
|
|
7
|
+
)
|
|
3
8
|
from ezmsg.util.messages.axisarray import (
|
|
4
9
|
AxisArray,
|
|
5
10
|
replace,
|
|
6
11
|
slice_along_axis,
|
|
7
12
|
)
|
|
8
13
|
|
|
9
|
-
from .base import (
|
|
10
|
-
BaseStatefulTransformer,
|
|
11
|
-
BaseTransformerUnit,
|
|
12
|
-
processor_state,
|
|
13
|
-
)
|
|
14
|
-
|
|
15
14
|
|
|
16
15
|
class DownsampleSettings(ez.Settings):
|
|
17
16
|
"""
|
ezmsg/sigproc/ewma.py
CHANGED
|
@@ -5,11 +5,10 @@ import ezmsg.core as ez
|
|
|
5
5
|
import numpy as np
|
|
6
6
|
import numpy.typing as npt
|
|
7
7
|
import scipy.signal as sps
|
|
8
|
+
from ezmsg.baseproc import BaseStatefulTransformer, BaseTransformerUnit, processor_state
|
|
8
9
|
from ezmsg.util.messages.axisarray import AxisArray, slice_along_axis
|
|
9
10
|
from ezmsg.util.messages.util import replace
|
|
10
11
|
|
|
11
|
-
from .base import BaseStatefulTransformer, BaseTransformerUnit, processor_state
|
|
12
|
-
|
|
13
12
|
|
|
14
13
|
def _tau_from_alpha(alpha: float, dt: float) -> float:
|
|
15
14
|
"""
|
ezmsg/sigproc/fbcca.py
CHANGED
|
@@ -4,16 +4,16 @@ from dataclasses import field
|
|
|
4
4
|
|
|
5
5
|
import ezmsg.core as ez
|
|
6
6
|
import numpy as np
|
|
7
|
-
from ezmsg.
|
|
8
|
-
from ezmsg.util.messages.util import replace
|
|
9
|
-
|
|
10
|
-
from .base import (
|
|
7
|
+
from ezmsg.baseproc import (
|
|
11
8
|
BaseProcessor,
|
|
12
9
|
BaseStatefulProcessor,
|
|
13
10
|
BaseTransformer,
|
|
14
11
|
BaseTransformerUnit,
|
|
15
12
|
CompositeProcessor,
|
|
16
13
|
)
|
|
14
|
+
from ezmsg.util.messages.axisarray import AxisArray
|
|
15
|
+
from ezmsg.util.messages.util import replace
|
|
16
|
+
|
|
17
17
|
from .filterbankdesign import (
|
|
18
18
|
FilterbankDesignSettings,
|
|
19
19
|
FilterbankDesignTransformer,
|
ezmsg/sigproc/filterbank.py
CHANGED
|
@@ -7,15 +7,15 @@ import numpy as np
|
|
|
7
7
|
import numpy.typing as npt
|
|
8
8
|
import scipy.fft as sp_fft
|
|
9
9
|
import scipy.signal as sps
|
|
10
|
-
from ezmsg.
|
|
11
|
-
from ezmsg.util.messages.util import replace
|
|
12
|
-
from scipy.special import lambertw
|
|
13
|
-
|
|
14
|
-
from .base import (
|
|
10
|
+
from ezmsg.baseproc import (
|
|
15
11
|
BaseStatefulTransformer,
|
|
16
12
|
BaseTransformerUnit,
|
|
17
13
|
processor_state,
|
|
18
14
|
)
|
|
15
|
+
from ezmsg.util.messages.axisarray import AxisArray
|
|
16
|
+
from ezmsg.util.messages.util import replace
|
|
17
|
+
from scipy.special import lambertw
|
|
18
|
+
|
|
19
19
|
from .spectrum import OptionsEnum
|
|
20
20
|
from .window import WindowTransformer
|
|
21
21
|
|
|
@@ -3,13 +3,13 @@ import typing
|
|
|
3
3
|
import ezmsg.core as ez
|
|
4
4
|
import numpy as np
|
|
5
5
|
import numpy.typing as npt
|
|
6
|
-
from ezmsg.
|
|
7
|
-
from ezmsg.util.messages.util import replace
|
|
8
|
-
|
|
9
|
-
from .base import (
|
|
6
|
+
from ezmsg.baseproc import (
|
|
10
7
|
BaseStatefulTransformer,
|
|
11
8
|
processor_state,
|
|
12
9
|
)
|
|
10
|
+
from ezmsg.util.messages.axisarray import AxisArray
|
|
11
|
+
from ezmsg.util.messages.util import replace
|
|
12
|
+
|
|
13
13
|
from .filterbank import (
|
|
14
14
|
FilterbankMode,
|
|
15
15
|
FilterbankSettings,
|
ezmsg/sigproc/math/abs.py
CHANGED
ezmsg/sigproc/math/add.py
CHANGED
ezmsg/sigproc/math/clip.py
CHANGED
ezmsg/sigproc/math/difference.py
CHANGED
ezmsg/sigproc/math/invert.py
CHANGED
ezmsg/sigproc/math/log.py
CHANGED
ezmsg/sigproc/math/scale.py
CHANGED
ezmsg/sigproc/quantize.py
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import ezmsg.core as ez
|
|
2
2
|
import numpy as np
|
|
3
|
+
from ezmsg.baseproc import BaseTransformer, BaseTransformerUnit
|
|
3
4
|
from ezmsg.util.messages.axisarray import AxisArray, replace
|
|
4
5
|
|
|
5
|
-
from .base import BaseTransformer, BaseTransformerUnit
|
|
6
|
-
|
|
7
6
|
|
|
8
7
|
class QuantizeSettings(ez.Settings):
|
|
9
8
|
"""
|
ezmsg/sigproc/resample.py
CHANGED
|
@@ -5,14 +5,14 @@ import time
|
|
|
5
5
|
import ezmsg.core as ez
|
|
6
6
|
import numpy as np
|
|
7
7
|
import scipy.interpolate
|
|
8
|
-
from ezmsg.
|
|
9
|
-
from ezmsg.util.messages.util import replace
|
|
10
|
-
|
|
11
|
-
from .base import (
|
|
8
|
+
from ezmsg.baseproc import (
|
|
12
9
|
BaseConsumerUnit,
|
|
13
10
|
BaseStatefulProcessor,
|
|
14
11
|
processor_state,
|
|
15
12
|
)
|
|
13
|
+
from ezmsg.util.messages.axisarray import AxisArray, LinearAxis
|
|
14
|
+
from ezmsg.util.messages.util import replace
|
|
15
|
+
|
|
16
16
|
from .util.axisarray_buffer import HybridAxisArrayBuffer, HybridAxisBuffer
|
|
17
17
|
from .util.buffer import UpdateStrategy
|
|
18
18
|
|
ezmsg/sigproc/sampler.py
CHANGED
|
@@ -6,12 +6,7 @@ from collections import deque
|
|
|
6
6
|
|
|
7
7
|
import ezmsg.core as ez
|
|
8
8
|
import numpy as np
|
|
9
|
-
from ezmsg.
|
|
10
|
-
AxisArray,
|
|
11
|
-
)
|
|
12
|
-
from ezmsg.util.messages.util import replace
|
|
13
|
-
|
|
14
|
-
from .base import (
|
|
9
|
+
from ezmsg.baseproc import (
|
|
15
10
|
BaseConsumerUnit,
|
|
16
11
|
BaseProducerUnit,
|
|
17
12
|
BaseStatefulProducer,
|
|
@@ -19,6 +14,11 @@ from .base import (
|
|
|
19
14
|
BaseTransformerUnit,
|
|
20
15
|
processor_state,
|
|
21
16
|
)
|
|
17
|
+
from ezmsg.util.messages.axisarray import (
|
|
18
|
+
AxisArray,
|
|
19
|
+
)
|
|
20
|
+
from ezmsg.util.messages.util import replace
|
|
21
|
+
|
|
22
22
|
from .util.axisarray_buffer import HybridAxisArrayBuffer
|
|
23
23
|
from .util.buffer import UpdateStrategy
|
|
24
24
|
from .util.message import SampleMessage, SampleTriggerMessage
|
ezmsg/sigproc/scaler.py
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import typing
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
|
-
from ezmsg.
|
|
5
|
-
from ezmsg.util.messages.axisarray import AxisArray
|
|
6
|
-
from ezmsg.util.messages.util import replace
|
|
7
|
-
|
|
8
|
-
from .base import (
|
|
4
|
+
from ezmsg.baseproc import (
|
|
9
5
|
BaseStatefulTransformer,
|
|
10
6
|
BaseTransformerUnit,
|
|
11
7
|
processor_state,
|
|
12
8
|
)
|
|
9
|
+
from ezmsg.util.generator import consumer
|
|
10
|
+
from ezmsg.util.messages.axisarray import AxisArray
|
|
11
|
+
from ezmsg.util.messages.util import replace
|
|
13
12
|
|
|
14
13
|
# Imports for backwards compatibility with previous module location
|
|
15
14
|
from .ewma import EWMA_Deprecated as EWMA_Deprecated
|
ezmsg/sigproc/signalinjector.py
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import ezmsg.core as ez
|
|
2
2
|
import numpy as np
|
|
3
3
|
import numpy.typing as npt
|
|
4
|
-
from ezmsg.
|
|
5
|
-
from ezmsg.util.messages.util import replace
|
|
6
|
-
|
|
7
|
-
from .base import (
|
|
4
|
+
from ezmsg.baseproc import (
|
|
8
5
|
BaseAsyncTransformer,
|
|
9
6
|
BaseTransformerUnit,
|
|
10
7
|
processor_state,
|
|
11
8
|
)
|
|
9
|
+
from ezmsg.util.messages.axisarray import AxisArray
|
|
10
|
+
from ezmsg.util.messages.util import replace
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
class SignalInjectorSettings(ez.Settings):
|
ezmsg/sigproc/slicer.py
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import ezmsg.core as ez
|
|
2
2
|
import numpy as np
|
|
3
3
|
import numpy.typing as npt
|
|
4
|
+
from ezmsg.baseproc import (
|
|
5
|
+
BaseStatefulTransformer,
|
|
6
|
+
BaseTransformerUnit,
|
|
7
|
+
processor_state,
|
|
8
|
+
)
|
|
4
9
|
from ezmsg.util.messages.axisarray import (
|
|
5
10
|
AxisArray,
|
|
6
11
|
AxisBase,
|
|
@@ -8,12 +13,6 @@ from ezmsg.util.messages.axisarray import (
|
|
|
8
13
|
slice_along_axis,
|
|
9
14
|
)
|
|
10
15
|
|
|
11
|
-
from .base import (
|
|
12
|
-
BaseStatefulTransformer,
|
|
13
|
-
BaseTransformerUnit,
|
|
14
|
-
processor_state,
|
|
15
|
-
)
|
|
16
|
-
|
|
17
16
|
"""
|
|
18
17
|
Slicer:Select a subset of data along a particular axis.
|
|
19
18
|
"""
|
ezmsg/sigproc/spectrogram.py
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
from typing import Generator
|
|
2
2
|
|
|
3
3
|
import ezmsg.core as ez
|
|
4
|
-
from ezmsg.
|
|
5
|
-
from ezmsg.util.messages.modify import modify_axis
|
|
6
|
-
|
|
7
|
-
from .base import (
|
|
4
|
+
from ezmsg.baseproc import (
|
|
8
5
|
BaseStatefulProcessor,
|
|
9
6
|
BaseTransformerUnit,
|
|
10
7
|
CompositeProcessor,
|
|
11
8
|
)
|
|
9
|
+
from ezmsg.util.messages.axisarray import AxisArray
|
|
10
|
+
from ezmsg.util.messages.modify import modify_axis
|
|
11
|
+
|
|
12
12
|
from .spectrum import (
|
|
13
13
|
SpectralOutput,
|
|
14
14
|
SpectralTransform,
|
ezmsg/sigproc/spectrum.py
CHANGED
|
@@ -5,18 +5,17 @@ from functools import partial
|
|
|
5
5
|
import ezmsg.core as ez
|
|
6
6
|
import numpy as np
|
|
7
7
|
import numpy.typing as npt
|
|
8
|
+
from ezmsg.baseproc import (
|
|
9
|
+
BaseStatefulTransformer,
|
|
10
|
+
BaseTransformerUnit,
|
|
11
|
+
processor_state,
|
|
12
|
+
)
|
|
8
13
|
from ezmsg.util.messages.axisarray import (
|
|
9
14
|
AxisArray,
|
|
10
15
|
replace,
|
|
11
16
|
slice_along_axis,
|
|
12
17
|
)
|
|
13
18
|
|
|
14
|
-
from .base import (
|
|
15
|
-
BaseStatefulTransformer,
|
|
16
|
-
BaseTransformerUnit,
|
|
17
|
-
processor_state,
|
|
18
|
-
)
|
|
19
|
-
|
|
20
19
|
|
|
21
20
|
class OptionsEnum(enum.Enum):
|
|
22
21
|
@classmethod
|
ezmsg/sigproc/transpose.py
CHANGED
|
@@ -2,16 +2,15 @@ from types import EllipsisType
|
|
|
2
2
|
|
|
3
3
|
import ezmsg.core as ez
|
|
4
4
|
import numpy as np
|
|
5
|
-
from ezmsg.
|
|
6
|
-
AxisArray,
|
|
7
|
-
replace,
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
from .base import (
|
|
5
|
+
from ezmsg.baseproc import (
|
|
11
6
|
BaseStatefulTransformer,
|
|
12
7
|
BaseTransformerUnit,
|
|
13
8
|
processor_state,
|
|
14
9
|
)
|
|
10
|
+
from ezmsg.util.messages.axisarray import (
|
|
11
|
+
AxisArray,
|
|
12
|
+
replace,
|
|
13
|
+
)
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
class TransposeSettings(ez.Settings):
|
ezmsg/sigproc/util/buffer.py
CHANGED
ezmsg/sigproc/util/sparse.py
CHANGED
ezmsg/sigproc/wavelets.py
CHANGED
|
@@ -4,14 +4,14 @@ import ezmsg.core as ez
|
|
|
4
4
|
import numpy as np
|
|
5
5
|
import numpy.typing as npt
|
|
6
6
|
import pywt
|
|
7
|
-
from ezmsg.
|
|
8
|
-
from ezmsg.util.messages.util import replace
|
|
9
|
-
|
|
10
|
-
from .base import (
|
|
7
|
+
from ezmsg.baseproc import (
|
|
11
8
|
BaseStatefulTransformer,
|
|
12
9
|
BaseTransformerUnit,
|
|
13
10
|
processor_state,
|
|
14
11
|
)
|
|
12
|
+
from ezmsg.util.messages.axisarray import AxisArray
|
|
13
|
+
from ezmsg.util.messages.util import replace
|
|
14
|
+
|
|
15
15
|
from .filterbank import FilterbankMode, MinPhaseMode, filterbank
|
|
16
16
|
|
|
17
17
|
|
ezmsg/sigproc/window.py
CHANGED
|
@@ -6,6 +6,11 @@ import ezmsg.core as ez
|
|
|
6
6
|
import numpy.typing as npt
|
|
7
7
|
import sparse
|
|
8
8
|
from array_api_compat import get_namespace, is_pydata_sparse_namespace
|
|
9
|
+
from ezmsg.baseproc import (
|
|
10
|
+
BaseStatefulTransformer,
|
|
11
|
+
BaseTransformerUnit,
|
|
12
|
+
processor_state,
|
|
13
|
+
)
|
|
9
14
|
from ezmsg.util.messages.axisarray import (
|
|
10
15
|
AxisArray,
|
|
11
16
|
replace,
|
|
@@ -13,11 +18,6 @@ from ezmsg.util.messages.axisarray import (
|
|
|
13
18
|
sliding_win_oneaxis,
|
|
14
19
|
)
|
|
15
20
|
|
|
16
|
-
from .base import (
|
|
17
|
-
BaseStatefulTransformer,
|
|
18
|
-
BaseTransformerUnit,
|
|
19
|
-
processor_state,
|
|
20
|
-
)
|
|
21
21
|
from .util.profile import profile_subpub
|
|
22
22
|
from .util.sparse import sliding_win_oneaxis as sparse_sliding_win_oneaxis
|
|
23
23
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ezmsg-sigproc
|
|
3
|
+
Version: 2.7.0
|
|
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,64 @@
|
|
|
1
|
+
ezmsg/sigproc/__init__.py,sha256=8K4IcOA3-pfzadoM6s2Sfg5460KlJUocGgyTJTJl96U,52
|
|
2
|
+
ezmsg/sigproc/__version__.py,sha256=egp6dAw7S80JrGAUNYGJNY3iqzeSzC4Vs5c3SnC3SIY,704
|
|
3
|
+
ezmsg/sigproc/activation.py,sha256=83vnTa3ZcC4Q3VSWcGfaqhCEqYRNySUOyVpMHZXfz-c,2755
|
|
4
|
+
ezmsg/sigproc/adaptive_lattice_notch.py,sha256=ThUR48mbSHuThkimtD0j4IXNMrOVcpZgGhE7PCYfXhU,8818
|
|
5
|
+
ezmsg/sigproc/affinetransform.py,sha256=umEsbEcuiCI02oljWueJnKaI0aJxJ0wqOjH5yXclEM0,8414
|
|
6
|
+
ezmsg/sigproc/aggregate.py,sha256=yc3Hnak0yhucqlTCv9Isg6BKR24s6rMZqbZKpayyBgM,9048
|
|
7
|
+
ezmsg/sigproc/bandpower.py,sha256=dAhH56sUrXNhcRFymTTwjdM_KcU5OxFzrR_sxIPAxyw,2264
|
|
8
|
+
ezmsg/sigproc/base.py,sha256=SJvKEb8gw6mUMwlV5sH0iPG0bXrgS8tvkPwhI-j89MQ,3672
|
|
9
|
+
ezmsg/sigproc/butterworthfilter.py,sha256=NKTGkgjvlmC1Dc9gD2Z6UBzUq12KicfnczrzM5ZTosk,5255
|
|
10
|
+
ezmsg/sigproc/butterworthzerophase.py,sha256=QbJ_gGXrIfVOl_OybD07orO460owSMP5yTDMcGgASP0,4109
|
|
11
|
+
ezmsg/sigproc/cheby.py,sha256=B8pGt5_pOBpNZCmaibNl_NKkyuasd8ZEJXeTDCTaino,3711
|
|
12
|
+
ezmsg/sigproc/combfilter.py,sha256=MSxr1I-jBePW_9AuCiv3RQ1HUNxIsNhLk0q1Iu8ikAw,4766
|
|
13
|
+
ezmsg/sigproc/coordinatespaces.py,sha256=NWbQVvizmiU4F3AIwHHhiZ30Kg2IeSW0fRaa-yXkn-c,4610
|
|
14
|
+
ezmsg/sigproc/decimate.py,sha256=DCX9p4ZrcGoQ9di-jmPKqiKERTkvTAtSqLg8chQLp84,2336
|
|
15
|
+
ezmsg/sigproc/denormalize.py,sha256=CaH34QJ3OvsnhZT7bhCw2KVxVKvaU24ui6BS5-oe_x0,3040
|
|
16
|
+
ezmsg/sigproc/detrend.py,sha256=TxqZ41AdjsH_yOTj8fBoKTnbKCbdyzVibpCHWkFARYU,898
|
|
17
|
+
ezmsg/sigproc/diff.py,sha256=PC8KJAqaXMsdS_kPlDSEtXpcQ5rk92Ze_TeUjsVwbN0,2782
|
|
18
|
+
ezmsg/sigproc/downsample.py,sha256=Jqxt1Va1FrQLH1wUQpP0U79iQARTTHEKklKHy7yGL2o,3679
|
|
19
|
+
ezmsg/sigproc/ewma.py,sha256=I6WZkf6yf8jnpLdeEAWfAcpui5erVcVMZo6hTMMvDvg,6247
|
|
20
|
+
ezmsg/sigproc/ewmfilter.py,sha256=9AuvVn3TDdf5R4bVolYNM46AtDVHFJa8MLGltY6mYPE,4795
|
|
21
|
+
ezmsg/sigproc/extract_axis.py,sha256=4beqJ0EyUkT9Pa1FdYa9IteHGaxkh87j5_rYiZlvIG4,1598
|
|
22
|
+
ezmsg/sigproc/fbcca.py,sha256=JYFWsMDRJEWwUNujr4EsFL5t1ux-cnBGamNVrCRO_RA,12043
|
|
23
|
+
ezmsg/sigproc/filter.py,sha256=rLmJCgPevoODTL3g_D6czwVvcCD4uK8hJJ0tKfTH5_w,11609
|
|
24
|
+
ezmsg/sigproc/filterbank.py,sha256=tD7fn4dZzEvsmp_sSn16VVJ4WcJ5sN5lsSuNTLDCQZ8,13056
|
|
25
|
+
ezmsg/sigproc/filterbankdesign.py,sha256=vLXQVJwoFEK4V6umqzcr1PJKcwv6pGO29klSWQXk7y0,4712
|
|
26
|
+
ezmsg/sigproc/fir_hilbert.py,sha256=aurBCcpvsG69qD6Du2aHMye4HCBXF4RXzACdSxIy_Z8,10859
|
|
27
|
+
ezmsg/sigproc/fir_pmc.py,sha256=Ze2pd9K8XrdDhgJZG2E7x-5C2hfd6kIns4bYjTJsBvc,6997
|
|
28
|
+
ezmsg/sigproc/firfilter.py,sha256=7r_I476nYuixJsuwc_hQ0Fbq8WB0gnYBZUKs3zultOQ,3790
|
|
29
|
+
ezmsg/sigproc/gaussiansmoothing.py,sha256=BfXm9YQoOtieM4ABK2KRgxeQz055rd7mqtTVqmjT3Rk,2672
|
|
30
|
+
ezmsg/sigproc/kaiser.py,sha256=dIwgHbLXUHPtdotsGNLE9VG_clhcMgvVnSoFkMVgF9M,3483
|
|
31
|
+
ezmsg/sigproc/messages.py,sha256=KQczHTeifn4BZycChN8ZcpfZoQW3lC_xuFmN72QT97s,925
|
|
32
|
+
ezmsg/sigproc/quantize.py,sha256=uSM2z2xXwL0dgSltyzLEmlKjaJZ2meA3PDWX8_bM0Hs,2195
|
|
33
|
+
ezmsg/sigproc/resample.py,sha256=3mm9pvxryNVhQuTCIMW3ToUkUfbVOCsIgvXUiurit1Y,11389
|
|
34
|
+
ezmsg/sigproc/rollingscaler.py,sha256=j5hoWgJMbeDST7FXE6UBLSeR2hhfACIqQvFKr92ZTZA,8503
|
|
35
|
+
ezmsg/sigproc/sampler.py,sha256=iOk2YoUX22u9iTjFKimzP5V074RDBVcmswgfyxvZRZo,10761
|
|
36
|
+
ezmsg/sigproc/scaler.py,sha256=n0aGo272vs_MnFRtT1b3vVCQOzY-UEAxnqZKlpIldX8,4041
|
|
37
|
+
ezmsg/sigproc/signalinjector.py,sha256=mB62H2b-ScgPtH1jajEpxgDHqdb-RKekQfgyNncsE8Y,2874
|
|
38
|
+
ezmsg/sigproc/slicer.py,sha256=xLXxWf722V08ytVwvPimYjDKKj0pkC2HjdgCVaoaOvs,5195
|
|
39
|
+
ezmsg/sigproc/spectral.py,sha256=wFzuihS7qJZMQcp0ds_qCG-zCbvh5DyhFRjn2wA9TWQ,322
|
|
40
|
+
ezmsg/sigproc/spectrogram.py,sha256=g8xYWENzle6O5uEF-vfjsF5gOSDnJTwiu3ZudicO470,2893
|
|
41
|
+
ezmsg/sigproc/spectrum.py,sha256=AAxrywIYpAPENRWvaaM2VjcKEaqMt6ra1E3Ao26jdZs,9523
|
|
42
|
+
ezmsg/sigproc/transpose.py,sha256=Yx4losN7tKCacUt2GmFvjOSqJ0b3XhEepXzq_Z_iMCI,4381
|
|
43
|
+
ezmsg/sigproc/wavelets.py,sha256=mN9TrZencyvKBfnuMiGZ_lzrE1O7DhVo05EYgCjXncg,7428
|
|
44
|
+
ezmsg/sigproc/window.py,sha256=ZlawY4TPbLc46qIgcKhP4X7dpMDo4zNlnfzgV1eFaGU,15335
|
|
45
|
+
ezmsg/sigproc/math/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
|
+
ezmsg/sigproc/math/abs.py,sha256=_omQP4baHGu8MgKzNDMUsjrmA_yeXWNqKyTU7BiHCSE,741
|
|
47
|
+
ezmsg/sigproc/math/add.py,sha256=lR4lB8-QdUfyARJcdf5sMQhbHtFpRNYt8_1zYzkVEhU,3659
|
|
48
|
+
ezmsg/sigproc/math/clip.py,sha256=vJ8zpzVlTVPlkElsqyPVMOwyKBrgym8RD8BEOvf8g1o,1131
|
|
49
|
+
ezmsg/sigproc/math/difference.py,sha256=TtAURz9TsW_Vk39sMJOT84P0xw0xDrgE3ToRi8MWVv4,4491
|
|
50
|
+
ezmsg/sigproc/math/invert.py,sha256=SYJDNEb7snkVODnItfkkp8rhMrHEdyBmzg6qZkZLX2c,630
|
|
51
|
+
ezmsg/sigproc/math/log.py,sha256=K8bZSm-ubTDY0oqwuc0IOMkdPIwpw1yysjTOG657kkQ,1488
|
|
52
|
+
ezmsg/sigproc/math/scale.py,sha256=Zpzlz1NSLyvmggjs0pPypUKgXX99z2S3VXJ06fHok5M,942
|
|
53
|
+
ezmsg/sigproc/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
|
+
ezmsg/sigproc/util/asio.py,sha256=aAj0e7OoBvkRy28k05HL2s9YPCTxOddc05xMN-qd4lQ,577
|
|
55
|
+
ezmsg/sigproc/util/axisarray_buffer.py,sha256=TGDeC6CXmmp7OUuiGd6xYQijRGYDE4QGdWxjK5Vs3nE,14057
|
|
56
|
+
ezmsg/sigproc/util/buffer.py,sha256=83Gm0IuowmcMlXgLFB_rz8_ZPhkwG4DNNejyWJDKJl8,19658
|
|
57
|
+
ezmsg/sigproc/util/message.py,sha256=ppN3IYtIAwrxWG9JOvgWFn1wDdIumkEzYFfqpH9VQkY,338
|
|
58
|
+
ezmsg/sigproc/util/profile.py,sha256=eVOo9pXgusrnH1yfRdd2RsM7Dbe2UpyC0LJ9MfGpB08,416
|
|
59
|
+
ezmsg/sigproc/util/sparse.py,sha256=NjbJitCtO0B6CENTlyd9c-lHEJwoCan-T3DIgPyeShw,4834
|
|
60
|
+
ezmsg/sigproc/util/typeresolution.py,sha256=fMFzLi63dqCIclGFLcMdM870OYxJnkeWw6aWKNMk718,362
|
|
61
|
+
ezmsg_sigproc-2.7.0.dist-info/METADATA,sha256=QtI9FWw5pFVEqs1Ma6tooyGj73dZ6IOnM0QueJnzeSY,1908
|
|
62
|
+
ezmsg_sigproc-2.7.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
63
|
+
ezmsg_sigproc-2.7.0.dist-info/licenses/LICENSE,sha256=seu0tKhhAMPCUgc1XpXGGaCxY1YaYvFJwqFuQZAl2go,1100
|
|
64
|
+
ezmsg_sigproc-2.7.0.dist-info/RECORD,,
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: ezmsg-sigproc
|
|
3
|
-
Version: 2.6.0
|
|
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.0.3
|
|
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
|
-
## Overview
|
|
22
|
-
|
|
23
|
-
ezmsg-sigproc offers timeseries signal‑processing primitives built atop the ezmsg message‑passing framework. Core dependencies include ezmsg, numpy, scipy, pywavelets, and sparse; the project itself is managed through hatchling and uses VCS hooks to populate __version__.py.
|
|
24
|
-
|
|
25
|
-
## Installation
|
|
26
|
-
|
|
27
|
-
Install the latest release from pypi with: `pip install ezmsg-sigproc` (or `uv add ...` or `poetry add ...`).
|
|
28
|
-
|
|
29
|
-
You can install pre-release versions directly from GitHub:
|
|
30
|
-
|
|
31
|
-
* Using `pip`: `pip install git+https://github.com/ezmsg-org/ezmsg-sigproc.git@dev`
|
|
32
|
-
* Using `uv`: `uv add git+https://github.com/ezmsg-org/ezmsg-sigproc --branch dev`
|
|
33
|
-
* Using `poetry`: `poetry add "git+https://github.com/ezmsg-org/ezmsg-sigproc.git@dev"`
|
|
34
|
-
|
|
35
|
-
> See the [Development](#development) section below for installing with the intention of developing.
|
|
36
|
-
|
|
37
|
-
## Source layout & key modules
|
|
38
|
-
* All source resides under src/ezmsg/sigproc, which contains a suite of processors (for example, filter.py, spectrogram.py, spectrum.py, sampler.py) and math and util subpackages.
|
|
39
|
-
* The framework’s backbone is base.py, defining standard protocols—Processor, Producer, Consumer, and Transformer—that enable both stateless and stateful processing chains.
|
|
40
|
-
* Filtering is implemented in filter.py, providing settings dataclasses and a stateful transformer that applies supplied coefficients to incoming data.
|
|
41
|
-
* Spectral analysis uses a composite spectrogram transformer chaining windowing, spectrum computation, and axis adjustments.
|
|
42
|
-
|
|
43
|
-
## Operating styles: Standalone processors vs. ezmsg pipelines
|
|
44
|
-
While each processor is designed to be assembled into an ezmsg pipeline, the components are also well‑suited for offline, ad‑hoc analysis. You can instantiate processors directly in scripts or notebooks for quick prototyping or to validate results from other code. The companion Unit wrappers, however, are meant for assembling processors into a full ezmsg pipeline.
|
|
45
|
-
|
|
46
|
-
A fully defined ezmsg pipeline shines in online streaming scenarios where message routing, scheduling, and latency handling are crucial. Nevertheless, you can run the same pipeline offline—say, within a Jupyter notebook—if your analysis benefits from ezmsg’s structured execution model. Deciding between a standalone processor and a full pipeline comes down to the trade‑off between simplicity and the operational overhead of the pipeline:
|
|
47
|
-
|
|
48
|
-
* Standalone processors: Low overhead, ideal for one‑off or exploratory offline tasks.
|
|
49
|
-
* Pipeline + Unit wrappers: Additional setup cost but bring concurrency, standardized interfaces, and automatic message flow—useful when your offline experiment mirrors a live system or when you require fine‑grained pipeline behavior.
|
|
50
|
-
|
|
51
|
-
## Documentation & tests
|
|
52
|
-
* `docs/ProcessorsBase.md` details the processor hierarchy and generic type patterns, providing a solid foundation for custom components.
|
|
53
|
-
* Unit tests (e.g., `tests/unit/test_sampler.py`) offer concrete examples of usage, showcasing sampler generation, windowing, and message handling.
|
|
54
|
-
|
|
55
|
-
## Where to learn next
|
|
56
|
-
* Study docs/ProcessorsBase.md to master the processor architecture.
|
|
57
|
-
* Explore unit tests for hands‑on examples of composing processors and Units.
|
|
58
|
-
* Review the ezmsg framework in pyproject.toml to understand the surrounding ecosystem.
|
|
59
|
-
* Experiment with the code—try running processors standalone and then integrate them into a small pipeline to observe the trade‑offs firsthand.
|
|
60
|
-
|
|
61
|
-
This approach equips newcomers to choose the right level of abstraction—raw processor, Unit wrapper, or full pipeline—based on the demands of their analysis or streaming application.
|
|
62
|
-
|
|
63
|
-
## Development
|
|
64
|
-
|
|
65
|
-
We use [`uv`](https://docs.astral.sh/uv/getting-started/installation/) for development. It is not strictly required, but if you intend to contribute to ezmsg-sigproc then using `uv` will lead to the smoothest collaboration.
|
|
66
|
-
|
|
67
|
-
1. Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/) if not already installed.
|
|
68
|
-
2. Fork ezmsg-sigproc and clone your fork to your local computer.
|
|
69
|
-
3. Open a terminal and `cd` to the cloned folder.
|
|
70
|
-
4. `uv sync` to create a .venv and install dependencies.
|
|
71
|
-
5. `uv run pre-commit install` to install pre-commit hooks to do linting and formatting.
|
|
72
|
-
6. Run the test suite before finalizing your edits: `uv run pytest tests`
|
|
73
|
-
7. Make a PR against the `dev` branch of the main repo.
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
ezmsg/sigproc/__init__.py,sha256=8K4IcOA3-pfzadoM6s2Sfg5460KlJUocGgyTJTJl96U,52
|
|
2
|
-
ezmsg/sigproc/__version__.py,sha256=2GXF52IIutfiInnoWGItHWB6xM45HGVQYJ3J77-iUV0,704
|
|
3
|
-
ezmsg/sigproc/activation.py,sha256=Zh3kbb8eNOUK3ud6rkPAostIuRAP57mQj37XgKY6xdo,2746
|
|
4
|
-
ezmsg/sigproc/adaptive_lattice_notch.py,sha256=KJQE4ugmQ0Si09YqBoasgDr_lDzeLuYG0xHtssxLgi0,8810
|
|
5
|
-
ezmsg/sigproc/affinetransform.py,sha256=r6WemRI38dxHIOPWvfH0bHXiT4AwFu-yM5nF1G7oA-0,8406
|
|
6
|
-
ezmsg/sigproc/aggregate.py,sha256=8Yn_ixIdywWNO7MAb1Kh889nFQ0awogQJzscpyCRHQ8,9039
|
|
7
|
-
ezmsg/sigproc/bandpower.py,sha256=--tKRWyHU4gREAVBvNN5AJgtjyuKA848WYZe2i-t1xo,2255
|
|
8
|
-
ezmsg/sigproc/base.py,sha256=SJvKEb8gw6mUMwlV5sH0iPG0bXrgS8tvkPwhI-j89MQ,3672
|
|
9
|
-
ezmsg/sigproc/butterworthfilter.py,sha256=NKTGkgjvlmC1Dc9gD2Z6UBzUq12KicfnczrzM5ZTosk,5255
|
|
10
|
-
ezmsg/sigproc/butterworthzerophase.py,sha256=QbJ_gGXrIfVOl_OybD07orO460owSMP5yTDMcGgASP0,4109
|
|
11
|
-
ezmsg/sigproc/cheby.py,sha256=B8pGt5_pOBpNZCmaibNl_NKkyuasd8ZEJXeTDCTaino,3711
|
|
12
|
-
ezmsg/sigproc/combfilter.py,sha256=MSxr1I-jBePW_9AuCiv3RQ1HUNxIsNhLk0q1Iu8ikAw,4766
|
|
13
|
-
ezmsg/sigproc/decimate.py,sha256=t_7ycFDT6TLwtqjKF150ngeRoUPOHrA1HYXvnWPquuc,2327
|
|
14
|
-
ezmsg/sigproc/denormalize.py,sha256=CaH34QJ3OvsnhZT7bhCw2KVxVKvaU24ui6BS5-oe_x0,3040
|
|
15
|
-
ezmsg/sigproc/detrend.py,sha256=TxqZ41AdjsH_yOTj8fBoKTnbKCbdyzVibpCHWkFARYU,898
|
|
16
|
-
ezmsg/sigproc/diff.py,sha256=PC8KJAqaXMsdS_kPlDSEtXpcQ5rk92Ze_TeUjsVwbN0,2782
|
|
17
|
-
ezmsg/sigproc/downsample.py,sha256=-C8enCVvPZx-kY-BWdgWJ_cOHD6b79B7lRxk5da0uvg,3671
|
|
18
|
-
ezmsg/sigproc/ewma.py,sha256=9Gkdbtmh1YczVfNKMdQwYw6S9qdQYvFDd50d6HbAJuo,6239
|
|
19
|
-
ezmsg/sigproc/ewmfilter.py,sha256=9AuvVn3TDdf5R4bVolYNM46AtDVHFJa8MLGltY6mYPE,4795
|
|
20
|
-
ezmsg/sigproc/extract_axis.py,sha256=4beqJ0EyUkT9Pa1FdYa9IteHGaxkh87j5_rYiZlvIG4,1598
|
|
21
|
-
ezmsg/sigproc/fbcca.py,sha256=BufUMWyhzCRL6h-eNIbOGRC-5f_vX6ni8lp4k3bjh9U,12034
|
|
22
|
-
ezmsg/sigproc/filter.py,sha256=rLmJCgPevoODTL3g_D6czwVvcCD4uK8hJJ0tKfTH5_w,11609
|
|
23
|
-
ezmsg/sigproc/filterbank.py,sha256=61bEqKrrdye2RI6dbysr9PDwB4N4I0A2DUoUECHojiw,13047
|
|
24
|
-
ezmsg/sigproc/filterbankdesign.py,sha256=ePOJmEVKWx2wHxo4ZXDBH425bEnf_p42Z_sxkrUUFdU,4703
|
|
25
|
-
ezmsg/sigproc/fir_hilbert.py,sha256=aurBCcpvsG69qD6Du2aHMye4HCBXF4RXzACdSxIy_Z8,10859
|
|
26
|
-
ezmsg/sigproc/fir_pmc.py,sha256=Ze2pd9K8XrdDhgJZG2E7x-5C2hfd6kIns4bYjTJsBvc,6997
|
|
27
|
-
ezmsg/sigproc/firfilter.py,sha256=7r_I476nYuixJsuwc_hQ0Fbq8WB0gnYBZUKs3zultOQ,3790
|
|
28
|
-
ezmsg/sigproc/gaussiansmoothing.py,sha256=BfXm9YQoOtieM4ABK2KRgxeQz055rd7mqtTVqmjT3Rk,2672
|
|
29
|
-
ezmsg/sigproc/kaiser.py,sha256=dIwgHbLXUHPtdotsGNLE9VG_clhcMgvVnSoFkMVgF9M,3483
|
|
30
|
-
ezmsg/sigproc/messages.py,sha256=KQczHTeifn4BZycChN8ZcpfZoQW3lC_xuFmN72QT97s,925
|
|
31
|
-
ezmsg/sigproc/quantize.py,sha256=d-Dpv-l7abBOp_EZYhqRms12YbTIZEjKbvp4XYrHNkg,2187
|
|
32
|
-
ezmsg/sigproc/resample.py,sha256=RGYRuYM8YjGUMqqOu0LoBwzXNCl5cX3BZH6-woEvtrI,11380
|
|
33
|
-
ezmsg/sigproc/rollingscaler.py,sha256=j5hoWgJMbeDST7FXE6UBLSeR2hhfACIqQvFKr92ZTZA,8503
|
|
34
|
-
ezmsg/sigproc/sampler.py,sha256=JC2iNdlz-vMP1P35kFviHN6Knj57JOA4dWva80ByRZA,10752
|
|
35
|
-
ezmsg/sigproc/scaler.py,sha256=mGZZ59cHSpTKaBA9KsjGgy4Nxhw05pUbzumihI5cexw,4033
|
|
36
|
-
ezmsg/sigproc/signalinjector.py,sha256=xfqDuw4Ei9f1eP9HZhp-keGXFfp5iKtL86jXL4iKe4Y,2866
|
|
37
|
-
ezmsg/sigproc/slicer.py,sha256=t3w8MMdUvhmcv7hFfmbRQPckFYFTDOVxDGSNFuvIGYc,5187
|
|
38
|
-
ezmsg/sigproc/spectral.py,sha256=wFzuihS7qJZMQcp0ds_qCG-zCbvh5DyhFRjn2wA9TWQ,322
|
|
39
|
-
ezmsg/sigproc/spectrogram.py,sha256=i3jkZ-6wXfuEG5tpN1jQQSd8mZZDulvw0mGQ1Ijz5A4,2884
|
|
40
|
-
ezmsg/sigproc/spectrum.py,sha256=K6arHOh8UlZFUFeDgjybWQlmPAAd1AHWfq2EtwxCv2U,9515
|
|
41
|
-
ezmsg/sigproc/transpose.py,sha256=Qcwn0tzWk0s456pIdIKwdlUnL86lR5Y7QJ42SHzxZhk,4373
|
|
42
|
-
ezmsg/sigproc/wavelets.py,sha256=TVF7UPMlUsCmf8zJ8aqtUDzA22PlNQjzqwrbD75lJDw,7419
|
|
43
|
-
ezmsg/sigproc/window.py,sha256=5WkFQECPAgA7imm_E8E7RiD8i9jsS31voD0JJugNxqA,15326
|
|
44
|
-
ezmsg/sigproc/math/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
|
-
ezmsg/sigproc/math/abs.py,sha256=if1L5-WZD9Vl3Kwhnpw_RSRIWR_5i5VzEy_TfD1ZBtA,679
|
|
46
|
-
ezmsg/sigproc/math/add.py,sha256=9ohV-NtaR4p2QdTCBE4m_ltlFHISJC5cF2g8O6BIdCQ,3641
|
|
47
|
-
ezmsg/sigproc/math/clip.py,sha256=JShzvW545DOxiKmcjQEnYdCJVJrXxWFLhifWhvW21Vo,1057
|
|
48
|
-
ezmsg/sigproc/math/difference.py,sha256=rQKPoBGhj_NyZU7NhG4euFrCvCxNDmlXY8k-pjsp2n8,4404
|
|
49
|
-
ezmsg/sigproc/math/invert.py,sha256=gily0zMOL3Zwum3VBnfEmANj56b5jAED7RzNKxqPPcU,603
|
|
50
|
-
ezmsg/sigproc/math/log.py,sha256=mQm_q73Ac3WWJHV5pRRuk3VIWFpl-GDdNzzjUdtzWXY,1431
|
|
51
|
-
ezmsg/sigproc/math/scale.py,sha256=kMQRPYnm1o_9lC1EtIkoZOWaAWOWWbeT4ri1q7Hs7Fc,898
|
|
52
|
-
ezmsg/sigproc/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
|
-
ezmsg/sigproc/util/asio.py,sha256=aAj0e7OoBvkRy28k05HL2s9YPCTxOddc05xMN-qd4lQ,577
|
|
54
|
-
ezmsg/sigproc/util/axisarray_buffer.py,sha256=PCEKh-zcKl7yD8eSdfgg36Door23KTcNQK5yIri0n0w,14006
|
|
55
|
-
ezmsg/sigproc/util/buffer.py,sha256=zbBg94mp0GtDbhMxPEJgMopnlWgqL_R47WzieyYKcv8,19521
|
|
56
|
-
ezmsg/sigproc/util/message.py,sha256=ppN3IYtIAwrxWG9JOvgWFn1wDdIumkEzYFfqpH9VQkY,338
|
|
57
|
-
ezmsg/sigproc/util/profile.py,sha256=eVOo9pXgusrnH1yfRdd2RsM7Dbe2UpyC0LJ9MfGpB08,416
|
|
58
|
-
ezmsg/sigproc/util/sparse.py,sha256=Ijo5B5BCe2eczfZtT_RhgvRRj8UNJvdJwFY1AQw0YNU,4772
|
|
59
|
-
ezmsg/sigproc/util/typeresolution.py,sha256=fMFzLi63dqCIclGFLcMdM870OYxJnkeWw6aWKNMk718,362
|
|
60
|
-
ezmsg_sigproc-2.6.0.dist-info/METADATA,sha256=hN-gCxRbOhxCS0NV6BlDl4nMSWrhIq1lllPF0GvIJVo,5052
|
|
61
|
-
ezmsg_sigproc-2.6.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
62
|
-
ezmsg_sigproc-2.6.0.dist-info/licenses/LICENSE,sha256=seu0tKhhAMPCUgc1XpXGGaCxY1YaYvFJwqFuQZAl2go,1100
|
|
63
|
-
ezmsg_sigproc-2.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|