data tensor import command


data tensor import s <group s <slot s >>

Import tensors from file s. The extension tensor is added if one is not provided. The file format (text or binary) is determined by opening the file and looking for the appropriate header. If the proper header is not found, an error is indicated and no data imported.

If the group keyword is specified, imported tensors are assigned the specified group name. This group assignment overrides any in the import file. The relevant file formats are shown below.

Text Format

; The line above is a text mode header indicator  —  it is required for the
; file to be recognized as a scalar data text file.
; Comment field  —  any text after a semicolon is ignored. Blank lines are
; ignored.
; The following first
; All data are comma and space delimited.
GROUP s name  ; All scalars following are assigned group name name to the
             ; slot s.
             ; GROUP statements can be added later in the file,
             ; adding to or replacing previous GROUP assignments.
EXTRA i val    ; All scalars following are assigned extra data val in the ith
             ; index.
             ; EXTRA statements can be added later in
             ; the  file, adding to or replacing previous EXTRA
             ; assignments.
x y z  s11 s22 s33 s12 s13 s23 EXTRA i val  ...
  GROUP s name  ...
   ; The above format is the position/tensor value version, other valid
   ; formats are:
x y z  PRIN p1 p2 p3 NORM# vx vy vz DIR# dip dd EXTRA i val  ...
  GROUP s name  ...
   ; In the above format, the tensor is given in terms of its principal
   ; values and directions.
   ; NORM# indicates NORM1, NORM2, or NORM3  —  DIR# is the same.
   ; At least two principal directions must be given using either DIR# or
   ; NORM#.
;  Each line indicates a single vector object. The EXTRA and GROUP keywords
;  are optional.
;  each EXTRA and GROUP keyword (there can be more than one per line) can
;  be followed by any number of index value pairs, indicating the index
;  of slot the value should be made to.
;  Group names are strings (" delimited for embedded spaces).
;  EXTRA data can be a string, an integer, or a real.

Binary Format

0x03714713 (unsigned 32 bit integer indicating it is binary tensor data)
3 (unsigned 8 bit integer indicating 2 or 3 dimensions)
Each tensor:
  x y z as double precision
  s11 s22 s33 s12 s13 s23 as double values
uint32 as number of extra, following by that many extra.
uint32 as number of group names, following by that many strings.
extra:  uint8 as type code (0= 64 bit signed int, 1 = 64 bit double
  precision, 2 = string).
string: uint16 as string length, that many uint16 as string contents.