Added instrument specific initialisation function.
r2122 | ffr | 2007-08-16 16:31:37 +1000 (Thu, 16 Aug 2007) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
33af13cdd1
commit
307e29e60e
@@ -1,6 +1,8 @@
|
|||||||
set sim_mode [SplitReply [hmm_simulation]]
|
set sim_mode [SplitReply [hmm_simulation]]
|
||||||
if {$sim_mode == "true"} {
|
if {$sim_mode == "true"} {
|
||||||
MakeHM hmm SIM;
|
MakeHM hmm SIM;
|
||||||
|
hmm configure daq Stopped
|
||||||
|
hmm configure statuscheck false
|
||||||
namespace eval histogram_memory {
|
namespace eval histogram_memory {
|
||||||
proc hmc {_start _preset _mode _pause} {
|
proc hmc {_start _preset _mode _pause} {
|
||||||
bm mode $_mode;
|
bm mode $_mode;
|
||||||
@@ -14,8 +16,9 @@ if {$sim_mode == "true"} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
||||||
|
source $cfPath(hmm)/hmm_cylindrical_detector_configuration.tcl
|
||||||
if {$sim_mode == "true"} {
|
if {$sim_mode == "true"} {
|
||||||
proc ::histogram_memory::hmm_initialize {} {
|
proc ::histogram_memory::initialize {} {
|
||||||
hmm configure hmaddress http://das1-[SplitReply [instrument]]:8080;
|
hmm configure hmaddress http://das1-[SplitReply [instrument]]:8080;
|
||||||
hmm configure username spy;
|
hmm configure username spy;
|
||||||
hmm configure password 007;
|
hmm configure password 007;
|
||||||
@@ -34,7 +37,6 @@ if {$sim_mode == "true"} {
|
|||||||
# - Or, no configuration at all could be uploaded, the
|
# - Or, no configuration at all could be uploaded, the
|
||||||
# histogram server can configure itself using its default config files.
|
# histogram server can configure itself using its default config files.
|
||||||
proc ::histogram_memory::setmode {mode} {
|
proc ::histogram_memory::setmode {mode} {
|
||||||
global cfPath;
|
|
||||||
hmm_mode $mode;
|
hmm_mode $mode;
|
||||||
set sim_mode [SplitReply [hmm_simulation]];
|
set sim_mode [SplitReply [hmm_simulation]];
|
||||||
|
|
||||||
@@ -77,7 +79,43 @@ proc ::histogram_memory::setmode {mode} {
|
|||||||
_hmm_hor_axis_alias dtheta;
|
_hmm_hor_axis_alias dtheta;
|
||||||
_hmm_vert_axis y_pixel_offset;
|
_hmm_vert_axis y_pixel_offset;
|
||||||
_hmm_vert_axis_alias dvaxis;
|
_hmm_vert_axis_alias dvaxis;
|
||||||
hmm configure hmconfigscript "returnconfigfile $cfPath(hmm)/anstohm_full_small.xml";
|
::histogram_memory::configure_server Filler_defaults
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##\brief Return the detector position
|
||||||
|
proc ::histogram_memory::detector_posn_degrees {} {
|
||||||
|
return [SplitReply [stth]]
|
||||||
|
}
|
||||||
|
proc ::histogram_memory::initialize {} {
|
||||||
|
::histogram_memory::_initialize
|
||||||
|
::histogram_memory::two_theta -centres
|
||||||
|
|
||||||
|
detector_active_height_mm 200
|
||||||
|
detector_active_width_mm 500
|
||||||
|
detector_radius_mm 700.0
|
||||||
|
set x_bin0 991.5; set x_binmax -0.5
|
||||||
|
set y_bin0 0; set y_binmax 511.5
|
||||||
|
set x_binwidth 1
|
||||||
|
if {[expr {$x_binmax - $x_bin0}] > 0} {
|
||||||
|
set x_bin1 [expr {$x_bin0+$x_binwidth}]
|
||||||
|
} else {
|
||||||
|
set x_bin1 [expr {$x_bin0-$x_binwidth}]
|
||||||
|
}
|
||||||
|
set y_binwidth 1
|
||||||
|
if {[expr {$y_binmax - $y_bin0}] > 0} {
|
||||||
|
set y_bin1 [expr {$y_bin0+$y_binwidth}]
|
||||||
|
} else {
|
||||||
|
set y_bin1 [expr {$y_bin0-$y_binwidth}]
|
||||||
|
}
|
||||||
|
OAT_TABLE -init X_min $x_bin0 X_max $x_binmax Y_min $y_bin0 Y_max $y_binmax
|
||||||
|
# We default to one big bin for time
|
||||||
|
set t_bin0 [OAT_TABLE -get T_min]
|
||||||
|
set t_bin1 [OAT_TABLE -get T_max]
|
||||||
|
OAT_TABLE X "$x_bin0 $x_bin1" Y "$y_bin0 $y_bin1" T "$t_bin0 $t_bin1"
|
||||||
|
::histogram_memory::configure_server Filler_defaults
|
||||||
|
|
||||||
|
::nexus::data alias ::histogram_memory::vertical_axis ::histogram_memory::y_pixel_offset
|
||||||
|
::nexus::data alias ::histogram_memory::horizontal_axis ::histogram_memory::two_theta
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
set sim_mode [SplitReply [hmm_simulation]]
|
set sim_mode [SplitReply [hmm_simulation]]
|
||||||
if {$sim_mode == "true"} {
|
if {$sim_mode == "true"} {
|
||||||
MakeHM hmm SIM;
|
MakeHM hmm SIM;
|
||||||
|
hmm configure daq Stopped
|
||||||
|
hmm configure statuscheck false
|
||||||
namespace eval histogram_memory {
|
namespace eval histogram_memory {
|
||||||
proc hmc {_start _preset _mode _pause} {
|
proc hmc {_start _preset _mode _pause} {
|
||||||
bm mode $_mode;
|
bm mode $_mode;
|
||||||
@@ -14,8 +16,9 @@ if {$sim_mode == "true"} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
||||||
|
source $cfPath(hmm)/hmm_cylindrical_detector_configuration.tcl
|
||||||
if {$sim_mode == "true"} {
|
if {$sim_mode == "true"} {
|
||||||
proc ::histogram_memory::hmm_initialize {} {
|
proc ::histogram_memory::initialize {} {
|
||||||
hmm configure hmaddress http://das1-[SplitReply [instrument]]:8080;
|
hmm configure hmaddress http://das1-[SplitReply [instrument]]:8080;
|
||||||
hmm configure username spy;
|
hmm configure username spy;
|
||||||
hmm configure password 007;
|
hmm configure password 007;
|
||||||
@@ -34,7 +37,6 @@ if {$sim_mode == "true"} {
|
|||||||
# - Or, no configuration at all could be uploaded, the
|
# - Or, no configuration at all could be uploaded, the
|
||||||
# histogram server can configure itself using its default config files.
|
# histogram server can configure itself using its default config files.
|
||||||
proc ::histogram_memory::setmode {mode} {
|
proc ::histogram_memory::setmode {mode} {
|
||||||
global cfPath;
|
|
||||||
hmm_mode $mode;
|
hmm_mode $mode;
|
||||||
set sim_mode [SplitReply [hmm_simulation]];
|
set sim_mode [SplitReply [hmm_simulation]];
|
||||||
|
|
||||||
@@ -77,7 +79,43 @@ proc ::histogram_memory::setmode {mode} {
|
|||||||
_hmm_hor_axis_alias dtheta
|
_hmm_hor_axis_alias dtheta
|
||||||
_hmm_vert_axis vertical_channel_number
|
_hmm_vert_axis vertical_channel_number
|
||||||
_hmm_vert_axis_alias drowindex
|
_hmm_vert_axis_alias drowindex
|
||||||
hmm configure hmconfigscript "returnconfigfile $cfPath(hmm)/anstohm_full_folding.xml"
|
::histogram_memory::configure_server Filler_defaults
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##\brief Return the detector position
|
||||||
|
proc ::histogram_memory::detector_posn_degrees {} {
|
||||||
|
return [SplitReply [stth]]
|
||||||
|
}
|
||||||
|
proc ::histogram_memory::initialize {} {
|
||||||
|
::histogram_memory::_initialize
|
||||||
|
::histogram_memory::two_theta -centres
|
||||||
|
|
||||||
|
detector_active_height_mm 335
|
||||||
|
detector_active_width_mm 500
|
||||||
|
detector_radius_mm 1250.0
|
||||||
|
set x_bin0 63.5; set x_binmax -0.5
|
||||||
|
set y_bin0 -0.5; set y_binmax 1023.5
|
||||||
|
set x_binwidth 1
|
||||||
|
if {[expr {$x_binmax - $x_bin0}] > 0} {
|
||||||
|
set x_bin1 [expr {$x_bin0+$x_binwidth}]
|
||||||
|
} else {
|
||||||
|
set x_bin1 [expr {$x_bin0-$x_binwidth}]
|
||||||
|
}
|
||||||
|
set y_binwidth 1
|
||||||
|
if {[expr {$y_binmax - $y_bin0}] > 0} {
|
||||||
|
set y_bin1 [expr {$y_bin0+$y_binwidth}]
|
||||||
|
} else {
|
||||||
|
set y_bin1 [expr {$y_bin0-$y_binwidth}]
|
||||||
|
}
|
||||||
|
OAT_TABLE -init X_min $x_bin0 X_max $x_binmax Y_min $y_bin0 Y_max $y_binmax
|
||||||
|
# We default to one big bin for time
|
||||||
|
set t_bin0 [OAT_TABLE -get T_min]
|
||||||
|
set t_bin1 [OAT_TABLE -get T_max]
|
||||||
|
OAT_TABLE X "$x_bin0 $x_bin1" Y "$y_bin0 $y_bin1" T "$t_bin0 $t_bin1"
|
||||||
|
::histogram_memory::configure_server Filler_defaults
|
||||||
|
|
||||||
|
::nexus::data alias ::histogram_memory::vertical_axis ::histogram_memory::y_pixel_offset
|
||||||
|
::nexus::data alias ::histogram_memory::horizontal_axis ::histogram_memory::two_theta
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
set sim_mode [SplitReply [hmm_simulation]]
|
set sim_mode [SplitReply [hmm_simulation]]
|
||||||
if {$sim_mode == "true"} {
|
if {$sim_mode == "true"} {
|
||||||
MakeHM hmm SIM;
|
MakeHM hmm SIM;
|
||||||
|
hmm configure daq Stopped
|
||||||
|
hmm configure statuscheck false
|
||||||
namespace eval histogram_memory {
|
namespace eval histogram_memory {
|
||||||
proc hmc {_start _preset _mode _pause} {
|
proc hmc {_start _preset _mode _pause} {
|
||||||
bm mode $_mode;
|
bm mode $_mode;
|
||||||
@@ -15,7 +17,7 @@ if {$sim_mode == "true"} {
|
|||||||
|
|
||||||
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
||||||
if {$sim_mode == "true"} {
|
if {$sim_mode == "true"} {
|
||||||
proc ::histogram_memory::hmm_initialize {} {
|
proc ::histogram_memory::initialize {} {
|
||||||
hmm configure hmaddress http://das1-[SplitReply [instrument]]:8080;
|
hmm configure hmaddress http://das1-[SplitReply [instrument]]:8080;
|
||||||
hmm configure username spy;
|
hmm configure username spy;
|
||||||
hmm configure password 007;
|
hmm configure password 007;
|
||||||
@@ -76,9 +78,39 @@ proc ::histogram_memory::setmode {mode} {
|
|||||||
_hmm_hor_axis_alias dtheta
|
_hmm_hor_axis_alias dtheta
|
||||||
_hmm_vert_axis vertical_channel_number
|
_hmm_vert_axis vertical_channel_number
|
||||||
_hmm_vert_axis_alias drowindex
|
_hmm_vert_axis_alias drowindex
|
||||||
OAT_TABLE X {-210.5 -209.5} Y {-110.5 -109.5} T {0 20000} NTC 5
|
#OAT_TABLE X {-210.5 -208.5} Y {-110.5 -109.5} T {0 20000} NTC 2
|
||||||
::histogram_memory::configure_server Filler_defaults FASTCOMTEC
|
::histogram_memory::configure_server Filler_defaults
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc ::histogram_memory::initialize {} {
|
||||||
|
::histogram_memory::_initialize
|
||||||
|
|
||||||
|
detector_active_height_mm 257.5
|
||||||
|
detector_active_width_mm 500
|
||||||
|
|
||||||
|
set x_bin0 -210.5; set x_binmax 210.5
|
||||||
|
set y_bin0 -110.5; set y_binmax 110.5
|
||||||
|
set x_binwidth 1
|
||||||
|
if {[expr {$x_binmax - $x_bin0}] > 0} {
|
||||||
|
set x_bin1 [expr {$x_bin0+$x_binwidth}]
|
||||||
|
} else {
|
||||||
|
set x_bin1 [expr {$x_bin0-$x_binwidth}]
|
||||||
|
}
|
||||||
|
set y_binwidth 1
|
||||||
|
if {[expr {$y_binmax - $y_bin0}] > 0} {
|
||||||
|
set y_bin1 [expr {$y_bin0+$y_binwidth}]
|
||||||
|
} else {
|
||||||
|
set y_bin1 [expr {$y_bin0-$y_binwidth}]
|
||||||
|
}
|
||||||
|
OAT_TABLE -init X_min $x_bin0 X_max $x_binmax Y_min $y_bin0 Y_max $y_binmax
|
||||||
|
# We default to one big bin for time
|
||||||
|
set t_bin0 [OAT_TABLE -get T_min]
|
||||||
|
set t_bin1 [OAT_TABLE -get T_max]
|
||||||
|
OAT_TABLE X "$x_bin0 $x_bin1" Y "$y_bin0 $y_bin1" T "$t_bin0 $t_bin1"
|
||||||
|
::histogram_memory::configure_server Filler_defaults
|
||||||
|
|
||||||
|
::nexus::data alias ::histogram_memory::vertical_axis ::histogram_memory::y_pixel_offset
|
||||||
|
::nexus::data alias ::histogram_memory::horizontal_axis ::histogram_memory::x_pixel_offset
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
set sim_mode [SplitReply [hmm_simulation]]
|
set sim_mode [SplitReply [hmm_simulation]]
|
||||||
if {$sim_mode == "true"} {
|
if {$sim_mode == "true"} {
|
||||||
MakeHM hmm SIM;
|
MakeHM hmm SIM;
|
||||||
|
hmm configure daq Stopped
|
||||||
|
hmm configure statuscheck false
|
||||||
namespace eval histogram_memory {
|
namespace eval histogram_memory {
|
||||||
proc hmc {_start _preset _mode _pause} {
|
proc hmc {_start _preset _mode _pause} {
|
||||||
bm mode $_mode;
|
bm mode $_mode;
|
||||||
@@ -15,7 +17,7 @@ if {$sim_mode == "true"} {
|
|||||||
|
|
||||||
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
||||||
if {$sim_mode == "true"} {
|
if {$sim_mode == "true"} {
|
||||||
proc ::histogram_memory::hmm_initialize {} {
|
proc ::histogram_memory::initialize {} {
|
||||||
hmm configure hmaddress http://das1-[SplitReply [instrument]]:8080;
|
hmm configure hmaddress http://das1-[SplitReply [instrument]]:8080;
|
||||||
hmm configure username spy;
|
hmm configure username spy;
|
||||||
hmm configure password 007;
|
hmm configure password 007;
|
||||||
@@ -76,9 +78,38 @@ proc ::histogram_memory::setmode {mode} {
|
|||||||
_hmm_hor_axis_alias dtheta
|
_hmm_hor_axis_alias dtheta
|
||||||
_hmm_vert_axis vertical_channel_number
|
_hmm_vert_axis vertical_channel_number
|
||||||
_hmm_vert_axis_alias drowindex
|
_hmm_vert_axis_alias drowindex
|
||||||
OAT_TABLE X {-210.5 -209.5} Y {-110.5 -109.5} T {0 20000} NTC 5
|
::histogram_memory::configure_server Filler_defaults
|
||||||
::histogram_memory::configure_server Filler_defaults FASTCOMTEC
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc ::histogram_memory::initialize {} {
|
||||||
|
::histogram_memory::_initialize
|
||||||
|
|
||||||
|
detector_active_height_mm 500
|
||||||
|
detector_active_width_mm 500
|
||||||
|
|
||||||
|
set x_bin0 -210.5; set x_binmax 210.5
|
||||||
|
set y_bin0 -210.5; set y_binmax 210.5
|
||||||
|
set x_binwidth 1
|
||||||
|
if {[expr {$x_binmax - $x_bin0}] > 0} {
|
||||||
|
set x_bin1 [expr {$x_bin0+$x_binwidth}]
|
||||||
|
} else {
|
||||||
|
set x_bin1 [expr {$x_bin0-$x_binwidth}]
|
||||||
|
}
|
||||||
|
set y_binwidth 1
|
||||||
|
if {[expr {$y_binmax - $y_bin0}] > 0} {
|
||||||
|
set y_bin1 [expr {$y_bin0+$y_binwidth}]
|
||||||
|
} else {
|
||||||
|
set y_bin1 [expr {$y_bin0-$y_binwidth}]
|
||||||
|
}
|
||||||
|
OAT_TABLE -init X_min $x_bin0 X_max $x_binmax Y_min $y_bin0 Y_max $y_binmax
|
||||||
|
# We default to one big bin for time
|
||||||
|
set t_bin0 [OAT_TABLE -get T_min]
|
||||||
|
set t_bin1 [OAT_TABLE -get T_max]
|
||||||
|
OAT_TABLE X "$x_bin0 $x_bin1" Y "$y_bin0 $y_bin1" T "$t_bin0 $t_bin1"
|
||||||
|
::histogram_memory::configure_server Filler_defaults
|
||||||
|
|
||||||
|
::nexus::data alias ::histogram_memory::vertical_axis ::histogram_memory::y_pixel_offset
|
||||||
|
::nexus::data alias ::histogram_memory::horizontal_axis ::histogram_memory::x_pixel_offset
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
set sim_mode [SplitReply [hmm_simulation]]
|
set sim_mode [SplitReply [hmm_simulation]]
|
||||||
if {$sim_mode == "true"} {
|
if {$sim_mode == "true"} {
|
||||||
MakeHM hmm SIM;
|
MakeHM hmm SIM;
|
||||||
|
hmm configure daq Stopped
|
||||||
|
hmm configure statuscheck false
|
||||||
namespace eval histogram_memory {
|
namespace eval histogram_memory {
|
||||||
proc hmc {_start _preset _mode _pause} {
|
proc hmc {_start _preset _mode _pause} {
|
||||||
bm mode $_mode;
|
bm mode $_mode;
|
||||||
@@ -15,7 +17,7 @@ if {$sim_mode == "true"} {
|
|||||||
|
|
||||||
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
source $cfPath(hmm)/hmm_configuration_common_1.tcl
|
||||||
if {$sim_mode == "true"} {
|
if {$sim_mode == "true"} {
|
||||||
proc ::histogram_memory::hmm_initialize {} {
|
proc ::histogram_memory::initialize {} {
|
||||||
hmm configure hmaddress http://das1-[SplitReply [instrument]]:8080;
|
hmm configure hmaddress http://das1-[SplitReply [instrument]]:8080;
|
||||||
hmm configure username spy;
|
hmm configure username spy;
|
||||||
hmm configure password 007;
|
hmm configure password 007;
|
||||||
@@ -76,9 +78,38 @@ proc ::histogram_memory::setmode {mode} {
|
|||||||
_hmm_hor_axis_alias dtheta
|
_hmm_hor_axis_alias dtheta
|
||||||
_hmm_vert_axis vertical_channel_number
|
_hmm_vert_axis vertical_channel_number
|
||||||
_hmm_vert_axis_alias drowindex
|
_hmm_vert_axis_alias drowindex
|
||||||
OAT_TABLE X {-210.5 -209.5} Y {-110.5 -109.5} T {0 20000} NTC 5
|
::histogram_memory::configure_server Filler_defaults
|
||||||
::histogram_memory::configure_server Filler_defaults FASTCOMTEC
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc ::histogram_memory::initialize {} {
|
||||||
|
::histogram_memory::_initialize
|
||||||
|
|
||||||
|
detector_active_height_mm 500
|
||||||
|
detector_active_width_mm 500
|
||||||
|
|
||||||
|
set x_bin0 -0.5; set x_binmax 500.5
|
||||||
|
set y_bin0 -0.5; set y_binmax 500.5
|
||||||
|
set x_binwidth 1
|
||||||
|
if {[expr {$x_binmax - $x_bin0}] > 0} {
|
||||||
|
set x_bin1 [expr {$x_bin0+$x_binwidth}]
|
||||||
|
} else {
|
||||||
|
set x_bin1 [expr {$x_bin0-$x_binwidth}]
|
||||||
|
}
|
||||||
|
set y_binwidth 1
|
||||||
|
if {[expr {$y_binmax - $y_bin0}] > 0} {
|
||||||
|
set y_bin1 [expr {$y_bin0+$y_binwidth}]
|
||||||
|
} else {
|
||||||
|
set y_bin1 [expr {$y_bin0-$y_binwidth}]
|
||||||
|
}
|
||||||
|
OAT_TABLE -init X_min $x_bin0 X_max $x_binmax Y_min $y_bin0 Y_max $y_binmax
|
||||||
|
# We default to one big bin for time
|
||||||
|
set t_bin0 [OAT_TABLE -get T_min]
|
||||||
|
set t_bin1 [OAT_TABLE -get T_max]
|
||||||
|
OAT_TABLE X "$x_bin0 $x_bin1" Y "$y_bin0 $y_bin1" T "$t_bin0 $t_bin1"
|
||||||
|
::histogram_memory::configure_server Filler_defaults
|
||||||
|
|
||||||
|
::nexus::data alias ::histogram_memory::vertical_axis ::histogram_memory::y_pixel_offset
|
||||||
|
::nexus::data alias ::histogram_memory::horizontal_axis ::histogram_memory::x_pixel_offset
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user