User's Guide

MGR2MTB

Generates an IBIS tabular file from an IBIS graphics file.

Function:

Generates an image based information system (IBIS) tabular file from an IBIS graphics file. The consecutive groups from the graphics file are read and written out to the tabular file. Each group becomes one row.

If not all the elements of the group need to be copied to the tabular file, the NELMTS and ELMTNUM parameters must be used.

Parameters:

INFILE
Input file. Input IBIS graphics file.

OUTFILE
Output file. Output IBIS tabular file.

OUTCOL(--)
Output columns. The destination columns in the output tabular file. The default value causes column 1 through column n (n = NCOLS) to be used. If OUTCOL is defaulted, NCOLS must be specified.

If NELMTS is not supplied, the number of values entered for OUTCOL specifies the number of four-byte elements in a group from the graphics file to be placed in a row of the tabular file.

Columns not specified are filled with zeros.

NCOLS(--)
Number of columns. The number of columns to be created in the output tabular file. The default value causes NCOLS to be set as the largest column number in OUTCOL.

If a value specified is less than the largest column number in OUTCOL, then NCOLS is reset with the larger value.

NELMTS(--)
Number of elements. Specifies the number of four-byte elements in a group. NELMTS is used with ELMTNUM if not all the elements of the group are to be output to the IBIS tabular file.

ELMNTNUM(--)
Element numbers. Specifies which elements in a group are to be copied to the columns specified by OUTCOL.

NROWS(--)
Number of rows. The number of rows to be written to the output file. The default is to write the entire graphics file.

Examples:

    The following diagram represents the logical structures of the IBIS graphics and tabular files for Examples 1 and 2 below.

    		     GRAPHICS FILE		     
             ________________________________________      
             | 5 12 26 19   3 29 45 72   0 13 21 40        
             | --group 1--  --group 2--  --group 3--       
             |_______________________________________      
             | . . . . . . . . . . . . . . . . . . .       
             |_______________________________________      
    
    
             TABULAR FILE
    
             K1=1 K3=4 K2=5 K4=15
             ____________________
             |  5   26   12   19
             |  3   45   29   72
             |  0   21   13   40
             |  .    .    .    .
             |  .    .    .    .
    

  1. LAS> mgr2mtb infile=graph outfile=tab outcol=(1 5 4 15) ncols=15 nrows=20

    Twenty consecutive groups of 4 elements from the graphics file are read and written out to 20 rows of the tabular file, one group per row. All columns except 1, 5, 4, and 15 of the output tabular file contain zeros.

  2. LAS> mgr2mtb infile=graph outfile=tab outcol=(1 5 4 15) nrows=20

    This example produces the same output as Example 1.

  3. LAS> mgr2mtb infile=graph outfile=tab outcol=(1 2 3 4) ncols=20

    Columns 1 through 4 of the output file contain the groups of four elements from the input graphics file, while columns 5 through 20 are filled with zeros. The entire graphics file is processed.

  4. LAS> mgr2mtb infile=graph outfile=tab outcol=(1 7 9 10) ncols=15 nelmts=6 elmtnum=(2 3 4 5)

    The output tabular file created has 15 columns. Out of every group of 6 elements from the graphics file, elements 2, 3, 4, and 5 are copied into output columns 1, 7, 9, and 10, respectively. The other output columns contain zeros.

Description/Algorithm:

The program begins with the standard initialization and retrieval of user-specified parameters. If necessary, the defaulted parameters are set with the appropriate values. The input and output files are opened, and the output tabular file is generated from the input graphics file according to the given specifications.

Nonfatal Error Message:

  1. [mgr2mtb-close] Error closing <XXXXX> file

    An error was encountered while closing the <XXXXX> file. The data may still be valid.

Fatal Error Messages:

  1. [mgr2mtb-fatal] Fatal error encountered

    A fatal error was encountered during processing. The output IBIS tabular file may or may not be valid. The message that is displayed immediately preceding this message is the specific error that was encountered.

  2. [mgr2mtb-ncols] Either NCOLS or OUTCOL must be specified

    The NCOLS and OUTCOL parameters cannot both be defaulted.

  3. [mgr2mtb-open] Error opening <XXX> file

    An error was encountered while trying to open the specified file.

  4. [mgr2mtb-read] Error reading input file

    An error was encountered while trying to read from the IBIS graphics file.

  5. [mgr2mtb-write] Error writing output file

    An error was encountered while trying to write to the IBIS tabular file.

User Note:

  1. Related program is MTB2MGR.