def test_lattice_paramter_invariance(self, wavelength, lattice_parameter): h_a = get_holz_angle(wavelength, lattice_parameter) l_p = scattering_angle_to_lattice_parameter(wavelength, h_a) assert np.isclose(l_p, lattice_parameter, rtol=1e-4)
def test_scattering_angle_to_lattice_parameter(self): wavelength = 2.51 / 1000 angle = 95.37805 / 1000 lattice_size = scattering_angle_to_lattice_parameter(wavelength, angle) assert np.isclose(lattice_size, 0.55225047)