nscl_logo_small.gif (2463 bytes)

SpecTcl commands

HH00706_.wmf (6530 bytes)

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.

Functional Index of Commands

Display Control
Event Source Selection
Run Control
Parameter Manipulation
Spectrum Manipulations
Gates
Saving and restoring state
Formatted Display of state
Filters
TreeParameter and TreeVariable

Top

Display Control

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

Top Functional Index

Event Source Selection

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

Top Functional Index

Run Control

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

Top Functional Index

Parameter Manipulation

SpecTcl parameters have three properties:

  1. A name by which you refer to the parameter when constructing spectra.  A parameter name can be any number of characters, Tcl/TK quoting rules may be needed if spaces and special characters are included, however.
  2. An id which represents the offset number in the Event array at which the parameter will be stored by the unpacker.  Id's run from zero, there is no requirement for id's to be tightly packed, however.
  3. A resolution, which represents the number of bits of data present in each parameter.

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.

Top  Functional Index

Spectrum Manipulations

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.

Top  Functional Index

Gate Manipulations

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:

Command Purpose
apply Applies a gate to a spectrum.
gate Creates, lists or deletes a gate.
ungate Ungates a spectrum.
fold Folds gamma spectra.

Top  Functional Index

Saving and Restoring State

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

Top Functional Index

Filters

The filter command allows you to create and manipulate event filters.

TreeParameter and TreeVariable

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.

Top Functional Index

Formatted State Displays

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

Top Functional Index

Alphabetical Index of Commands

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

Top Functional Index

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