Types

There are a number of basic variable types, listed below. The type of a variable in a command or function is always cued by the name given in the command/function signature, which will either be (e.g, b for a boolean type) or start with (e.g., fposx for a float type) the first letter of the type’s name. Multiple instances of the same type in a command signature or FISH function are most often numbered (i1 i2 i3 … and so on).[1]

any

A catch-all for any (a) of the other types, excepting sym, shown here. Multiple instances in a command are numbered (a1 a2 a3 etc.). This type is also indicated when a specific combination of types is acceptable (for instance, the common case where a string s or an integer i may be supplied). When this is the case, the specific acceptable types are indicated in the explanatory text.

bool

A Boolean value (b), with six valid expressions: on off true false yes no. If no value is found, a Boolean is assumed to be true. No value, on, true, and yes are all equivalent. off, false, and no are all equivalent. Multiple instances in a command are numbered (b1 b2 b3 etc.).

flt

A real number (f), positive or negative. It may be written in scientific e notation. Multiple instances in a command are numbered (f1 f2 f3 etc.).

ind

An index (ind), positive integer. Multiple instances in a command are numbered (ind1 ind2 ind3 etc.).

int

An integer (i), positive or negative. An integer cannot contain a decimal. Multiple instances in a command are numbered (i1 i2 i3 etc.).

list

A list (l), which is a changeable, ordered sequence of elements or items. Lists items are accessed by index. See Lists for more information.

map

A map (m) container of key-values pairs. See Maps for more information.

num

A number (n), for which either a flt or an int is valid. Multiple instances in a command are numbered (n1 n2 n3 etc.).

str

A string (s) of alphanumeric characters. Multiple instances in a command are numbered (s1 s2 s3 etc.). See Strings for more information.

sym

A FISH symbol (name) — where name is the name of either a FISH variable or a FISH function.

ten

A symmetric tensor. In 3D this is a six component value consisting of the \(xx, yy, zz, xy, xz,\) and \(yz,\) values in that order. In 2D this is a four component value with the \(xz\) and \(yz\) values removed and considered always uniquely zero.

There are three different ways to specify a tensor on the command line

fxx <fyy <fzz <fxy <fxz <fyz>>>>>

Specify one to six components of the tensor directly as floating point values in the order above. Any components not given are assumed to be zero. Note that if only the fxx component is given then the tensor is specified to be isotropic with fyy = fzz = fxx.

keyword f

where keyword can be one of xx, yy, zz, xy, xz, or yz given in any order followed immediately by f for that component value. Any component not specified is assumed to be zero.

Principal fmin <fint> fmax keyword…

where the maximum, intermediate, and minimum principal values of the tensor are specified after the principal keyword. If only two values are specified (the fint value is omitted) you are assumed to be specifying a 2D tensor. Following the principal values you must give the orientation of the principal directions. You can do this in one of two ways:

You can specify two of the three directions as unit vectors using the minimum, intermediate, or maximum keywords followed by a direction vector. In 2D you need one of either minimum or maximum.

Or you can specify a tensor orientation using the dip, dip-direction, and roll keywords following by an angle in degrees. In 2D you just need a dip value.

vec

A vector (v or v2 or v3) expressed as a matrix with one row. v2 and v3 denote that a 2D or 3D vector, respectively, is required. A plain “v” indicates that a vector of the same dimensionality as the code is required, that is, a 3D vector is required if the code is a 3D code, and a 2D vector is required if the code is a 2D code. In FLAC3D, v always indicates a 3D vector. When more than one vector of the same type in is required in a command these are distinguished with underscore-appended letters (v2_a v2_b or v_a v_b, etc.). See Vectors for more information.

vec2

A 2D vector.

Endnotes