nscl_logo_small.gif (2463 bytes)

channel command

HH00706_.jpg (6530 bytes)

Syntax

channel -get spname indices
channel -set spname indices value

Synopsis

Allows you to set or get the values of channels in a spectrum.

Detailed Description

This commands allow you to retrieve and or modify the values of a spectrum channel. The -get qualifier fetches the values of a channel, while the -set qualifier sets the value  of a channel.  In the syntax above:

The result, on success, is the value of the channel prior to the command.

Examples

Simple get/set:

channel -get OnedSpectrum 128

Returns the value of the 128'th channel in OnedSpectrum.

channel -set TwodSpectrum {123 456} 100

Sets channel (123,456) of TwodSpectrum to 100.

Looping on channels:

for {set i 0 } { $i < 128 } {incr i } {
   for {set j 0} {$j < 128 } {incr j } [
      channel -set TwodSpectrum "$i $j" 0
]}

Clears the bottom 128x128 block of channels in TwodSpectrum.  Note that {$i $j} will not work because the substitutions are inhibited within {}'s.

Top


Last Modified: October 28, 2003 by: fox@nscl.msu.edu
© Copyright NSCL 1999, All rights reserved