next up previous contents
Next: Miscellaneous topics Up: Stage-II programs Previous: File lists

Ranges

NAME

range and area syntax.

DESCRIPTION

StageII programs have parameter types specifying a range of values, eg.
select events in a time interval or within a range of energy-channels.
Given a range value, with a lower bound p and an upper bound q, and a length
L= p-q for real and L=p-q+1 for integral data. The data-type of boundary
values depends on the internal interpretation of the data, not on the
format, eg. presence or absence of a decimal point, wherein you cast the
numbers.
A range can be specified in one of the formats

        * p-q
        * p : L
        * p

Several ranges can be specified in a comma separated list

     p0-q0,p1-q1, ...

The data-type of boundary values depends on the internal interpretation of
the data, not on the format, eg. presence or absence of a decimal point,
wherein you cast the numbers. The format listed last (p)is an abbrevation
for p-p, this does not make sense for a real valued interval, as it will
have zero length. This abbrevation was introduced to facilitate the
selection of integral values, eg. a combination a energy-channel numbers.

The value for an area parameter consists of two ranges, glued together by a
: (colon). The ranges apply respectively to the first axis (x) and second
axis (y) lengths of the (rectangular) area. The area value may be preceeded
by a letter (i or x), to emphasize the intended meaning, include or exclude
items in the area.
Parameters with this type usually are used to select or reject certain
sections in the formation or destruction of an image.
Again several values may be chained in a comma separated list.

Example.

   * the timerange variable 200:300,700-800 covers a timeinterval from 200
     up to 500 (say) seconds, then skips time till 700, again covering the
     interval up to 800 sec.
   * 2,5,9,12 (short for 2-2,5-5,9-9,12-12, or equivalently
     2:1,5:1,9:1,12:1) selects a number of points from an integer variable,
     eg. the energy-channel.
   * x0-x1:y0-y1,x2-x3:y2-y3 select the union of the area's [x0,y0]-[x1,y1]
     and [x2,y2]-[x3,y3] (points are 'lower-left' and 'upper-right' corner
     respectively).
   * x660:20:660-680 from some process, exclude the area
     [660,660]-[680,680].



Mark Savenije
Sat Jan 18 15:04:49 MET 1997