Tetrahedron method for isotope scattering in Python