Next: Sim2Oogl as a Scientific
Up: Visualization of Data
Previous: Visualization and N-Body Simulations
With this information, writing the programme was quite
straightforward; invoked from the command line, the programme which is
called sim2oogl requires the name of the data file to be
converted, the format of the data file and the type of output
desired.
- the format of the file : this refers to the structure of the file - it
can be SNAP/Tipsy, Zeno or P.
-
Tipsy files are readable by the Tipsy data visualisation package; this
allows results of N-Body simulations to be quickly displayed and analysed.
-
Zeno files are produced by Josh Barnes Zeno N-Body simulation
package.
-
P files are simple ascii data files
- the type of output desired : this rather self evidently refers
to the form of Geomview readable output that is produced by the
programme. The user can choose one of:
- position coordinates (X-Y-Z)
- velocity coordinates (Vx-Vy-Vz)
- position (X-Y) with line of sight velocity (Vz)
- position (X-Y-Z) with velocity vectors (Vx-Vy-Vz)
- all of the above
Additional options are available - the user can define the
number of particles in the disks and halo as well the number of
galaxies involved. The default assumes two galaxies without halos and
each disk containing N/2 particles, where N is the total number of
particles involved in the encounter.
Since Geomview is being used to display our data, I decided to further
develop sim2oogl into an external module which can be used in tandem
with the command line version of the programme. This module is called Sim2Oogl and it
offers the user a GUI, built using the Tk/Tcl toolkit and scripting
language, and invoked from within Geomview. The GUI extends the
usability of sim2oogl, allowing the user to carry out a batch
conversion of data files in addition to allowing files to be viewed
once they have been converted.
The Tk GUI is built on top of the basic command line version of
sim2oogl; the programme's function which handles input and output can
be developed into a dynamically loadable extension that can be loaded
into the Tcl interpreter using the load command. In principle,
this is possible by working with Tk/Tcl's collection of C libraries,
but a somewhat easier route was taken by using a programme called
SWIG. SWIG requires an interface file in which the C functions to be
used are declared as external objects; when invoked, SWIG then
produces a wrapper file that is compiled and linked with the rest of the
programme. In doing so, we get the dynamically loadable extension that
can then be loaded into the Tcl script. Thus we have a means for
exchanging information between the user interface and the basic
conversion programme, as desired.
A comprehensive website Sim2Oogl1.0 in a Nutshell was prepared (and mirrored in the
packaged documentation) for user support. Further modifications of
the programme will be posted to this website as they come to
fruition.
Next: Sim2Oogl as a Scientific
Up: Visualization of Data
Previous: Visualization and N-Body Simulations
Chris Power
Thu Sep 16 20:11:54 BST 1999