% @(#)ort_tsa.hlq	10.3 (ESO-IPG) 7/9/96 09:47:18
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
%.COPYRIGHT (c) 1992 European Southern Observatory & Copernicus Astron. Center%.IDENT     ort_tsa.hlq
%.AUTHOR    Alex Schwarzenberg-Czerny, ESO & Copernicus Astronomical Center 
%.KEYWORD   MIDAS, help files, ORT/TSA
%.LANGUAGE  LATEX
%.PURPOSE   Compute multiharmonic AOV periodogramme
%.VERSION   0.0               June 1996
%.RETURNS   None  
%.ENVIRON   TSA context
%------------------------------------------------------------------------------
\se
SECTION./TSA
\es\co
ORT/TSA                                   15-July-1996 A. Schwarzenberg-Czerny
\oc\su
ORT/TSA intab outima start step nsteps [order] 
 	compute multiharmonic AOV periodogram
\us\pu
Purpose:  
           Compute the analysis of variance (AOV) periodogram for the 
           multiharmonic Fourier series fit.  The periodogram contains values 
           of the AOV statistic for the fit of the time series with the Fourier 
           series. The fit is computed in the efficient way, by the projection 
           onto a set of orthogonal trig polynomials.  The expected value of  
           the periodogram for a pure noise is 1, for uncorrelated 
           observations, and 'ncorr', for correlated observations, where 
           'ncorr' is an average number of correlated observations. The the 
           periodogram divided by its expected value has Fisher-Snedecor 
           probability distribution F(order+1,nobs/ncorr-order-1), where 
           'nobs' is the number of observations and 'order' is twice number of 
           harmonics in the Fourier series. Thus the 'order'=2 case, 
           corresponds to the sine+constant fit, resembles Lomb-Scargle Power 
           Spectrum, except for the AOV statistics. For reference see Ap.J. 
           460, L107.  
\up\sy
Syntax: 
           ORT/TSA intab outima start step nsteps [order] 
\ys\pa
           intab  = name of input table, it must contain columns :TIME and 
                    :VALUE in DOUBLE PRECISION. For numerical reasons it is 
                    advisable to subtract from :VALUE its average value before 
                    computations.  
\ap\pa
           outima = name of output image; its first row contains the 
                    multiharmonic periodogramme, the second row contains 
                    residual power.  
\ap\pa 
           start  = start frequency of the periodogramme, in inverse
                    units of :TIME 
\ap\pa 
           step   = frequency step of the periodogramme, in inverse
                    units of :TIME 
\ap\pa 
           nsteps = number of frequencies of the periodogramme
\ap\pa 
           order  = number of Fourier harmonics = order/2, 1<order<100
           (to preserve model parameter count with the binning routines)
\ap\sa
See also:
           SHOW/TSA, DFT/TSA, AOV/TSA, SCARGLE/TSA
\as\no
Note: 
           By default 'intab', 'outima', 'start', 'step', 'nsteps' and 'order' 
           retain their values from the last use of TSA commands, unless  
           explicitly specified. See SET/TSA for details of this feature.
\\
           For smooth light curves use low number of harmonics, e.g.
           'order'=2 or 4, for best sensitivity. 
\\
           For many observations and light curves with sharp
           features (e.g. pulses, eclipses) use harmonics of width 
           comparable to that of these features. This will boost
           sensitivity above that attainable with the Scargle method.
\on\exs
Examples:
\ex
           ORT/TSA LCURVE PERIODG 0.01 0.01 100 4
\xe\ex
           ORT/TSA ? ? 0.2 0.0001
           This second command may be used after the first example
           to inspect the frequency interval from 0.2 till 0.21 at higher
           resolution.
\xe\sxe
