This is an old revision of the document!


PHP's gd library is missing or unable to create PNG images

Lookup Table Type

A lookup table is a collection of key and value pairs. Both key and value are represented using double precision floating point numbers, allowing the definition of integral and fractional keys and value pairs.

Optionally, a lookup table may also include key and value names.

GUI Editor

Graphical representation of the lookup table editor

The editor provides some additional useful operations:

It is possible to load the editor content importing the value from a CSV file. It is also possible to export the content to a CSV file.

Two rows can be used to interpolate other rows in between. The keys are created incrementing the lower selected key until the greatest selected key is reached. The values are interpolated linearly between the two original selected values.

The table can also be presented as a graph using different representations.

EGO Script

Lookup tables are a sequence of key/value pairs enclosed by [ ]. The keys/values are represented by real values. See Table Type for the syntax rules that apply to tables in general, of which this is a specialized, Real-only case.

[
  1991 0.02,
  1993 0.025,
  1997 0.01,
  1999 0.05
]

The use of commas between elements and key/value pairs is optional. The layout can also be changed at will.

[ 1991 0.02 1993 0.025 1997 0.01 1999 0.05 ]

Optionally, the first two elements may define the key/value names. The key name may also be suffixed with “*”. If the names are omitted, the resulting table uses “Key” and “Value” as the key and value names, respectively. Blanks in names are automatically replaced by “_” (underscore).

[
  "Year" "Transition Rate",
  1991 0.02,
  1993 0.025,
  1997 0.01,
  1999 0.05
]

Again, the table layout is not relevant.

[ "Year" "Transition Rate" 1991 0.02 1993 0.025 1997 0.01 1999 0.05 ]

Key/value sequences can be defined using the operator .. (two consecutive dots). This is the same interpolation described under GUI Editor above, expressed in text instead of by selecting two rows. This operator forces the values between the given pair of entries to be automatically generated. Keys are generated incrementing the initial sequence key by one until reach the final sequence key. Values are generated interpolating the corresponding values across the key ranges.

[
 "X" "Y",
 1.0 4.0,
 1.3 12.0,
 1.7 5.0 .. 7.3 8.5
]

The previous table is automatically expanded to

[
 "X" "Y",
 1.0 4.0,
 1.3 12.0,
 1.7 5.0,
 2.0 5.5,
 3.0 6.0,
 4.0 6.5,
 5.0 7.0,
 6.0 7.5,
 7.0 8.0,
 7.3 8.5
]

It is possible to use more than one sequence definition in a given table.

[
  "Year" "Transition Rate",
  1991 0.02,
  1993 0.025,
  1997 0.01 .. 1999 0.05,
  2004 0.02 .. 2010 0.025,
]

When a script is saved, the lookup tables are automatically collapsed using the .. notation, if possible.

Automatic Conversions