Keywords: greg

Next: Using Variables Up: Two-Dimensional Regular Grid Array Previous: Variables and Images: Contents Index

#### RGDATA File Format :

A somewhat obsolete way of initializing the RGDATA array is rge so-called ``RGDATA file format''. Suitably formatted files can be read by the `RGDATA` command when no `/VARIABLE` option is specified. A header is read first to find the array dimensions, and then the array, using a user-specified format. The default format is `Z8.8` and can be changed using the `/FORMAT Expression` option. . `Expression` must be a valid FORTRAN format. It is possible to select only a subset of the input array, using the option `/SUBSET IX1 IY1 IX2 IY2`, where IX1 and IY1 are the pixel values of the bottom left corner, IX2 IY2 those of the top right corner of the area to be selected.

The input file for the RG buffer must be a fixed length formatted sequential file with 80-Bytes record length. The first four records are used to describe the correspondence between indices and User Coordinates and must give the following values

- `Record 1 NX XREF XVAL XINC`
  describing the X axis Coordinates, corresponding to indice I, where
  - NX is the number of (I) pixels
  - XREF is the X-axis reference pixel. XREF is a real, that is one can place the reference pixel on non-integer values.
  - XVAL is the User Coordinate (abscissa) at the reference pixel
  - XINC is the User Coordinate increment per pixel along the X-axis, which can be negative.
- `Record 2 ``Any comment you want for the X axis'`
  is a comment line for bookkeeping. It may be empty but must be present. This comment will be written by GREG when it finds it (as an alphanumeric comment, not on the plot). It may help you remember the X coordinate type for example, or simply the file content.
- `Record 3 NY YREF YVAL YINC`
  similar to record 1, but for the Y axis Coordinate (indice J).
- `Record 4 ``Any comment you want for the Y axis''`
  similar to record 2.

All the following records contain the RG array, written in the standard Fortran ordering (I varies first) in format 20A4. The variables XREF, XVAL, XINC, YREF, YVAL and YINC are declared Real*8 to provide accurate conversion formulae. The conversion formulae are thus

             X(I) = XINC*(I-XREF)+XVAL
             Y(J) = YINC*(J-YREF)+YVAL

respectively for X and Y coordinates.

Next: Using Variables Up: Two-Dimensional Regular Grid Array Previous: Variables and Images: Contents Index