Analysis-of-variance time-series analysis based on the method of Schwarzenberg-Czerny (1989)
!------------------------------------------------------------------------------
! AOVMAX: Return the frequency at which theta(AOV) is maximum
! Call this subroutine with the following variables:
! ntot = total number of data points
! tdata = time values of the data points
! xdata = magnitude, flux, etc
! xave = average of xdata
!
! Return values:
! fmaxout = frequency where theta(AOV) is maximum
! thetamaxout = value of theta(AOV) at maximum
!
! Program by M. Templeton, August 15, 2007
! Adapted from A. Schwarzenberg-Czerny 1989 (MNRAS 241,153)
!------------------------------------------------------------------------------