Example #1
0
def test_scherzer_kwargs():
    Cs = np.random.rand() * 1e5
    defocus = scherzer_defocus(Cs, 80e3)
    alpha = (6 * energy2wavelength(80e3) / Cs)**(1 / 4.)

    ctf = CTF(energy=80e3, defocus=defocus, Cs=Cs)
    assert np.isclose(ctf.evaluate_chi(alpha, 0.), 0, atol=1e-6)
Example #2
0
def test_scherzer():
    Cs = np.random.rand() * 1e5
    defocus = scherzer_defocus(Cs, 80e3)
    parameters = {'C10': -defocus, 'C30': Cs}
    alpha = (6 * energy2wavelength(80e3) / Cs)**(1 / 4.)

    ctf = CTF(energy=80e3, parameters=parameters)
    assert np.isclose(ctf.evaluate_chi(alpha, 0.), 0, atol=1e-6)