Now saves all motor positions except for pc1 and pc2

r1359 | ffr | 2006-12-08 14:58:08 +1100 (Fri, 08 Dec 2006) | 2 lines
This commit is contained in:
Ferdi Franceschini
2006-12-08 14:58:08 +11:00
committed by Douglas Clowes
parent 9393a0b3e1
commit f815347e72
2 changed files with 57 additions and 7 deletions

View File

@@ -15,6 +15,7 @@ detector=hrdetector
monochromator=monochromator monochromator=monochromator
thetadim=128 thetadim=128
scan_variable=scanvar scan_variable=scanvar
samplemotor=samplemotor
#---------- NXentry level #---------- NXentry level
etitle=/$(entryName),NXentry/SDS title -type NX_CHAR etitle=/$(entryName),NXentry/SDS title -type NX_CHAR
estart=/$(entryName),NXentry/SDS start_time -type NX_CHAR estart=/$(entryName),NXentry/SDS start_time -type NX_CHAR
@@ -56,11 +57,40 @@ dtype=/$(entryName),NXentry/$(inst),NXinstrument/$(detector),NXdetector/SDS typ
dlayout=/$(entryName),NXentry/$(inst),NXinstrument/$(detector),NXdetector/SDS layout -type NX_CHAR dlayout=/$(entryName),NXentry/$(inst),NXinstrument/$(detector),NXdetector/SDS layout -type NX_CHAR
#--------------- NXmonochromator #--------------- NXmonochromator
mom=/$(entryName),NXentry/$(inst),NXinstrument/$(monochromator),NXmonochromator/mom,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,mom}
mchi=/$(entryName),NXentry/$(inst),NXinstrument/$(monochromator),NXmonochromator/mchi,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,mchi}
mphi=/$(entryName),NXentry/$(inst),NXinstrument/$(monochromator),NXmonochromator/mphi,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,mphi}
mx=/$(entryName),NXentry/$(inst),NXinstrument/$(monochromator),NXmonochromator/mx,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,mx}
my=/$(entryName),NXentry/$(inst),NXinstrument/$(monochromator),NXmonochromator/my,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,my}
mtth=/$(entryName),NXentry/$(inst),NXinstrument/$(monochromator),NXmonochromator/mtth,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,mtth} mtth=/$(entryName),NXentry/$(inst),NXinstrument/$(monochromator),NXmonochromator/mtth,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,mtth}
mth=/$(entryName),NXentry/$(inst),NXinstrument/$(monochromator),NXmonochromator/mth,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,mth}
#--------------- NXsample #--------------- NXsample
saname=/$(entryName),NXentry/sample,NXsample/SDS name -type NX_CHAR saname=/$(entryName),NXentry/sample,NXsample/SDS name -type NX_CHAR
sarot=/$(entryName),NXentry/sample,NXsample/SDS rotation_angle -type NX_FLOAT32 -attr {units,degree} sarot=/$(entryName),NXentry/sample,NXsample/SDS rotation_angle -type NX_FLOAT32 -attr {units,degree}
som=/$(entryName),NXentry/sample,NXsample/som,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,som}
schi=/$(entryName),NXentry/sample,NXsample/schi,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,schi}
sphi=/$(entryName),NXentry/sample,NXsample/sphi,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,sphi}
sx=/$(entryName),NXentry/sample,NXsample/sx,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,sx}
sy=/$(entryName),NXentry/sample,NXsample/sy,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,sy}
stth=/$(entryName),NXentry/sample,NXsample/stth,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,stth} stth=/$(entryName),NXentry/sample,NXsample/stth,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,stth}
sth=/$(entryName),NXentry/sample,NXsample/sth,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,sth}
# Slit motors
ss1u=/$(entryName),NXentry/sample,NXsample/ss1u,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss1u}
ss1d=/$(entryName),NXentry/sample,NXsample/ss1d,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss1d}
ss1l=/$(entryName),NXentry/sample,NXsample/ss1l,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss1l}
ss1r=/$(entryName),NXentry/sample,NXsample/ss1r,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss1r}
ss1vg=/$(entryName),NXentry/sample,NXsample/ss1vg,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss1vg}
ss1vo=/$(entryName),NXentry/sample,NXsample/ss1vo,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss1vo}
ss1hg=/$(entryName),NXentry/sample,NXsample/ss1hg,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss1hg}
ss1ho=/$(entryName),NXentry/sample,NXsample/ss1ho,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss1ho}
ss2u=/$(entryName),NXentry/sample,NXsample/ss2u,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss2u}
ss2d=/$(entryName),NXentry/sample,NXsample/ss2d,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss2d}
ss2l=/$(entryName),NXentry/sample,NXsample/ss2l,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss2l}
ss2r=/$(entryName),NXentry/sample,NXsample/ss2r,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss2r}
ss2vg=/$(entryName),NXentry/sample,NXsample/ss2vg,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss2vg}
ss2vo=/$(entryName),NXentry/sample,NXsample/ss2vo,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss2vo}
ss2hg=/$(entryName),NXentry/sample,NXsample/ss2hg,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss2hg}
ss2ho=/$(entryName),NXentry/sample,NXsample/ss2ho,NXpositioner/SDS value -type NX_FLOAT32 -attr {units,degree} -attr {long_name,ss2ho}
#----------------NXdata ------------------------------------------------ #----------------NXdata ------------------------------------------------
scandata=/$(entryName),NXentry/scan_data,NXdata/NXVGROUP scandata=/$(entryName),NXentry/scan_data,NXdata/NXVGROUP
scanvar=/$(entryName),NXentry/scan_variable,NXdata/NXVGROUP scanvar=/$(entryName),NXentry/scan_variable,NXdata/NXVGROUP

View File

@@ -15,15 +15,14 @@ set pi 3.1415926
#set angsep [expr $tubedia/$dradius *(180/$pi)] #set angsep [expr $tubedia/$dradius *(180/$pi)]
set angsep 1.25 set angsep 1.25
# stthmin = (180 - (1.25*127))/2 # stthmin = (180 - (1.25*127))/2
set stthmin 10.625
proc addnxentry {nxobj entryname scanVariable scanVarPos } { proc addnxentry {nxobj entryname scanVariable scanVarPos } {
global dradius ndect angsep stthmin; global dradius ndect angsep;
putcommon $nxobj $entryname $scanVariable putcommon $nxobj $entryname $scanVariable
putcrystal $nxobj putcrystal $nxobj
putmonitor $nxobj putmonitor $nxobj
putsample $nxobj putsample $nxobj
set mtth_val [string trim [lindex [split [mtth] =] 1]] set scanVar_value [string trim [lindex [split [$scanVariable] =] 1]]
$nxobj putfloat $scanVariable $mtth_val $nxobj putfloat $scanVariable $scanVar_value
# Add thetamin and stth to tharr(i) # Add thetamin and stth to tharr(i)
set sampletwotheta [string trim [lindex [split [stth] =] 1]] set sampletwotheta [string trim [lindex [split [stth] =] 1]]
for {set i 0} {$i < $ndect} {incr i} { for {set i 0} {$i < $ndect} {incr i} {
@@ -44,13 +43,13 @@ putsample $nxobj
} }
proc bm_addnxentry {nxobj entryname scanVariable scanVarPos } { proc bm_addnxentry {nxobj entryname scanVariable scanVarPos } {
global dradius ndect angsep stthmin; global dradius ndect angsep;
putcommon $nxobj $entryname $scanVariable putcommon $nxobj $entryname $scanVariable
putcrystal $nxobj putcrystal $nxobj
putmonitor $nxobj putmonitor $nxobj
putsample $nxobj putsample $nxobj
set mtth_val [string trim [lindex [split [mtth] =] 1]] set scanVar_value [string trim [lindex [split [$scanVariable] =] 1]]
$nxobj putfloat $scanVariable $mtth_val $nxobj putfloat $scanVariable $scanVar_value
# Add thetamin and stth to tharr(i) # Add thetamin and stth to tharr(i)
# $nxobj puttext dtype He-3 position sensitive detector, tube active length=335+/-5mm, tube diameter=25.4 +/- 0.8mm # $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 puttext ddesc 128 He-3 proportional counter detector tubes (GE Energy Reuter Stokes Inc. item=RS-P4-0814-217)
@@ -86,6 +85,27 @@ proc putcommon {nxobj entryName scanVariable} {
$nxobj puttext sname OPAL $nxobj puttext sname OPAL
$nxobj puttext stype Reactor Neutron Source $nxobj puttext stype Reactor Neutron Source
$nxobj puttext sprobe Neutron $nxobj puttext sprobe Neutron
putsamplemotors $nxobj
putslitmotors $nxobj
putmonomotors $nxobj
}
proc putsamplemotors {nxobj} {
foreach motor { som schi sphi sx sy stth sth } {
$nxobj putfloat $motor [getVal [$motor] ];
}
}
proc putmonomotors {nxobj} {
foreach motor { mom mchi mphi mx my mtth mth } {
$nxobj putfloat $motor [getVal [$motor] ];
}
}
proc putslitmotors {nxobj} {
foreach motor {ss1u ss1d ss1l ss1r ss1vg ss1vo ss1hg ss1ho ss2u ss2d ss2l ss2r ss2vg ss2vo ss2hg ss2ho } {
$nxobj putfloat $motor [getVal [$motor] ];
}
} }
publish addnxentry user publish addnxentry user
publish bm_addnxentry user publish bm_addnxentry user