Code created during my masters to calculate phase synchronization between neurons