TABLE OF CONTENTS
::pwtk::nebi::setImageCharges
SYNOPSIS
proc ::pwtk::nebi::setImageCharges {args} {
USAGE
setImageCharges charge1 ?charge2? ?charge3? ... or setImageCharges {charge1 charge2 ...}
PURPOSE
Assign TOTAL_CHARGE of charge1 to image-1, charge2 to image-2, etc.
REMARK
Assignment of charges is sequential, i.e.:
charge1 ---assigned to---> image1 charge2 ---assigned to---> image2 ...
SOURCE
set args [concat {*}$args] set nl [llength $args] set ni [getNImages] if { $nl > $ni } { ::pwtk::error "too many charges were specified; number of images in POSITIONS = $ni, number of specified charges = $nl" 1 } for {set i 1} {$i <= $nl} {incr i} { set charge [lindex $args $i-1] if { ! [string is double -strict $charge] } { ::pwtk::error "expected a floating-point number for total charge of image #.$i, but got $charge" 1 } ::pwtk::nebi::setImageCharge $i $charge } }