Configuring Clickfit

Clickfit/Fitfun: R. Ghosh, ILL Grenoble, May 2006


Summary
Clickfit is a prototyping GUI for Fitfun programs written in Tcl/Tk demonstrating the possibilities of creating an adaptable general purpose GUI for fitfun programs. Because ascii files are used for communication with the Fitfun fortran programs there is no limit on the GUI language which may be used to create the Control interface.

The clickfit configuration file

An annotated example is shown below. This is typically located with the executable program. Using the default naming convention (filed) allows the configuration file, executable files, help files etc. to be easily moved to another system. For test purposes the full filenames may be used. Lines beginning with # are ignored. The first three fields must be present; all others are optional.

vers|1.0
prog|polymer.exe
prpt|poly
prld|wntle|polymer - prelude
prld|title|Polymer - A.R. Rennie 16 November 2006
prld|help|polyprld.hhh 
prld|Give a model number|float| 1  | 1| 12 |
prld|Give run number for background spectrum|float| 0  | 0| 99999 |
prld|Give extension number for background spectrum|float| 0  | 0| 999 |
prld|Choose weighting 0 - none, 1 - statistical by errors |float| 1  | 0| 1 |
prld|Choose Y scale 1 - Linear, 2 - Log, 3 - Square Root  number|float| 1  | 1| 3 |
prld|Choose number of points in polydispersity calculation |float| 15 | 5 | 50 |
rcmd|wntle|Reading new data
rcmd|title|Reading SANS dat
rcmd|Give run number ... ext number|text|19274 1|
hcmd|wntle|About...
hcmd|title|Polymer - fitting structure to SANS data
hcmd|Helpfile name |filed|polymer.hhh
jcmd|wntle|model output
jcmd|title|Write out model as standard SANS data file
jcmd|help|polyjcmd.hhh
jcmd|Run number|float|1000|1|99999|
jcmd|Extension number|float|0|0|999|
rstx|attempt restart function (dummy at present - rsta control name)

The vertical bar is used as a field separator; keywords must not have additional
blanks around them.

Keywords:
First field:         vers prog prpt prld rcmd jcmd
Second field:        wntle title help
Third field:         float text filer filew filed
Fourth field:        (current value)
Fifth field:         (float - minimum value)
Sixth field:         (float - maximum value)

The sequence of lines is unimportant
vers    must be <= 1.0 for current Clickfit
prog    introduces next field - the filename of the fitfun program
prpt    introduces the four character program name (typically command prompt)
prld    prelude control information
rcmd    read command control information
jcmd    special function contro/data information
hcmd    help info: may be used to display a helpfile (or any other file!)
rsta    fitfun program will restart using current jobname (Q command)

wntle   window title follows
title   title line follows
help	help file launched by HELP_BUTTON for part of an application 
        (prld,jcmd,rcmd) Note: the help file must be found in the default 
        directory otherwise no button is created.

float   data input is float, between minimum and maximum values if set
text    data input is text (transferred as double quoted, read with * format
filer   input file name (presence checked)     "                "
filew   output file (directory presence checked)                "
filed   input file to be found in default directory             "

The iniget routine in Clickfit reads the xxxx.fcl file and infram builds input windows for the various commands; the title may be used for information (it is envisaged that additional title lines may be added and displayed as a sequence of text.)

last updated 28th November 2006 (R.E. Ghosh)