[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


caferange Source code in caferange.pro

caferange

Name
           caferange
Purpose
           converts range string to an index for a group/subgroup
Category
           CAFE
SUBCATEGORY:
           AUXILIARY ROUTINE
SYNTAX:
           index=caferange(env, range, group,subgroup)
Input Parameters
           env      - The fit environment as defined in
                      cafeenv__define. Contains data to be
                      considered in range expression.
           range    - Expression which defines range of data points to
                      return. 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.
                                dx - The x bin size (if given)
                          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.
                            model  - Model in current group.
                         To avoid interference with functions which
                         also can be used a lower/upper case
                         distinction  is made. IDL funktions should
                         be upper case.
                         It is possible to refer to columns/models
                         within other groups by ":<grp>". In this
                         case the column/model is taken from group
                         <grp>.
                         Example: "x:5" refers to the x data in group
                         5. This notion allows to combine multi-data
                         set references.
                      If range contains not data points -1 is returned.
           subgroup - Integer number defining the data set (subgroup)
                      for which the range index is returned. Must be
                      in 0..9.
           group    - Integer number defining the data group for
                      which the range index is returned. Must be in 0..9.
Output Parameters
           Returns index array referring a range  in
           (*env).groups[group].data[subgroup].
           Returns -1 if range not applicable.
Revision History
           $Id: caferange.pro,v 1.21 2005/01/05 10:08:24 goehler Exp $
 $Log: caferange.pro,v $
 Revision 1.21  2005/01/05 10:08:24  goehler
 change: allow to refer at different groups
 Revision 1.20  2005/01/04 10:56:06  goehler
 fix: make shure all (internal) routines are properly documented
 Revision 1.19  2003/12/16 14:25:05  goehler
 added possibility to select for dx = xbin sizes.
 Revision 1.18  2003/10/08 23:31:58  goehler
 allow more than 65535 lines
 Revision 1.17  2003/09/19 07:45:44  goehler
 update range selection documentation
 Revision 1.16  2003/07/10 13:34:11  goehler
 fix: must use lindgen for large data sets...
 Revision 1.15  2003/06/17 14:02:55  goehler
 fix: data point number ranges are not recognized properly
 Revision 1.14  2003/05/23 12:46:51  goehler
 - moved range string expansion into caferange.pro
 - caferange now supports vector indices
 Revision 1.13  2003/05/20 16:14:03  goehler
 fix: wrong variable name (supgroup instead subgroup)
 Revision 1.12  2003/05/08 10:06:51  goehler
 - improved version of range determination
 - scan does not ignore spaces which are needed in some cases (boolean expressions)
 Revision 1.11  2003/04/25 12:32:45  goehler
 fix: must join expression string after error replacement.
 Revision 1.10  2003/04/16 15:46:24  goehler
 added DEF expression keyword
 Revision 1.9  2003/03/17 14:11:44  goehler
 review/documentation updated.
 Revision 1.8  2003/03/03 11:18:34  goehler
 major change: environment struct has become a pointer -> support of wplot/command line
 in common.
 Branch to be able to maintain the former line also.
 Revision 1.7  2003/02/11 17:25:43  goehler
 added multi dimension selection
 Revision 1.6  2002/09/10 13:06:48  goehler
 removed ";-" to make auxilliary routines invisible
 Revision 1.5  2002/09/09 17:36:21  goehler
 public version: updated help matching aitlib html structure.
 common version: 3.0

Last modified by pro2html on 2005 January 06 at 04:45 UTC

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

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