a bunch of corrections in linking number calculation plus mayavi plotting