Open carolinesmartin opened 6 months ago
This should be fixed in #436. Issue was a backslash inside a docstring in core/metadata.py
. Changed to raw string instead.
Can you please try running the tests again on the latest revision?
My mistake, I thought the version I had was the most up-to-date one. This is the output for the latest version:
=================================== FAILURES ===================================
______________________________ test_FoundLocation ______________________________
[gw7] darwin -- Python 3.9.18 /Users/carolinemartin/anaconda3/envs/holopy-devel/bin/python3.9
@pytest.mark.medium
def test_FoundLocation():
holo = get_example_data('image0001')
location = center_find(holo, threshold=.25)
> assert_allclose(location, gold_location, atol=0.01)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0.01
E
E Mismatched elements: 2 / 2 (100%)
E Max absolute difference: 0.52699284
E Max relative difference: 0.01084952
E x: array([48.045921, 50.204296])
E y: array([48.572914, 50.232174])
holopy/core/tests/test_process.py:54: AssertionError
___________________________________ test_asm ___________________________________
[gw5] darwin -- Python 3.9.18 /Users/carolinemartin/anaconda3/envs/holopy-devel/bin/python3.9
@pytest.mark.fast
def test_asm():
centers = np.array([[ 0., 0., 1.], [ 0., 0., -1.]])
m = np.array([ 1.5+0.1j, 1.5+0.1j])
size_p = np.array([ 1., 1.])
niter=200
eps = 1e-6
qeps1 = 1e-5
qeps2 = 1e-8
meth = 1
# suppress output from fortran code
suppress_output = 1
# The fortran code uses oppositely directed z axis (they have laser
# propagation as positive, we have it negative), so we multiply the
# z coordinate by -1 to correct for that.
_, lmax, amn0, converged = scsmfo_min.amncalc(
1, centers[:, 0], centers[:, 1], -1.0 * centers[:, 2], m.real,
m.imag, size_p, niter, eps, qeps1, qeps2, meth, (0, 0),
suppress_output)
limit = lmax**2 + 2*lmax
amn = amn0[:, 0:limit, :]
asm_fwd = _asm_far(0, 0, amn, lmax)
> assert_allclose(asm_fwd, np.array([[ 2.73439859e-01 -6.75495808e-01j,
-1.94648171e-18 -1.09606063e-18j],
[ 1.94648171e-18 +1.09606063e-18j,
2.73439859e-01 -6.75495808e-01j]]))
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0
E
E Mismatched elements: 2 / 4 (50%)
E Max absolute difference: 5.07203614e-10
E Max relative difference: 1.69796292
E x: array([[ 2.734399e-01-6.754958e-01j, -1.949870e-18+2.696953e-18j],
E [ 1.949870e-18-2.696953e-18j, 2.734399e-01-6.754958e-01j]])
E y: array([[ 2.734399e-01-6.754958e-01j, -1.946482e-18-1.096061e-18j],
E [ 1.946482e-18+1.096061e-18j, 2.734399e-01-6.754958e-01j]])
holopy/scattering/tests/test_lowlevel.py:353: AssertionError
=========================== short test summary info ============================
FAILED holopy/core/tests/test_process.py::test_FoundLocation - AssertionError:
FAILED holopy/scattering/tests/test_lowlevel.py::test_asm - AssertionError:
======= 2 failed, 645 passed, 12 skipped, 1 xfailed, 1 xpassed in 24.27s =======
When I run run_tests.py, I get 40 errors reported. Here's the summary of them:
And the full report: