MakeNXScript #nxscript createxml junk4.xml echidna.dic set dradius 1.25 set ndect 128 set tubedia 0.0254 set pi 3.1415926 set angsep [expr $tubedia/$dradius *(180/$pi)] 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 hm ### TEST ### hm initVal 1 ### TEST ### $nxobj puthm deff hm $nxobj makelink dana dcounts $nxobj makelink dana dtheta #nxscript close } proc addeff {} { } publish addnxentry user