adding more nodes

This commit is contained in:
2026-04-03 23:11:52 -07:00
parent 5d4c6dfcea
commit 7747c1c7bc
146 changed files with 4950 additions and 145 deletions

View File

@@ -0,0 +1,30 @@
import numpy as np
import pytest
from tests.node_tests._shared import make_field
def test_output_shape():
from backend.nodes.psdf_log_polar import LogPolarPSDF
node = LogPolarPSDF()
field = make_field()
(psdf,) = node.process(field, n_phi=90, n_r=50)
assert psdf.data.shape == (50, 90)
def test_nonnegative():
from backend.nodes.psdf_log_polar import LogPolarPSDF
node = LogPolarPSDF()
field = make_field()
(psdf,) = node.process(field, n_phi=180, n_r=100)
assert np.all(psdf.data >= 0), "log1p of power should be non-negative"
def test_domain():
from backend.nodes.psdf_log_polar import LogPolarPSDF
node = LogPolarPSDF()
field = make_field()
(psdf,) = node.process(field, n_phi=180, n_r=100)
assert psdf.domain == "frequency"