waveforms 2.1.0__tar.gz → 2.1.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.
- {waveforms-2.1.0 → waveforms-2.1.1}/PKG-INFO +1 -1
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms/utils.py +14 -12
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms/version.py +1 -1
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms/waveform.py +4 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms.egg-info/PKG-INFO +1 -1
- {waveforms-2.1.0 → waveforms-2.1.1}/LICENSE +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/MANIFEST.in +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/README.md +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/pyproject.toml +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/setup.cfg +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/setup.py +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/src/waveform.h +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/tests/test_multi_drag.py +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/tests/test_waveform.py +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/tests/test_wavevstack.py +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms/WaveformLexer.py +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms/WaveformListener.py +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms/WaveformParser.py +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms/__init__.py +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms/__main__.py +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms/_waveform.pyi +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms/_waveform.pyx +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms/distortion.py +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms/multy_drag.py +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms/waveform_parser.py +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms.egg-info/SOURCES.txt +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms.egg-info/dependency_links.txt +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms.egg-info/entry_points.txt +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms.egg-info/requires.txt +0 -0
- {waveforms-2.1.0 → waveforms-2.1.1}/waveforms.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from itertools import repeat
|
|
2
2
|
from types import MappingProxyType
|
|
3
|
-
from typing import Optional, Sequence
|
|
3
|
+
from typing import Optional, Sequence, cast
|
|
4
4
|
|
|
5
5
|
import numpy as np
|
|
6
6
|
import scipy.sparse as sp
|
|
@@ -20,13 +20,13 @@ def freeze(x):
|
|
|
20
20
|
elif isinstance(x, (np.ndarray, np.matrix)):
|
|
21
21
|
x.flags.writeable = False
|
|
22
22
|
elif isinstance(x, sp.spmatrix):
|
|
23
|
-
x
|
|
24
|
-
if x
|
|
25
|
-
x
|
|
26
|
-
x
|
|
27
|
-
elif x
|
|
28
|
-
x
|
|
29
|
-
x
|
|
23
|
+
cast(np.ndarray, getattr(x, 'data')).flags.writeable = False
|
|
24
|
+
if getattr(x, 'format') in {'csr', 'csc', 'bsr'}:
|
|
25
|
+
cast(np.ndarray, getattr(x, 'indices')).flags.writeable = False
|
|
26
|
+
cast(np.ndarray, getattr(x, 'indptr')).flags.writeable = False
|
|
27
|
+
elif getattr(x, 'format') == 'coo':
|
|
28
|
+
cast(np.ndarray, getattr(x, 'row')).flags.writeable = False
|
|
29
|
+
cast(np.ndarray, getattr(x, 'col')).flags.writeable = False
|
|
30
30
|
elif isinstance(x, bytearray):
|
|
31
31
|
x = bytes(x)
|
|
32
32
|
return x
|
|
@@ -72,12 +72,14 @@ def getFTMatrix(fList: Sequence[float],
|
|
|
72
72
|
if weight is None or len(weight) == 0:
|
|
73
73
|
weight = np.full(numOfPoints, 2 / numOfPoints)
|
|
74
74
|
if phaseList is None or len(phaseList) == 0:
|
|
75
|
-
|
|
75
|
+
phase_list = np.zeros_like(fList)
|
|
76
|
+
else:
|
|
77
|
+
phase_list = phaseList
|
|
76
78
|
if weight.ndim == 1:
|
|
77
|
-
|
|
79
|
+
weight_list = repeat(weight)
|
|
78
80
|
else:
|
|
79
|
-
|
|
80
|
-
for f, phase, weight in zip(fList,
|
|
81
|
+
weight_list = weight
|
|
82
|
+
for f, phase, weight in zip(fList, phase_list, weight_list):
|
|
81
83
|
e.append(weight * np.exp(-1j * (2 * np.pi * f * t + phase)))
|
|
82
84
|
return np.asarray(e).T
|
|
83
85
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""Define version number here and read it from setup.py automatically"""
|
|
2
|
-
__version__ = "2.1.
|
|
2
|
+
__version__ = "2.1.1"
|
|
@@ -179,6 +179,10 @@ class Waveform:
|
|
|
179
179
|
sig = self.__call__(x, out=out, function_lib=function_lib)
|
|
180
180
|
if filters is not None:
|
|
181
181
|
sos, initial = filters
|
|
182
|
+
if not isinstance(sos, np.ndarray):
|
|
183
|
+
sos = np.array(sos)
|
|
184
|
+
elif not sos.flags.writeable:
|
|
185
|
+
sos = sos.copy()
|
|
182
186
|
if initial:
|
|
183
187
|
sig = sosfilt(sos, sig - initial) + initial
|
|
184
188
|
else:
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|