Calculate the phase given the estimated sine and cosine values from a
cosinor model. Returns the phase in radians, in the range \([0,2\pi)\).
The phase is the peak in the sinusoid. Applies atan2() over a branching
workflow for each coordinate. See https://en.wikipedia.org/wiki/Atan2
for more information.
References
Fisher, N.I. (1993) Statistical Analysis of Circular Data. Cambridge University Press, Cambridge. Page 31.
Author
Adrian Barnett a.barnett@qut.edu.au
