Appendices

Supported Data File Formats
Supported Graphics Devices
Supported Graphics Attributes
Implicit Data Conversions
Regular Expressions

Supported Data File Formats

Open GENIE supports access to the file formats listed below:

ISIS Raw File (Read only)
GENIE-II Intermediate file (Read only)
Open GENIE Intermediate File (Read and Write, Machine independent)
Open GENIE ASCII File (Read and Write)
HDF Files (Write only, see following note)

These files can all be read directly with the Get() and Put() commands by specifying numbered or named data elements. Open GENIE supports access to any format of ASCII file via the Asciifile() command.

Supported Graphics Devices

This is a list of Graphics device currently supported by Open GENIE. Currently Open GENIE relies on the PGPLOT package and it may well be possible to use other pgplot drivers with Open GENIE. In the distributed version of Open GENIE we have only checked out the functioning of the devices below on all platforms. To see other devices which may be available on a particular version of Open GENIE type

>> Device/Open "Help"

Display devices

Device Name Description String Not supported on
Tcl/Tk driver "TK" or "tk"  
X-Windows devices "XWINDOW" or "xwindow"  

Hardcopy devices

Device Name Description String Not supported on
Postscript (portrait) "PS" or "ps"  
Colour Postscript (portrait) "CPS" or "cps"  
Postscript (landscape) "PS" or "ps"  
Colour Postscript (landscape) "VCPS" or "vcps"  

Supported Graphics Attributes

Fonts

Open GENIE uses the PGPLOT fonts when drawing fonts onto the open graphics device, currently, the supported fonts available are:

$NORMAL
$ROMAN
$ITALIC
$SCRIPT

Note: For accessing special scientific/greek characters within these fonts, the documented PGPLOT escape sequences may be used in the Open GENIE text string being plotted. For example "Time-of-Flight (\gms)" where "\gm" produces a greek Mu character. For further details see the PGPLOT documentation, available at ftp://astro.caltech.edu/pub/pgplot.

Markers

Markers types available for plotting.

$POINT
$PLUS
$STAR
$CIRCLE
$CROSS
$BOX

Linestyles

Linestyles available for plotting.

$FULL
$DASH
$DOT_DASH
$DOT

Colours

Pre-defined colours available for the graphics by default. For using further colours in the graphics, see the Colourtable() and Colour() comamnds.

$BLACK
$WHITE
$RED
$GREEN
$BLUE
$CYAN
$MAGENTA
$YELLOW
$ORANGE
$LIGHT_GREEN
$SEA_GREEN
$LIGHT_BLUE
$PURPLE
$CRIMSON
$DARK_GRAY
$LIGHT_GRAY

Implicit Data conversions table

This table shows how implicit data conversions are handled in Open GENIE. These occur when any two items of different data types are used together in one expression, for example mutliplying an array of Real values by a single integer. The table is symmetrical so only the possibilities on and below the diagonal are shown.

For the example above, we look in the row labeled RA and column labeled I, from this we can see that the result will be an array of Real values.

+ - * / I R IA RA W WA U
I I
R R R
IA IA RA IA
RA RA RA RA RA
W W W W W W
WA WA WA WA WA WA WA
U U U U U U U U

Key

I = Integer
R = Real
W = Workspace
IA = Integer Array
RA = Real Array
WA = Workspace Array
U = Undefined value (nil)

REGULAR EXPRESSIONS

This description was copied from the TCL documentation which in turn was copied from a manual page written by Henry Spencer. The definition below is very succinct but accurate and worth a study, alternatively you may find a more readable description on UNIX systems by doing "man ed" and looking up regular expressions!

A regular expression is zero or more branches, separated by "|". It matches anything that matches one of the branches.

A branch is zero or more pieces, concatenated. It matches a match for the first, followed by a match for the second, etc.

A piece is an atom possibly followed by "*", "+", or "?". An atom followed by "*" matches a sequence of 0 or more matches of the atom. An atom followed by "+" matches a sequence of 1 or more matches of the atom. An atom followed by "?" matches a match of the atom, or the null string.

An atom is a regular expression in parentheses (matching a match for the regular expression), a range (see below), "." (matching any single character), "^" (matching the null string at the beginning of the input string), "$" (matching the null string at the end of the input string), a "\" followed by a single character (matching that character), or a single character with no other significance (matching that character).

A range is a sequence of characters enclosed in "[]". It normally matches any single character from the sequence. If the sequence begins with "^", it matches any single character not from the rest of the sequence. If two characters in the sequence are separated by "-", this is shorthand for the full list of ASCII characters between them (e.g. "[0-9]" matches any decimal digit). To include a literal "]" in the sequence, make it the first character (following a possible "^"). To include a literal "-", make it the first or last character.

Here are some examples to get you going.

(abc|def) Matches the string "abc" or the string "def"
^U + Matches the beginning of the line followed directly by a U then one or more spaces
F.REWORKS Matches the strings FOREWORKS FIREWORKS F@REWORKS etc.
A[^BC]D Matches anything A.D matches but excluding ABC and ACD.
^[ \t]*$ Matches any lines with only spaces or tabs on them.