Files
sics/site_ansto/instrument/hrpd/nxscripts.tcl
Ferdi Franceschini 31f0fca6f5 Integrating the ansto hmm/hmc with hdf file writing.
r1342 | ffr | 2006-12-04 09:45:20 +1100 (Mon, 04 Dec 2006) | 2 lines
2012-11-15 12:54:46 +11:00

62 lines
1.8 KiB
Tcl

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 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.
# sicstime doesn't show UTC offset
# ISO 8601 suggests that time and date are separated with 'T' in a time field.
#nxscript createxml junk.xml echidna.dic
$nxobj updatedictvar entryName $entryname
$nxobj puttext etitle [title]
$nxobj puttext estart [sicstime]
$nxobj puttext eend [sicstime]
$nxobj puttext iname [instrument]
# NXsource
$nxobj puttext sname OPAL
$nxobj puttext stype Reactor Neutron Source
$nxobj puttext sprobe Neutron
# NXcrystal
$nxobj putfloat clambda 1.89
# NXmonitor
$nxobj puttext mmode timer
$nxobj putfloat mpreset 1000
$nxobj putint mdata 500
#NXsample
$nxobj puttext saname Air
$nxobj putfloat sarot $ompos
#array set tharr [list 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 ]
#nxscript putarray dtheta tharr 10
for {set i 0} {$i < $ndect} {incr i} { set tharr($i) [expr $i*$angsep] }
$nxobj updatedictvar thetadim $ndect
nxscript putarray dtheta tharr $ndect
$nxobj puttext dtype He-3 position sensitive detector, tube active length=335+/-5mm, tube diameter=25.4 +/- 0.8mm
$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 hmc
### TEST ###
# hmc initVal 1
### TEST ###
$nxobj puthm deff hmc
$nxobj makelink dana dcounts
$nxobj makelink dana dtheta
#nxscript close
}
proc addeff {} {
}
publish addnxentry user