code used to run in infinite loop. corrected.

changed vec_map_loop which is now compatible with and can be called from pytrack.py