[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


scargle Source code in cafe_scargle.pro

scargle

Name
           scargle
Purpose
        Compute the lomb-scargle periodogram of an unevenly sampled
        lightcurve. Refer procedure "scargle" in the aitlib.
Category
           cafe
SYNTAX:
         scargle[,range] [,subgroup][,group][,/add]
Input Parameters
           range    - (optional) Defines range of data points to fold. This can
                      be either:
                       - Data point range, denoted by the data
                         point number:
                         <n1>[-], while ,  are positive
                         numbers. Data point numbers start from zero.
                         Open intervals can be represented with a
                         "*" instead of the number.
                         If only one number is given, a single
                         data point will be referenced.
                         If <val2> is less than  all but the
                         interval <val2>.. are referenced.
                       - X value range, denoted by float point numbers:
                         <val1>-, while , 
                         represents X values defining the interval to
                         reference. Open intervals can be represented
                         with a *  instead of the value. If <val2> is
                         less than <val1> all but the interval
                         <val2>.. is referenced.
                       - Vector of data point indices. The vector is
                         denoted with [val,val,...,val] (indgen may
                         be used also).
                       - Boolean expressions with X/Y values. All
                         values for which this expression is true are
                         referenced. The expression may contain
                         algebraic formulas combined with comparison
                         operators "lt", "le", "eq", "gt", "ge" as used in IDL
                         comparisons. For each data point a keyword
                         is defined which has meaning and can be used
                         for the boolean expression:
                                 x - The x-column value.
                                 y - The y-column value.
                             error - The error column value.
                          selected - True when the data point is selected.
                               def - True when the data point is defined.
                               x1  - Multi column first column value.
                               x2  - Multi column second column
                                     value.
                               x3  - Multi column third column value.
                         To avoid interference with functions which
                         also can be used a lower/upper case
                         distinction  is made. IDL funktions should
                         be upper case.
                      Default is to fold the entire data set.
           subgroup - (optional) The data set (subgroup) for which the model
                      should be applied. This can be either the
                      subgroup number or the file name representing
                      the data set. It is possible to set more than
                      one subgroup, either with numbers in brackets
                      ([]) separated with ","; or denoting filenames
                      with wildcards ("*").
                      Default are all subgroups in currently used
                      group.
           group    - (optional) The data group for which folding
                      should applied.
                      Default is the current group. Must be in
                      range [0..29].
Keyword Parameters
           add      - Do not overwrite existing subgroups (0) but use
                      the next free one in current result group.
          periodout - Create period as x axis instead of frequencies (default)
          verbose   - Report progress.
SETUP:
           Following parameter could be set:
         fmin - minimum
         fmax - maximum frequency (NOT ANGULAR FREQ) to be used (has precedence over pmin,pmax)
         pmin - minimum
         pmax - maximum period to be used
         fap  - false alarm probability desired (see Scargle et al., p. 840, and signi
                keyword). Default equal to 0.01 (99% significance)
        noise - for the normalization of the periodogram and the
                compute of the white noise simulations. If not set, equal to
                the variance of the original lc.
     multiple - number of white  noise simulations for the FAP
                power level. Default equal to 0 (i.e., no simulations).
         numf - number of independent frequencies
Output Parameters
        The lomb-scargle psd in result group set with chres. The
        x-values are frequencies, the y values the computed power
        density spectrum.
Side Effects
           Creates/Overrides first subgroup in the result group. If
           /add is used a new subgroup will be created.
Procedure
         The Lomb Scargle PSD is computed according to the
         definitions given by Scargle, 1982, ApJ, 263, 835, and Horne
         and Baliunas, 1986, MNRAS, 302, 757. Beware of patterns and
         clustered data points as the Horne results break down in
         this case! Read and understand the papers and this
         code before using it! For the fast algorithm read W.H. Press
         and G.B. Rybicki 1989, ApJ 338, 277.
Example
           > set, pmin=100
           > set, pmax = 500
           > scargle
           -> compute lomb-scargle periodogram between P=100..500sec
Revision History
           $Id: cafe_scargle.pro,v 1.6 2005/02/16 13:37:18 goehler Exp $

Last modified by pro2html on 2005 February 17 at 04:20 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically