SICS-788: Some divisions in Tcl macros will be truncated if the values are integers.

An integer division was caused here by the fix to SICS-785
This commit is contained in:
Ferdi Franceschini
2014-10-08 19:56:59 +11:00
parent 3b35308bf2
commit 3a475196a0

View File

@ -390,7 +390,7 @@ namespace eval histogram_memory {
if [ catch {
set det_height_mm [SplitReply [detector_active_height_mm]]
set max_chan [OAT_TABLE Y -getdata MAX_CHAN]
set scale_factor [expr {$det_height_mm / $max_chan}]
set scale_factor [expr {1.0 * $det_height_mm / $max_chan}]
set offset 0.0
::histogram_memory::calc_axis "y_pixel_offset" $scale_factor $offset [OAT_TABLE Y -getdata BOUNDARIES]
if {$args == "-get_data_ref"} {
@ -426,7 +426,7 @@ namespace eval histogram_memory {
if [ catch {
set det_width_mm [SplitReply [detector_active_width_mm]]
set max_chan [OAT_TABLE X -getdata MAX_CHAN]
set scale_factor [expr {$det_width_mm / $max_chan}]
set scale_factor [expr {1.0 * $det_width_mm / $max_chan}]
set offset 0.0
::histogram_memory::calc_axis "x_pixel_offset" $scale_factor $offset [OAT_TABLE X -getdata BOUNDARIES]
if {$args == "-get_data_ref"} {