Previous: relabel
Up: Manual Pages
Next: resdiag
Previous Page: relabel
Next Page: resdiag
rescale { inputfile | -xrange= lo,hi,npts} outputfile [ y-scaling-and-offsetting-options] [ x-scaling-and-offsetting-options] [ rpn-based-transformation-options] [ data-selection-options] [ labeling-options] [ miscellaneous-options]
| -y_divisor= value | -y_multiplier= value}]
[{-y_offset= value | -y_aexpand | -y_symmetric}]
[-baseline_subtraction={ n_points | x_lo,x_hi}]
The normalize, y_divisor, and y_multiplier options provide for scaling of
ordinate values; only one may be given. By default normalization consists of dividing all ordinates
by the maximum ordinate; if the central-point keyword is given, normalization consists
of dividing all values by the central ordinate value, defined as the
value for a data set with n points.
The y_offset, y_aexpand, and y_symmetric options provide for subtraction of an offset from all ordinate values; only one may be given. If y_aexpand is given, the offset is the average ordinate value ( aexpand stands for average-expand, since the option allows expansion about the average value when combined with one of the items from the previous paragraph). If y_symmetric is given, the offset is the value midway between the minimum and maximum ordinate values; the resulting data set extends equally far into positive and negative values.
The baseline_subtraction option provides for finding and subtracting a baseline. If a single parameter is given, it is taken to be the number of points from the beginning of the file to average the ordinates of to determine the baseline. If two parameters are given, they are taken to be the lower and upper limit of the abscissae of points for which the ordinates will be averaged to determine the baseline.
[{-center | -x_offset= value | -x_aexpand | -x_symmetric}]
The x_divisor and x_multiplier provide for scaling of abscissa values by a factor; only one may be given.
The center, x_offset, -x_aexpand, and x_symmetric options provide for subtraction of an offset from the abscissa values. Of these, the last three are identical in description to the corresponding options for y. The center option requests that the offset will be the location of the maximum ordinate (i.e., the peak of the data set).
[-rpn_expression=" rpn-expression"] [-x_transform=" rpn-expression"] [-y_transform=" rpn-expression"] [-sx_transform=" rpn-expression"] [-sy_transform=" rpn-expression"] [-test=" rpn-expression"] These options provide the capability of transforming a data set according to rpn expressions. For each successive point, the expressions access the abscissa and ordinate values via the rpn variables x and y. The uncertainty values are accessed via the variables sx and sy. Any of the columns of the input data set may be transformed by providing an rpn expression. In addition, the uncertainties may be created by such expressions (if the input data set doesn't have uncertainties).
If a rpn_defns_files option is given, rescale submits the named files to rpn for execution. These files typically contain definitions of variables and user-defined-functions. If no rpn_defns_files is given, rescale initializes rpn using the file named in the RPN_DEFNS environment variable. Having initialized the rpn subprogram, rescale then submits the string given in the rpn_expression option to rpn, if there is one.
After reading the data set, rescale computes the minimum, maximum, average, midrange, central, initial, and final values of the abscissae and ordinates. These are stored in the variables x_min, x_max, x_ave, x_sym, x_cen, x_ini, and x_fin for the abscissa, and similarly for the ordinates with 'y' replacing 'x'. In addition, the variable n_pts contains the number of points, and the variable i contains the current point number.
As it steps through successive points in the data set, rescale first stores the data values
in the rpn variables. If a test option is given, rescale executes the test expression,
which must push a value on the rpn logical stack; the point is discarded if the test returns false.
Next, rescale evaluates any rpn expressions given for x, y, , and
, in that order. After all expressions have been evaluated, the new values are stored
for further processing with other options. The values of the rpn variables are not updated
after each expression unless the user explicitly stores a new value as part of the expression.
[-ylabel=" string"] [-title=" string"] [-topline=" string"] These options specify labels to be put into outputfile. By default, the labels in the new data set are the same as those in inputfile.
[-window= xmin,xmax,ymin,ymax] [-clip= nhead,ntail{,invert}] [-branch= branch_number]
These options provide for selection of a subset of data points from a data set. All of these may be given simultaneously.
The sample option specifies an integer interval at which to sample the data set.
The window option specifies a rectangular window in x and y, with the result that any points outside the window are discarded; if the window has zero width in either dimension, then no windowing is done in that dimension.
The clip option permits deletion of points from the beginning and/or end of the data set. nhead is the number of points to be deleted from the beginning, and ntail is the number to be deleted from the end. If the invert keyword is given, then all points except the first nhead and the last ntail are deleted.
A data set may be viewed as values of a function y at a series of x points. Normally, the x values
would increase monotonically through the data set, so that y is a single-valued function of x.
When instead the x values run repeatedly over the same interval, the function is multivalued.
The branch options allows selection of a specified part of the multivalued function,
namely that containing the branch_number set of values. The default
is the first branch.
[-reverse_order] [-log_x] [-log_y] [-rotate= angle[ ,xcen,ycen]] [-number_points[= first-number]] [-format=" format-string"]
swap_xy requests swapping of the abscissa and ordinate values.
reverse_order requests reversing the order of the data points, so that first becomes last and vice-versa.
log_x and log_y request taking the base-ten logarithm of the abscissae or ordinates.
rotate requests rotation of the (x, y) values by the specified angle in degrees. Rotation occurs about (0, 0), or about ( xcen, ycen) if supplied.
number_points requests replacement of the abscissae by successive integer values starting at 0, or at first_number if supplied.
format specifies a C-style format string for printout the output. It should have a sufficient number of components for the uncertainties if these are used or created.
borland@aps.anl.gov