3D Migration using rational functions in Python