The header of a General Array Importer file contains two or more of the keyword statements in the list that follows. The statements from block through type are listed in alphabetical order for convenient reference (they can be listed in any order in a header file). The placement of the first two statements in the list (file and grid|points) and the last two (positions and end) reflect syntactic requirements. The descriptions that follow this list occur in the same partly alphabetized order.
Notes:
Function: | Specifies the name of the file (including the path, if any) containing the data to be imported. The Importer searches the directory where the header file was found and any paths specified with the DXDATA environment variable (see the appropriate appendix in IBM Visualization Data Explorer User's Guide for information on environment variables). |
Use: | Required unless the header file contains an end statement. If this statement is omitted, the Importer assumes that the data are contained in the same file as the header and that they begin on the line immediately after the end statement or at the point specified by a header statement. |
Function: | Specifies the size and dimensions of the grid containing the data to be imported. |
Use: | Required unless the header file contains a points statement. |
Notes:
grid = 2 x 2specifies a regular grid of 4 (four) points (the x between integers is required, but the blank spaces are optional.)
Function: | Specifies the number of data points to be imported. |
Use: | Required unless the header file contains a grid statement. |
Notes:
Function: | Specifies characteristics of each data field being imported. This keyword applies only to fixed-format ASCII data with record, record-vector, or series-vector interleaving. |
Use: | Optional. |
Note: All three parameters take integer values. (Comma separators are optional.)
Function: | Specifies the dependencies of the data fields being imported. |
Use: | Optional. By default, data are assumed to be position dependent. Only if the header file also contains a grid statement (see "grid") may you specify connections (cell-centered) dependency (a points statement implies positions dependency). |
Notes:
Function: | Specifies the name and number of individual fields in a data file. |
Use: | Optional. If this keyword is not used, the number of fields is derived from other keywords (e.g., structure or type). |
Notes:
Function: | Specifies the format and byte order of the data. |
Use: | Optional. |
Notes:
Function: | Specifies how much material the Importer must skip before it begins reading data from a data file. |
Use: | Optional.
By default, the Importer assumes that the data begin at the start
of the file.
|
Notes:
backslash \ \\ backspace BS \b bit pattern ddd ddd carriage return CR \r double quote " \" form feed FF \f horizontal tab HT \t newline NL (LF) \n Note: An octal value (ddd) can be used to specify special characters other than those shown here.
Function: | Specifies to the Importer how the data in a data file are interleaved. |
Use: | Optional. By default, the Importer assumes that the interleaving is record-vector. |
Note: The examples presented here are based on a 1-dimensional grid with 10 elements and two series members:
· grid = 10 series = 2 field = t, v structure = scalar, 3-vector ·where t is a scalar value and v is a vector with three components (vx, vy, and vz). In the examples themselves, s represents a series member (0 or 1), and g represents a grid element number (0 through 9). The interleaving options are as follows:
field | Specifies column-oriented data such as that generated by a spreadsheet or by data-listing software. There is a separate "column" for each of the two fields with one element of each field per "row." (For non-scalar data, as here, there is a column for each vector component.) The number of rows corresponds to the size of the grid multiplied by the number of series members. |- Field t -|--------------- Field v ---------------| t(s=0,g=0), vx(s=0,g=0), vy(s=0,g=0), vz(s=0,g=0), t(s=0,g=1), vx(s=0,g=1), vy(s=0,g=1), vz(s=0,g=1), · t(s=0,g=9), vx(s=0,g=9), vy(s=0,g=9), vz(s=0,g=9), t(s=1,g=0), vx(s=1,g=0), vy(s=1,g=0), vz(s=1,g=0), t(s=1,g=1), vx(s=1,g=1), vy(s=1,g=1), vz(s=1,g=1), · t(s=1,g=9), vx(s=1,g=9), vy(s=1,g=9), vz(s=1,g=9) | ||
record | Specifies block or record-oriented data, where the values of all the elements of all the fields corresponding to one member (e.g., a time step) are listed before the elements and fields of the next member. For non-scalar fields, all the values of each vector component (e.g., all values of x) are listed in a separate record rather than in tuples (as they are in record-vector data; see below).
t(s=0,g=0), t(s=0,g=1), ..., t(s=0,g=9), ] Field t * vx(s=0,g=0), vx(s=0,g=1), ..., vx(s=0,g=9), * | Member vy(s=0,g=0), vy(s=0,g=1), ..., vy(s=0,g=9), | Field v | s0 vz(s=0,g=0), vz(s=0,g=1), ..., vz(s=0,g=9), * * t(s=1,g=0), t(s=1,g=1), ..., t(s=1,g=9), ] Field t * vx(s=1,g=0), vx(s=1,g=1), ..., vx(s=1,g=9), * | Member vy(s=1,g=0), vy(s=1,g=1), ..., vy(s=1,g=9), | Field v | s1. vz(s=1,g=0), vz(s=1,g=1), ..., vz(s=1,g=9) * * |
The remaining two options (record- and series-vector) apply to cases in which vector components are stored together:
record-vector | Here the values of all the elements of all the components of all the fields corresponding to each member (e.g., a time step) are listed before those corresponding to the next member (e.g., all the data for s0 are listed first, followed by all the data for s1). In addition, the components of each vector are stored as tuples (in contrast to the way they are stored in record data). t(s=0,g=0), t(s=0,g=1), ..., t(s=0,g=9), ] Field t * vx(s=0,g=0), vy(s=0,g=0), vz(s=0,g=0), * | vx(s=0,g=1), vy(s=0,g=1), vz(s=0,g=1), | Field | Member s0 ... | v | vx(s=0,g=9), vy(s=0,g=9), vz(s=0,g=9), * * t(s=1,g=0), t(s=1,g=1), ..., t(s=1,g=9), ] Field t * vx(s=1,g=0), vy(s=1,g=0), vz(s=1,g=0), * | vx(s=1,g=1), vy(s=1,g=1), vz(s=1,g=1), | Field | Member s1 ... | v | vx(s=1,g=9), vy(s=1,g=9), vz(s=1,g=9) * * |
series-vector | Here the values of all the elements of all the members (e.g., time steps) are listed for one field before those of the next field (e.g., all the data for field t are listed first, followed by all the data for field v). In addition, the components of a vector are stored as tuples rather than in separate records (as they are stored in record data; see above). t(s=0,g=0), t(s=0,g=1), ..., t(s=0,g=9), * Field ] Member s0 t(s=1,g=0), t(s=1,g=1), ..., t(s=1,g=9), * t ] Member s1 vx(s=0,g=0), vy(s=0,g=0), vz(s=0,g=0), * * vx(s=0,g=1), vy(s=0,g=1), vz(s=0,g=1), | | Member ... | | s0 vx(s=0,g=9), vy(s=0,g=9), vz(s=0,g=9), | Field * vx(s=1,g=0), vy(s=1,g=0), vz(s=1,g=0), | v * vx(s=1,g=1), vy(s=1,g=1), vz(s=1,g=1), | | Member ... | | s1 vx(s=1,g=9), vy(s=1,g=9), vz(s=1,g=9) * * |
Function: | Specifies the number of bytes (characters) the Importer must skip before it begins to read a field's data and then the number of bytes it should read (i.e., the "width" of the data item). |
Use: | Optional. This keyword applies only to ASCII, field-interleaved data. If the data is in ASCII format but the keyword is not used, the Importer assumes a default of one or more blank spaces (space, tab, new line, or form feed) as the delimiter between fields. |
Notes:
The following statement tells the Importer to skip 10 characters, read one field of 6 characters, skip 10 characters, and read another field of 4 characters.
layout = 10, 6, 10, 4
layout = 10, 6If the field v is a 2-vector, then each component (vx and vy) is 6 characters long, for a total width of 12 characters.
Function: | Specifies the organization of multidimensional arrays composing a data field. |
Use: | Optional. The default is row (last dimension varies fastest, as in the C programming language). Column majority means that the first dimension varies fastest, as in the FORTRAN programming language. |
Note: The maximum number of dimensions supported for column majority is 4.
Function: | Specifies the separation between records. |
Use: | Optional. This keyword applies only to record and record-vector interleaving. |
Notes:
recordseparator = lines 2
structure = scalar, scalar, 2-vectorthen two separator values must be specified: one between the two scalar fields and one between the second scalar field and the vector field.
Function: | Specifies, to the Importer, information about a series. |
Use: | Optional. This keyword is required only for the importation of series data. The default assumes no separation between series sections. Descriptive information between series sections is described with the separator parameter. If descriptive information precedes the first member of the series, it can be skipped by means of a header statement.
|
Function: | Specifies the structure of each field in a data file. |
Use: | Optional. The default is scalar. Accepted values are scalar, string[ n ], and 2-vector , ..., 9-vector for each field. However, 5-vector, ..., 9-vector cannot be specified for column-majority arrays. In string[ n ], n specifies the length of the longest string. |
Notes:
structure = scalar, scalar, 3-vector
structure = scalar, scalar, 3-vector, scalar, scalar, scalar
Function: | Specifies the data type for each specified field. |
Use: | Optional.
The default is float.
The accepted values are:
double byte int short float signed byte signed int signed short string unsigned byte unsigned int unsigned short |
Notes:
Function: | Defines the positions component of the fields in a data file. |
Use: | Optional. The default is regular positions in compact notation, where the origin and delta in each dimension are 0.0 and 1.0 respectively, unless the locations keyword has been used. |
Notes:
The statement
positions = 0.0, 1.0, 0.0, 0.5, 0.0, 1.5specifies the origin-delta pairs of a 6 × 6 × 3 grid, with origins of 0.0 in all three dimensions and deltas of 1.0, 0.5, and 1.5.
For each dimension, specify a string indicating the type of positions for the dimension--accepted values are regular and irregular. Specify the strings for all dimensions first, then follow with the position values.
For compact specification, the position values are two numbers: an origin and the delta value for the spacing. Specifying irregular positions requires an explicit listing of each position value, with the same number of positions as specified by the grid keyword statement. The order in which positions are specified must correspond to the order in which dimensions are specified in that statement.
The following example specifies the positions for a 6 × 6 × 3 grid, where the first two dimensions are regular, and the third is irregular:
position = regular, regular, irregular, 0.0, 1.0, 0.0, 0.5, 0.0, 0.5, 1.5
Here the first dimension is regular, with positions 0, 1, 2, 3, 4, 5.
The second dimension is regular, with positions 0.0, 0.5, 1.0, 1.5,
2.0, 2.5.
The third dimension is irregular, with positions 0, 0.5, 1.5.
The first few positions are (0, 0, 0) (0, .5, .5) (0, .5, 1.5) (1, 0, 0)....
Note: The requirement that all positions must be listed is what distinguishes a "completely irregular" from a "partially regular" grid (discussed above). For example, the keyword statement
positions = irregular, irregular, irregular,...still defines a partially regular grid, even though each array specified is irregular.
The number of values you provide corresponds to the product of all the dimension specifications (i.e., the num values) in the grid keyword statement. The position values must be listed in row majority order, and they can be delimited by commas.
You must specify g numbers, where g is the product of the num values of the dimensions all multiplied together, along with the number of dimensions (e.g., m×n×o×d, where m, n, and o are the grid dimensions, or num values, and d is the number of dimensions).
The following example specifies the six positions for an irregular 2 × 3 grid:
positions = 0, 0, 0, 2, 0, 6, 2, 1, 5, 4, 7, 7
The first and last positions are (0, 0) and (7, 7) respectively.
You can specify that the information for the positions keyword is to be found in the data file. For the syntax, see B.1 , "General Array Importer: Keyword Information from Data Files" in IBM Visualization Data Explorer User's Guide.
Note: The positions keyword may give a compact encoding of the position. In that respect, this function differs from the locations reserved word when used with the field keyword (see "field").
Function: | Causes the Importer to stop processing header statements. |
Use: | Optional unless the data are in the same file with the header statements. By default, the Importer stops processing at the end of the header file. |
[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]