Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
modify
modifies data point values (x/y/error)
cafe
modify, x|y|error|file=expression, [,range] [,subgroup][,group][,/debug]
x,y,error - The column to modify (select one). file - Change the file name. expression - Defines how to modify. This may be any IDL expression. Following variables have special meaning: x - the x column. y - the y column. error - the error dx - the x bin size model - apply the model at the x-column, insert result. selected- the select flag def - the data point defined flag file - the file name. Case is important. When using external functions containing x/y/err it is recomended to give these functions upper case. The variables may be appended with ":<group>" to import the variables from different groups, same subgroup. The number of rows must be the same. Also the model group (model item above) can be used to select the group. The expression either must define an array which has as much elements as the column to modify, or contain scalar values. It is possible to select array elements with "[index]" but care must be taken when ranges are used; the index refers to the range restricted array. The error column can be deleted with the expression "error=none". range - (optional) Defines range of data points to modify. 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. 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 the entire data set to modify. subgroup - (optional) The data set (subgroup) for which the expression 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 is the first valid subgroup in current used group. group - (optional) The data group for which the expression should be applied. Default is the primary group 0. Must be in range [0..29].
debug - print modification expression for debugging purposes.
Changes data point values (no possibility to recover except reload!)
> modify, y=2*x+0.5,0-100,0,1 -> modify all y values for data points 0..100, group 1, subgroup 0 at linear x values.
$Id: cafe_modify.pro,v 1.29 2005/01/05 09:51:45 goehler Exp $
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]