# How to calculate Moore Rayleigh test?

I am trying to code a function which computes Moore's modified version of the Rayleigh test. I am doing ok with the second half of the calculation but I am unsure how to "number the vectors according to rank/vector length".

Currently my phases would be something like [0, 0, 0, 60, 60, 90, 180, 180, 270] (for example) and the radii would be [30, 40, 50, 60, 70, 80, 90, 100, 110].

def MR_test(phases, radius):