[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


hist Source code in cafe_hist.pro

hist

Name
           hist
Purpose
           Creates histogram of x values for certain data sets.
           Result is presented in a new data set allocated in result
           group.
Category
           cafe
SYNTAX:
         hist[,range] [,subgroup][,group][,/add]
Input Parameters
           range    - (optional) Defines range of data points to use. 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 histogramming
                      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 histogramming
                      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.
SETUP:
          binsize   - The width of bins to use. Default: 1.
          nbins     - Number of bins to use. This is the alternative
                      setup which defines the binsize as (max-min)/nbins.
          max       - Maximum limit for histogram. Default is max(x).
          min       - Minimum limit for histogram. Default is min(x).
Output Parameters
           All data points given as input are summed up within a
           histogram according their x value modulo a period. The
           period must be set before.
Side Effects
           Creates/Overrides first subgroup in the result group. If
           /add is used a new subgroup will be created.
Example
           > set, binsize=0.5
           > hist
           -> creates new data set containing a histogram of current
              data set x values with a binning of 0.5
Revision History
           $Id: cafe_hist.pro,v 1.3 2005/02/15 10:40:40 goehler Exp $

Last modified by pro2html on 2005 February 16 at 04:13 UTC

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

Jörn Wilms ([email protected])
Updated automatically