eigness is positive

This commit is contained in:
Jan Petykiewicz 2023-05-23 13:07:26 -07:00
parent b1a5cdcda9
commit 24da3f673b

View File

@ -754,7 +754,7 @@ def eigsolve(
Av = (scipy_op @ v.copy())[:, 0] Av = (scipy_op @ v.copy())[:, 0]
eigness = norm(Av - (v.conj() @ Av) * v) eigness = norm(Av - (v.conj() @ Av) * v)
f = numpy.sqrt(-numpy.real(n)) f = numpy.sqrt(-numpy.real(n))
df = numpy.sqrt(-numpy.real(n + eigness)) df = numpy.sqrt(-numpy.real(n) + eigness)
neff_err = kmag * (1 / df - 1 / f) neff_err = kmag * (1 / df - 1 / f)
logger.info(f'eigness {i}: {eigness}\n neff_err: {neff_err}') logger.info(f'eigness {i}: {eigness}\n neff_err: {neff_err}')