Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
e134be0
avoid expensive dask operations in *dB* functions
Jun 12, 2026
7977f26
prepare a test reorg
Jun 12, 2026
5c4773f
add unit tests for the dB transform functions
Jun 12, 2026
7ad75b9
address type checker error
Jun 12, 2026
4ad53be
Merge branch 'main' into optimize-db-ops
Jun 12, 2026
2887dc4
switch to overwrite_x from out in dB functions
Jun 16, 2026
c10aaf8
tests pass again
Jun 16, 2026
2924db8
deeper unit tests on the dB functions
Jun 16, 2026
2404a62
make tests compatible with python 3.9
Jun 16, 2026
8bc5855
make tests compatible with python 3.9
Jun 16, 2026
19ed6e1
min_dtype fixes, but some remaining errors
Jun 16, 2026
5af9fc4
now tests pass
Jun 16, 2026
6c68a93
use hypothesis to define numerical tests
Jun 17, 2026
65713c1
fix imports tests
Jun 17, 2026
c4f5340
tests pass again
Jun 17, 2026
ed7b153
add cupy to backend tests
Jun 17, 2026
05f724e
improve shelved cache handling across python versions and call signat…
Jun 17, 2026
f04f464
fix some lazy import errors
Jun 17, 2026
358e7e6
update test_fourier
Jun 17, 2026
a6224fd
fix subnormal test cases with complex dtypes
Jun 17, 2026
eec66cc
fix floating point width
Jun 17, 2026
d27da8d
width fix in power analysis tests as well
Jun 17, 2026
1432176
more width fixes in power analysis tests
Jun 17, 2026
233b290
add some numpy/cupy cross-comparison tests
Jun 17, 2026
d91ecb2
fix health checks
Jun 17, 2026
6a13f07
remove complex128 tests
Jun 17, 2026
32e1ccb
extend deadline for long-running tests
Jun 17, 2026
0386a67
fix stft axes
Jun 17, 2026
0bffb23
fix fftfreq return type
Jun 17, 2026
fe42ce9
tweak tolerances
Jun 17, 2026
cef99ab
extend deadlines
Jun 17, 2026
521d089
extend deadlines
Jun 17, 2026
d806b8e
extend deadlines
Jun 17, 2026
c2d165b
evaluate resample relative to signal peak
Jun 17, 2026
f3185af
pick a random db scale for complex_waveforms
Jun 17, 2026
3bd3e20
pick a random db scale for complex_waveforms
Jun 17, 2026
58a5070
Merge branch 'optimize-db-ops' of https://github.com/usnistgov/striqt…
Jun 17, 2026
02f61a6
pick a random db scale for complex_waveforms
Jun 17, 2026
ebbbd78
updates to scaling in db space
Jun 17, 2026
0fccbc9
simplify test space
Jun 17, 2026
3231f9f
simpler rng waveforms
Jun 17, 2026
96f7dfd
simpler rng waveforms
Jun 17, 2026
38e3b9e
simpler rng waveforms
Jun 17, 2026
55b3771
simpler rng waveforms
Jun 17, 2026
32bdc9c
tweak
Jun 17, 2026
a9ff851
bench tewaks
Jun 17, 2026
67021cb
Merge branch 'optimize-db-ops' of https://github.com/usnistgov/striqt…
Jun 17, 2026
974df17
tweak
Jun 17, 2026
80d4540
Merge branch 'optimize-db-ops' of https://github.com/usnistgov/striqt…
Jun 17, 2026
58c873a
tweak
Jun 17, 2026
c71c23a
Merge branch 'optimize-db-ops' of https://github.com/usnistgov/striqt…
Jun 17, 2026
d0ca513
tweak
Jun 17, 2026
223b44d
tweak
Jun 17, 2026
a984457
Merge branch 'optimize-db-ops' of https://github.com/usnistgov/striqt…
Jun 17, 2026
14eb138
tweak
Jun 17, 2026
e97f999
Merge branch 'optimize-db-ops' of https://github.com/usnistgov/striqt…
Jun 17, 2026
1d466cb
tweak
Jun 17, 2026
eed1987
Merge branch 'optimize-db-ops' of https://github.com/usnistgov/striqt…
Jun 17, 2026
031c981
tweak
Jun 17, 2026
f18f547
Merge branch 'optimize-db-ops' of https://github.com/usnistgov/striqt…
Jun 17, 2026
b58f5d0
tweak
Jun 17, 2026
f8d0693
Merge branch 'optimize-db-ops' of https://github.com/usnistgov/striqt…
Jun 17, 2026
a6cd5e7
tweak
Jun 17, 2026
ca45db5
Merge branch 'optimize-db-ops' of https://github.com/usnistgov/striqt…
Jun 17, 2026
5502f86
adjust tolerance definitions
Jun 18, 2026
8e00cb8
merge
Jun 18, 2026
8b71f91
tune up cupy-numpy comparison tests
Jun 18, 2026
7726e72
merge main
Jun 29, 2026
5a37cca
Merge branch 'optimize-db-ops' of https://github.com/usnistgov/striqt…
Jun 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ coverage.xml
.hypothesis/
.pytest_cache/
cover/
tests/sensor/sweeps/outputs
doc/html
uv.lock
pixi.lock

# Jupyter Notebook
.ipynb_checkpoints
Expand Down
3 changes: 0 additions & 3 deletions .pixi/config.toml

This file was deleted.

1 change: 1 addition & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ array-api-compat = "*"
cython = "*"
dask = "*"
numba = ">=0.56"
numcodecs = "*"
numexpr = ">=2.8"
numpy = ">=1.21"
netcdf4 = "*"
Expand Down
16 changes: 15 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ gpu = [
test = [
"pytest",
"nptdms",
"pytest-order"
"pytest-order",
"hypothesis"
]

[project.scripts]
Expand Down Expand Up @@ -113,3 +114,16 @@ norecursedirs = [
call-top-callable = "ignore"
invalid-type-form = "ignore"

[tool.tox]
# Forces tox to auto-provision the tox-uv plugin if missing
requires = ["tox-uv"]
env_list = ["py39", "py314"]

[tool.tox.env_run_base]
# Dependencies specified JSON-style for TOML compatibility
package = "editable"
deps = ["pytest"]
extras = ["test"]
commands = [
["pytest"]
]
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def cellular_resource_power_histogram(iq: 'Array', capture: specs.Capture, **kwa
if time_bin_averaging is not None:
masked_spgs = sw.binned_mean(masked_spgs, time_bin_averaging, axis=2, fft=False)

masked_spgs = sw.powtodB(masked_spgs, out=masked_spgs)
masked_spgs = sw.powtodB(masked_spgs, overwrite_x=True)
bin_edges = _channel_power_histogram.make_power_histogram_bin_edges(
power_low=spec.power_low,
power_high=spec.power_high,
Expand Down
17 changes: 1 addition & 16 deletions src/striqt/waveform/lib/arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,22 +578,7 @@ def array_stream(obj: Array, null=False, non_blocking=False, ptds=False):


def array_namespace(a, use_compat=False) -> ModuleType:
try:
return array_api_compat.array_namespace(a, use_compat=use_compat)
except TypeError:
pass

try:
import mlx.core as mx # type: ignore

if isinstance(a, mx.array):
return mx
else:
raise TypeError
except (ImportError, TypeError):
pass

raise TypeError('unrecognized object type')
return array_api_compat.array_namespace(a, use_compat=use_compat)


def convert_np_to_xp(func: _TC) -> _TC:
Expand Down
6 changes: 3 additions & 3 deletions src/striqt/waveform/lib/fourier.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def fftfreq(
values = [fres * n for n in span]
else:
values = [fres * (n + 1) for n in span]
return np.array(values, dtype=dtype)
return xp.array(values, dtype=dtype)


def time_fftshift(x, scale: Array | float | None = None, overwrite_x=False, axis=0):
Expand Down Expand Up @@ -589,10 +589,10 @@ def stft(
nfft=nfft,
time_size=y.shape[axis],
overlap_frac=noverlap / nfft,
xp=np,
xp=xp,
)

return typing.cast(tuple[_AT, _AT, _AT], (freqs, times, y))
return (freqs, times, y) # type: ignore


def istft(
Expand Down
Loading