![]() |
SpecTcl commands |
![]() |
---|
SpecTcl Home General Information User Guide Programmer's Guide Obtaining and Installing
This page contains both a Functional index of commands and an Alphabetical Index.
Display Control |
Event Source Selection |
Run Control |
Parameter Manipulation |
Spectrum Manipulations |
Gates |
Saving and restoring state |
Formatted Display of state |
Filters |
TreeParameter and TreeVariable |
While the number and sizes of the spectra supported by SpecTcl is limited only by virtual memory available, the Xamine display program has a limited number of spectrum slots and a limited amount of spectrum storage. The number of slots is fixed by Xamine, however the amount of storage is set dynamically when SpecTcl initializes. The commands in the table below allow the user to control which set of spectra are loaded into the displayer's shared memory at any given time. Binding and unbinding spectra does not affect spectrum contents. They are copied into display storage from SpecTcl private channels and back as needed.
Command | Purpose |
sbind | Attach a spectrum to a display slot |
unbind | Detach a spectrum from a display slot |
SpecTcl can accept event data from several types of event sources. Source and source types can be switched dynamically throughout the run without exiting the program. Thus you can start out analyzing online data and then switch to analyzing data from disk, or tape and back. Tape event sources are assumed to be ANSI labelled tapes with possibly several run files per tape.
Command | Purpose |
attach | Attach an event source to SpecTcl detaching any current event source |
tape | Select specific files from tape |
While SpecTcl can analyze data and simultaneously respond to user input, some operations, such as switching event sources, require that data analysis be switched off. This section describes commands for manipulating the way SpecTcl analyzes data.
Command | Purpose |
start | Start Event analysis |
stop | Stop Event analysis |
SpecTcl parameters have three properties:
This section describes commands which manipulate parameters.
Command | Purpose |
parameter | Creates, deletes, lists parameters. |
pseudo | Creates a Pseudo Parameter. |
ParList | A Tcl script which creates a nicely formatted parameter list. |
SaveParams | A Tcl script which saves parameter definitions to a Tcl/TK script file from which they can be restored. |
Parameters can be histogrammed into spectra. The spectra can be bound to the displayer to be Xamined. This section describes commands which define, delete, list and in other ways manipulate spectra.
Command | Purpose |
channel | Access channels of a spectrum. |
clear | Zeros the contents of a set of spectra. |
project | Create a spectrum that is a projection of an existing 2-d spectrum |
spectrum | Creates, lists or deletes spectra. |
Gates can be created and applied to spectrum to control when they are incremented. In general, a spectrum is incremented only if the following conditions are true:
Note: If a parameter needed for a gate is not present, then the gate evaluates false.
Command | Purpose |
apply | Applies a gate to a spectrum. |
gate | Creates, lists or deletes a gate. |
ungate | Ungates a spectrum. |
fold | Folds gamma spectra. |
These commands are actually implemented by Tcl scripts which are stored in $SpecTclHome/Script. The Read scripts support some action tailoring see here for more information. Commands to save and restore the analysis state are:
Command | Purpose |
clean | Deletes all parameter and spectra |
loadall | Loads a saved state file created with saveall. Saved state files are Tcl scripts. Loadall executes lines in the script file while handling known errors which can occur in definitions. |
saveall | Saves the state of the SpecTcl analysis to a file which can be read in using loadall |
sread | Read a spectrum from file |
swrite | Write a set of spectra to file |
The filter command allows you to create and manipulate event filters.
The Tree Parameter package provides three facilities:
In order to support the GUI supplied by Treeparameter, and to allow you to create your own GUI software, the Treeparameter package creates two SpecTcl commands:
Command | Purpose |
treeparameter | Manipulates and queries the properties of tree parameters. |
treevariable | Manipulates and queries the properties of tree variables. |
Most of SpecTcl's native commands for listing internal state produce output which can be easily processed by other SpecTcl scripts. While this simplifies the act of extending SpecTcl, it does make it a bit hard to interpret the data produced by these commands. Standard scripts are supplied with SpecTcl to produce more user friendly output:
Command | Purpose |
ApList | Creates s nicely formatted list of which spectra have gates applied and what those gates are. |
GateList | Displays a nicely formatted list of the gates |
More | Paginate output. |
ParList | A Tcl script which creates a nicely formatted parameter list. |
SpecList | Lists spectra in human readable format |
Command | Purpose |
apply | Applies a gate to a spectrum |
ApList | Creates s nicely formatted list of which spectra have gates applied and what those gates are. |
attach | Attach an event source to SpecTcl detaching any current event source |
channel | Access channels of a spectrum. |
clean | Deletes all parameter and spectra |
clear | Zeros the contents of a set of spectra. |
filter | Creates and manipulates event filters. |
fold | Applies, removes and lists folds on gamma spectra |
gate | Create list or delete gates |
GateList | Displays a nicely formatted list of the gates |
loadall | Loads a saved state file created with saveall. Saved state files are Tcl scripts. Loadall executes lines in the script file while handling known errors which can occur in definitions. |
More | Paginate output |
parameter | Creates, deletes, lists parameters. |
ParList | A Tcl script which creates a nicely formatted parameter list. |
project | Create a spectrum that is a projection of an existing 2-d spectrum |
pseudo | Manipulates pseudo parameters. |
saveall | Saves the state of the SpecTcl analysis to a file which can be read in using loadall |
spectrum | Creates, lists or deletes spectra |
SpecList | Lists spectra in human readable format |
sbind | Attach a spectrum to a display slot |
sread | Read a spectrum from file |
start | Start Event analysis |
stop | Stop Event analysis |
swrite | Write a spectrum to file |
tape | Select specific files from tape |
treeparameter | Manipulate and query tree parameters. |
treevariable | Manipulate and query tree variables |
unbind | Detach a spectrum from a display slot |
ungate | Removes a gate condition from a histogram |
SpecTcl Home General Information User Guide Programmer's Guide Obtaining and Installing
Last Modified: October 28, 2003 by: fox@nscl.msu.edu
© Copyright NSCL 1999, All rights reserved