Merging release 2.0 branch with CVS trunk
r2601 | ffr | 2008-05-30 10:26:57 +1000 (Fri, 30 May 2008) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
4a937e1608
commit
0749b0effa
File diff suppressed because it is too large
Load Diff
@@ -9,33 +9,36 @@ namespace eval histogram_memory {
|
||||
# requires detector_active_width_mm det_radius_mm deg_per_rad
|
||||
proc two_theta {args} {
|
||||
variable state
|
||||
set opt [lindex $args 0]
|
||||
set arglist [lrange $args 1 end]
|
||||
set proc_name [namespace origin [lindex [info level 0] 0]]
|
||||
set det_width_mm [SplitReply [detector_active_width_mm]]
|
||||
set det_radius_mm [SplitReply [detector_radius_mm]]
|
||||
set deg_per_radian [SplitReply [deg_per_rad]]
|
||||
switch -- $opt {
|
||||
"-centres" - "-boundaries" - "-graph_type" {
|
||||
return [calc_axis $proc_name @none @none @none $opt $args]
|
||||
}
|
||||
"-arrayname" {
|
||||
set max_b [OAT_TABLE -get X_MAX]
|
||||
set min_b [OAT_TABLE -get X_MIN]
|
||||
set scale_factor [expr {$deg_per_radian*($det_width_mm/$det_radius_mm) / ($max_b - $min_b)}]
|
||||
set offset [::histogram_memory::detector_posn_degrees]
|
||||
return [calc_axis $proc_name $scale_factor $offset [OAT_TABLE -get X_boundaries] $opt $arglist]
|
||||
}
|
||||
"-units" {
|
||||
return "degrees"
|
||||
}
|
||||
default {
|
||||
set max_b [OAT_TABLE -get X_MAX]
|
||||
set min_b [OAT_TABLE -get X_MIN]
|
||||
set scale_factor [expr {$deg_per_radian*($det_width_mm/$det_radius_mm) / ($max_b - $min_b)}]
|
||||
set offset [::histogram_memory::detector_posn_degrees]
|
||||
return [calc_axis $proc_name $scale_factor $offset [OAT_TABLE -get X_boundaries] $args]
|
||||
if [ catch {
|
||||
set opt [lindex $args 0]
|
||||
set arglist [lrange $args 1 end]
|
||||
set proc_name [namespace origin [lindex [info level 0] 0]]
|
||||
set det_width_mm [SplitReply [detector_active_width_mm]]
|
||||
set det_radius_mm [SplitReply [detector_radius_mm]]
|
||||
set deg_per_radian [SplitReply [deg_per_rad]]
|
||||
switch -- $opt {
|
||||
"-centres" - "-boundaries" - "-graph_type" {
|
||||
return [::histogram_memory::calc_axis $proc_name @none @none @none $opt $args]
|
||||
}
|
||||
"-arrayname" {
|
||||
set max_chan [OAT_TABLE X -getdata MAX_CHAN]
|
||||
set scale_factor [expr {$deg_per_radian*($det_width_mm/$det_radius_mm) / $max_chan}]
|
||||
set offset [::histogram_memory::detector_posn_degrees]
|
||||
return [::histogram_memory::calc_axis $proc_name $scale_factor $offset [OAT_TABLE X -getdata BOUNDARIES] $opt $arglist]
|
||||
}
|
||||
"-units" {
|
||||
return "degrees"
|
||||
}
|
||||
default {
|
||||
set max_chan [OAT_TABLE X -getdata MAX_CHAN]
|
||||
set scale_factor [expr {$deg_per_radian*($det_width_mm/$det_radius_mm) / $max_chan}]
|
||||
set offset [::histogram_memory::detector_posn_degrees]
|
||||
return [::histogram_memory::calc_axis $proc_name $scale_factor $offset [OAT_TABLE X -getdata BOUNDARIES] $args]
|
||||
}
|
||||
}
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
}
|
||||
}
|
||||
set script_name ::histogram_memory::two_theta
|
||||
|
||||
Reference in New Issue
Block a user