Isis 2 Documentation
tbl2asc - Translate binary TABLE object to ASCII format TBL2ASC lists the contents of a TABLE object to an output text file. The output of this program is written to a text file with easily identifiable sections of information that are related to the TABLE object being listed. The TAE parameter LINLEN may be set to specify the desired length of each output text line allowed in the output file. This specification applies only to the data section and will dictate the number of text lines required to write a single row of data translated to an appropriate ASCII representation of each column in the row. TBL2ASC can list only those columns of interest by using the TAE input parameter, COLUMNS. Using this parameter, one can select specific columns and the order in which the columns are written to the file. The TAE parameter, FORMATS, can also be used to change the default output FORTRAN format used to write each column element to the output file. The DATADESC, LABEL, HISTORY and HEADER parameters are flags that result in various information being written to the output file. These flags correspond to four optional sections in the output file. The Data Description, label, history and header sections are entirely optional. The Data Description section is provided to describe the fifth and last section - the data section. This section follows PDS syntax and is very similar to an ISIS file label. The DATADESC parameter controls the creation of this section in the output file. The LABEL parameter controls how much label information is to be copied from the input file to the output text file. If label information is requested, the user can select only the object description for the table object being processed. Or, the user can select the entire label for the input file, which might include object descriptions for additional data objects. The option to dump the contents of the HISTORY object contained in the TABLE file in the history section of the output file is controlled by the HISTORY flag. To have a heading of column names constructed in the output file, set HEADER="YES". Note that if this option is requested, then the width of each column in its ASCII representation is subject to adjustments to accomodate the length of each column name. Adjustments will occur if the length of the column name is longer than the size of the ASCII representation of the data resulting from the output FORTRAN format specified for the column. The organization of the output file is constructed in at most five sections. The first section must be the text Data Description section and is optional. This section describes the data section. The next section is the label section, which is preceeded by a 'C_LABEL' tag on a line by itself. The next section is the history section, which is preceeded by a 'C_HISTORY' tag on a line by itself. This section is optional and contains a "dump" of the HISTORY object in the TABLE file. The fourth section is the header section preceeded by a 'C_HEADER' tag. This section is also optional and contains a "map" of the line and column data section. The final section is always present in the output text file and is the data section. It is preceeded by a 'C_END' tag and contains the ASCII translation of binary data from the TABLE file. If all optional sections are omitted, then the data section is the only output to the file. For this case only, the 'C_END' is NOT written to the output file. If a column contains REAL*4 data values, then the following will be used for indicating special pixel values: NUL - NULL LRS - Low Representation Saturation LIS - Low Instrument Saturation HIS - High Instrument Saturation HRS - High Representation Saturation The ASC2TBL program can be used to translate a text file produced by TBL2ASC back into a binary table file. Programmer: Kris Becker, U.S.G.S., Flagstaff
Parm | Description | Default |
---|---|---|
FROM | Input TABLE file name (default extenton is .TBL) | NONE |
OBJNAM | Specifies the name of TABLE object to list rows from. | "TABLE" |
TO | Name of output text file (default extention is .DAT) | NONE |
LINLEN | Maximum size in bytes of each ASCII output line | -- |
COLUMNS | Names/order of COLUMNS for TABLE object. Listing none will result in all COLUMNs listed | -- |
FORMATS | Optional formats for each COLUMN | -- |
DATADESC | Whether to write Data Description to output file (YES or NO) | "YES" |
LABEL | Option to copy label to output file (OBJECT, FILE, or NO) | "OBJECT" |
HISTORY | Whether to copy HISTORY object to output file (YES or NO) | "YES" |
HEADER | Whether to write column name header (YES or NO) | "YES" |
USERNOTE | Comment for user | " " |
ADDITIONAL NOTES:
Parm | Description |
---|---|
FROM | Input TABLE file name. This file specification can optionally include the disk directory of the file. If the file extension is omitted, then ".TBL" will be assumed. |
OBJNAM | Name of TABLE object in the file that will be listed. If none is specified (i.e., OBJNAM=" "), then "TABLE" is used as a default. |
TO | TO specifies the name of an output text file where the translation of the binary TABLE object to ASCII will be written. |
LINLEN | Maximum length of each ASCII line. This parameter will specify the maximum number of bytes that each translated ASCII line can contain. Note that this line length specification applies only to translation of row data. If this parameter is not provided, tbl2asc will set it to the maximum supported size of a single line as the default. This may result in all data to be placed on a single line up to the maximum supported line length. |
COLUMNS | Names of columns. This allows the user to reorder and select only specific columns to list. This will override the default condition of all columns in the row. If a column name is given, it is not required that a format be given in the FORMATS parameter as this condition will result in the use of the default format for the column. |
FORMATS | Allows the user to specify a new output format for the COLUMN data to be translated to in its ASCII form. If a BLANK is specified, then the default format for that field type is used. These values are used only when a corresponding column name is given in the COLUMNS parameter. |
DATADESC | Gives the user the option to create a text DATA DESCRIPTION of the column data written to the output file. It will follow PDS syntax format and will give the specifics on the characteristics of each column. |
LABEL | Specifies the desired option for copying label information from the input table file to the output ASCII text file. Available options are: OBJECT - Copy only the object description for the table object being processed FILE - Copy the entire label of the input file, which will include descriptions of ALL the objects in the input file NO - Do not copy any label information |
HISTORY | Will notify TBL2ASC to list the contents of the HISTORY object from the TABLE file to the output text file. |
HEADER | Notifies TBL2ASC to create a header in the output text file of the names of each column. |
USERNOTE | Specifies a comment that will be entered into the output log file. |
Contact us online at the Isis Support Center: http://isisdist.wr.usgs.gov