Skip to content
Merged
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions tests/test_noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from aspire.noise import CustomNoiseAdder, WhiteNoiseAdder, WhiteNoiseEstimator
from aspire.operators import FunctionFilter, ScalarFilter
from aspire.source.simulation import Simulation
from aspire.utils import utest_tolerance
from aspire.volume import AsymmetricVolume

DATA_DIR = os.path.join(os.path.dirname(__file__), "saved_test_data")
Expand Down Expand Up @@ -62,7 +61,12 @@ def test_white_noise_estimator_clean_corners(sim_fixture):
noise_variance = noise_estimator.estimate()
# Using a compactly supported volume should yield
# virtually no noise in the image corners.
assert np.isclose(noise_variance, 0, atol=utest_tolerance(sim_fixture.dtype))
assert np.isclose(noise_variance, 0, atol=1e-6)
# 1e-6 was chosen by running the unit test suite 10k (x4 fixture expansion) times.
# min=7.544584748608862e-12 max=1.6798412007391812e-07
# mean=1.0901885456753326e-09 var=5.27460957578949e-18
# To reduce the randomness would require a increasing simulation `n`
# and/or increasing resolution. Both would increase test time.


def test_adder_reprs(adder):
Expand Down