.TAB File Format
The .TAB
file format is designed to
store numeric data sets in a format that is easier
for human beings to read, write, and edit than
the Scope SAVE
and READ
formats.
TAB files consist of one or more records,
each containing one or more variables.
Each variable has a name,
and can be a scalar, vector, or matrix quantity.
Variable names are case-insensitive, and follow the
usual Scope naming conventions (must begin with a letter
and contain only letters and digits).
Each variable in the file must have a unique name,
with the exception of the index variables in !I
records).
There are several different record types. Directives are lines beginning with an exclamation point, and specify the format of succeeding data lines.
Comments
A comment directive is an exclamation point followed
by a blank or a tab.
Any line beginning with a comment directive is ignored.
In addition, lines beginning with a pound sign (#
),
and those consisting of a single exclamation point, are
also ignored.
!T Records (Tables)
Table records contain multiple columns of data.
Each column is a single variable.
Table records begin with a !T
directive,
which specifies the column names.
!T var1 ... varN
r1c1 r1c2 ... r1cN
...
rMc1 rMc2 ... rMcN
The rIcJ_s are floating-point numbers. Each data row must contain the same number of elements. The _varJ specify the variable names. Each variable is an M-long vector, containing the values r1cJ … rMcJ.
!I Records (Indexed Tables)
!I
records have the same format as !T
records, but are interepreted slightly differently.
!I
must have at least two columns.
The first column is the independent variable,
and must be monotonically increasing.
The remaining columns are the dependent variables.
When read into Scope with the LOADTAB
command,
variables var2… varN
will appear as 2-column arrays,
with the independent variable (var1) in column 1
and the dependent variable (vari) in column 2.
This format is useful if there are multiple groups of dependent variables which share the same logical independent variable, but have different lengths. This is often the case in, for example, blade property tables.
!M Records (Matrices)
Matrix records contain a single 2-D variable.
Matrix records begin with a !M
directive,
and are followed by the matrix data,
with one row per line.
All lines in an !M
record
must have the same number of entries.
!M varname
r1c1 r1c2 ... r1cN
...
rMc1 rMc2 ... rMcN
!B Records (Block data)
A !B
(Block data) record specifies a single 2-D matrix
with free-form input.
Elements are listed in column-major order (i.e., the elements
of the first column, followed by the elements of the second, etc.
Note that this is transposed from the !M
format.)
Line breaks are not significant.
!B
records are compatible with the Scope SAVE
file format.
!B varname #rows #cols
e1 e2 ... eN
!U Directives (Units specification)
A !U
directive may immediately follow
!T
, !I
, or !M
directives.
The !U
record contains a space-separated list
of unit specifications; there must be exactly as many
unit specifications as there are variable names in the
preceding directive.