Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adku1173 committed Nov 7, 2024
1 parent 4b3f626 commit 3211c7d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 7 additions & 5 deletions tests/regression/test_spectra.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@

@pytest.fixture(
params=[
{}, # default
{'precision': 'complex64', 'overlap': '50%', 'block_size': 256, 'window': 'Hanning'},
{'cached':False}, # default (no cache)
{'cached':False, 'precision': 'complex64', 'overlap': '50%', 'block_size': 256, 'window': 'Hanning'},
],
ids=['default', 'custom'],
scope='module',
)
def freq_data(request, regression_source_case):
"""
Fixture to create a beamformer instance for testing.
Fixture to create a :class:`acoular.freq_data.PowerSpectra` instance for testing.
The fixture is parametrized to test the object with default and custom configuration.
Parameters
----------
Expand All @@ -27,7 +29,7 @@ def freq_data(request, regression_source_case):
regression_source_case : fixture
regression_source_case fixture (see conftest.py)
"""
return ac.PowerSpectra(source=regression_source_case.source, cached=False, **request.param)
return ac.PowerSpectra(source=regression_source_case.source, **request.param)


@pytest.mark.parametrize('ind', [16, 32])
Expand Down Expand Up @@ -92,4 +94,4 @@ def test_eve(freq_data, snapshot, ind):
ind : tuple
frequency indices to test
"""
snapshot.check(freq_data.eve[ind, -5:, :].astype(np.complex64), rtol=5e-5, atol=1e-8)
snapshot.check(np.abs(freq_data.eve[ind, :, -5:].astype(np.complex64)), rtol=5e-5, atol=1e-8)

0 comments on commit 3211c7d

Please sign in to comment.