-
Notifications
You must be signed in to change notification settings - Fork 5
Usage
Eidolon is accessed with the script run.sh on Linux/OSX/Cygwin, run.bat on Windows. By default this loads the whole package along with all plugins, and uses the config.ini file in the application directory (as well as that in ~/.eidolon if present) for configuration. The most common arguments passed to the scripts are Python script files to interpret. A common usage to interpret a script foo.py:
./run.sh foo.py
Running the script with arguments -h or --help lists the available system arguments:
usage: run.sh [--version] [--config FILE] [--var NAME,VAL,...]
[--setting VAL VAL] [-t] [-l] [-c] [--help]
[files [files ...]]
Eidolon
positional arguments:
files Python Script Files, Project Directories, or Data Files
optional arguments:
--version show program's version number and exit
--config FILE Specify configuration file
--var NAME,VAL,... Provide script string variables
--setting VAL VAL Override a config setting value
-t Enable line tracing in stdout or log file
-l Enable logging to file
-c Display the console at startup
--help, -h Display this help text and exit
Plugin 'CHeart':
Usage: --cheartload=XFILE,TFILE,BASIS [--cheartfield=DFILE,DIM[,TFILE,BASIS]]
[--cheartrepr=TYPE[,REFINE[,EXTERNONLY]]]
Where:
XFILE, TFILE, DFILE Data file paths
BASIS Basis type identifier (eg Tet1NL)
DIM, REFINE Positive integers
EXTERNONLY 'true' or 'false'.
Plugin 'Nifti':
Usage: --nifti=NIfTI-file-path[,representation-type][,...]
Plugin 'MetaImg':
Usage: --metaimg=header-file-path[,representation-type][,...]
Plugin 'VTK':
Usage: --vtk=vtk-file-path[,vtk-file-path]*
Plugin 'Medit':
Usage: --medit=mesh-file-path[,solution-file-path]
Plugin 'STL':
Usage: --stl=file-path[,file-path]*
Plugin 'NRRD':
Usage: --nrrd=file-path[,representation-type][,...]
Plugin 'ParRec':
Usage: --parrec=par-file-path[,representation-type][,...]
Any arguments provided that aren't any of the above get kept anyway and may be recognized by plugins at initialization time to do custom operations. Plugins should list what they understand as shown above.
The CHeart plugin, for example, allows one to load a simple mesh and produce a simple representation for it using two arguments, each of which requires a comma-separated list of arguments after an equals character:
--cheartload=<XFILE>,<TFILE>,<BASIS>
--cheartfield=<DFILE>,<DIM>[,<TFILE>,<BASIS>]
--cheartrepr=<TYPE>[,<REFINE>[,<EXTERNALONLY>]]
The first argument loads a mesh based on the given node and topology files and the given geometry+basis specifier. The second loads a field for the previously loaded scene object, the tfile and basis values are optional. The third will produce a simple representation of this mesh of the given type, the refinement level and external-only specifier are optional. For example, to load the Tutorial 1 mesh and produce a volume representation of it, this command is used:
./run.sh --cheartload=tutorial/linmesh_FE.X,tutorial/linmesh_FE.T,Hex1NL --cheartrepr=volume
Eidolon relies on the config.ini file that's included in its directory for a lot of critical configuration values. This file is copied to ~/.eidolon so you can tweak this one to change values or add new ones, the commentary explains their usage and acceptable values.
The alternative way of using custom config files is to specify a config file on the command line with --config. With this option, the given file is loaded instead of the one in ~/.eidolon if it exists, however the file in the Eidolon's directory will still be loaded first.
The command line option --setting allows a configuration value for the platform-specific config section to be set as well. Values specified on the command line has priority over those loaded from any config file. For example, the following command line will load Eidolon with the !RenderSystem set to OpenGL:
./run.sh --setting RenderSystem OpenGL
One important value in config.ini is preloadscripts. This is a comma-separated list of Python scripts to load at startup before any others. These can be relative or absolute paths, if they begin with ./ Eidolon will search for them in the same directory as the configuration file they're mentioned in. This allows you to define startup scripts in your ~/.eidolon directory and then listing them in preloadscripts so they load every time at start up.
For example, if a file startup.py is present in the same directory as a config.ini script, the following config value will load it:
[All]
preloadscripts=./startup.py
The section is relevant for this config value. In the above, the section is All so will always be used, if you wanted to specify scripts on a per-platform basis this is possible by putting the option in those sections instead.