Moved centroid calculations and plotting code to second frame file because Kevin doesn't need it.