def test_mag_form_fac(): """Tests the magnetic form factor single value """ ion = MagneticFormFactor('Fe') formfac, _temp = ion.calc_mag_form_fac(q=1.)[0], ion.calc_mag_form_fac(q=1.)[1:] del _temp assert (abs(formfac - 0.932565) < 1e-6)
def test_mag_form_fac_case2(): """Tests the magnetic form factor q range provided """ ion = MagneticFormFactor('Fe') formfac, _temp = ion.calc_mag_form_fac(qrange=[0, 2])[0], ion.calc_mag_form_fac(qrange=[0, 2])[1:] del _temp assert (abs(np.sum(formfac) - 74.155233575216599) < 1e-12)
def test_mag_form_fac_case1(): """Tests the magnetic form factor no q given """ ion = MagneticFormFactor('Fe') formfac, _temp = ion.calc_mag_form_fac()[0], ion.calc_mag_form_fac()[1:] del _temp assert (abs(np.sum(formfac) - 74.155233575216599) < 1e-12)
def test_mag_form_fac_case2(): """Tests the magnetic form factor q range provided """ ion = MagneticFormFactor('Fe') formfac, _temp = ion.calc_mag_form_fac( qrange=[0, 2])[0], ion.calc_mag_form_fac(qrange=[0, 2])[1:] del _temp assert (abs(np.sum(formfac) - 74.155233575216599) < 1e-12)
def test_mag_form_fac(): """Tests the magnetic form factor single value """ ion = MagneticFormFactor('Fe') formfac, _temp = ion.calc_mag_form_fac(q=1.)[0], ion.calc_mag_form_fac( q=1.)[1:] del _temp assert (abs(formfac - 0.932565) < 1e-6)