Integrating the ansto hmm/hmc with hdf file writing.

r1342 | ffr | 2006-12-04 09:45:20 +1100 (Mon, 04 Dec 2006) | 2 lines
This commit is contained in:
Ferdi Franceschini
2006-12-04 09:45:20 +11:00
committed by Douglas Clowes
parent 4f3413abc6
commit 31f0fca6f5
6 changed files with 62 additions and 41 deletions

View File

@@ -1,9 +1,14 @@
echidna_configuration.tcl
motor_configuration.tcl
counter.tcl
hmm_configuration.tcl
scan.tcl
nxscripts.tcl
echidna.hdd
echidna.dic
troubleshoot_setup.tcl
hipadaba_configuration.tcl
hpaths.tcl
sim_configuration.tcl
extraconfig.tcl
InstXML.xml
extraconfig.tcl
sim_configuration.tcl

View File

@@ -1,5 +1,5 @@
# $Revision: 1.7 $
# $Date: 2006-11-29 21:28:47 $
# $Revision: 1.8 $
# $Date: 2006-12-03 22:45:20 $
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
# Last revision by: $Author: ffr $
@@ -23,11 +23,14 @@ Instrument lock
fileeval motor_configuration.tcl
proc nxcreatefile {{type hdf}} {
proc nxcreatefile {{type nx5}} {
global dataFileName;
SicsDataPostFix .$type;
array set nxmode [list hdf create5 nx5 create5 xml createxml];
nxscript $nxmode($type) [nxscript makefilename] echidna.dic;
array set nxmode [list h5 create5 nx5 create5 xml createxml];
set dataFileName [nxscript makefilename]
nxscript $nxmode($type) $dataFileName echidna.dic;
nxscript close;
}
publish nxcreatefile user
@@ -35,7 +38,7 @@ publish nxcreatefile user
########
source gen_hipadaba.tcl
source counter.tcl
source histogram.tcl
source scan.tcl
source nxscripts.tcl
fileeval hmm_configuration.tcl
fileeval scan.tcl
fileeval nxscripts.tcl
fileeval extraconfig.tcl

View File

@@ -5,7 +5,7 @@ mom fixed 1
mtth fixed 1
mchi fixed 1
mphi fixed 1
mz fixed 1
my fixed 1
mx fixed 1
stth fixed 1

View File

@@ -1,17 +1,17 @@
MakeHM hm anstohmsim
#MakeHM hm sim
MakeHM hmc anstohmsim
#MakeHM hmc sim
set dim0 512
set dim1 128
hm configure HistMode Normal
hm configure OverFlowMode Ceil
hm configure dim0 $dim0
hm configure dim1 $dim1
hm configure rank 2
hm configure BinWidth 4
#hm configure BinWidth 1
hm preset 100.
hm CountMode Timer
hm configure Counter counter
hm configure init 1
hm init
hmc configure HistMode Normal
hmc configure OverFlowMode Ceil
hmc configure dim0 $dim0
hmc configure dim1 $dim1
hmc configure rank 2
hmc configure BinWidth 4
#hmc configure BinWidth 1
hmc preset 100.
hmc CountMode Timer
hmc configure Counter counter
hmc configure init 1
hmc init

View File

@@ -1,12 +1,17 @@
MakeNXScript
#nxscript createxml junk4.xml echidna.dic
proc nxreopenfile {} {
global dataFileName;
nxscript reopen $dataFileName echidna.dic;
}
set dradius 1.25
set ndect 128
set tubedia 0.0254
set pi 3.1415926
set angsep [expr $tubedia/$dradius *(180/$pi)]
#set angsep [expr $tubedia/$dradius *(180/$pi)]
set angsep 1.25
proc addnxentry {nxobj entryname ompos } {
global dradius ndect angsep;
# file_time shows +10 for UTC offset, should be +11 for local summer in NSW.
@@ -41,11 +46,11 @@ $nxobj puttext dtype He-3 position sensitive detector, tube active length=335+/-
$nxobj puttext ddesc 128 He-3 proportional counter detector tubes (GE Energy Reuter Stokes Inc. item=RS-P4-0814-217)
$nxobj putfloat dradius $dradius
$nxobj puttext dlayout area
$nxobj puthm dcounts hm
$nxobj puthm dcounts hmc
### TEST ###
hm initVal 1
# hmc initVal 1
### TEST ###
$nxobj puthm deff hm
$nxobj puthm deff hmc
$nxobj makelink dana dcounts
$nxobj makelink dana dtheta
#nxscript close

View File

@@ -1,15 +1,21 @@
MakeScanCommand escan counter echidna.hdd recover.bin
#MakeScanCommand escan counter echidna.hdd recover.bin
proc scan_prepare {sobj uobj} {
global omstart omstep;
stdscan prepare $sobj $uobj;
nxcreatefile
# stdscan prepare $sobj $uobj;
set vlist [split [$sobj getvarpar 0] = ];
set omstart [lindex $vlist 1];
set omstep [lindex $vlist 2];
clientput [$sobj getvarpar 0] value;
hs_prepare $sobj $uobj
# clientput [$sobj getvarpar 0] value;
# nxscript create5 junk5.nx5 echidna.dic;
}
proc scan_finish {sobj uobj} {
nxscript close
}
#proc scan_finish {sobj uobj} {
# nxscript close;
#}
@@ -18,23 +24,25 @@ proc scan_prepare {sobj uobj} {
proc nxaddpoint {sobj uobj pt} {
global omstart omstep;
set ompos [expr $omstart + $pt * $omstep];
nxreopenfile;
addnxentry nxscript scan_$pt $ompos;
nxscript close
}
proc donothing {args} {}
proc ecount {sobj uobj pt mode preset} {
hm count;
}
#proc ecount {sobj uobj pt mode preset} {
# hmc count;
#}
publish scan_prepare user
publish scan_finish user
publish nxaddpoint user
publish ecount user
#publish ecount user
publish donothing user
escan configure script
escan function writeheader donothing
escan function writepoint nxaddpoint
escan function prepare scan_prepare
escan function count ecount
#scan2 configure script
scan2 function writeheader donothing
scan2 function writepoint nxaddpoint
#scan2 function prepare scan_prepare
#scan2 function count ecount