- Test for TRICS
- Implemented testoll which can log a SICS session and create a test from it
This commit is contained in:
@ -8,6 +8,7 @@ puts stdout "Testing Four Circle Codes"
|
||||
|
||||
set testub ".1215666 -.138694 -.0021278 -.1386887 -.1216454 .0010515 -.0049867 .0020612 -.081156"
|
||||
set testcell "5.4202 5.4202 12.3228 90. 90. 90."
|
||||
singlex mode bi
|
||||
#---------------------------------------------------------------
|
||||
proc testReflection {ref} {
|
||||
drive h [lindex $ref 0] k [lindex $ref 1] l [lindex $ref 2]
|
||||
@ -113,3 +114,69 @@ test singlex-1.8 {Cell from UB} -body {
|
||||
return OK
|
||||
} -result OK
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# more tests for NB mode
|
||||
#-------------------------------------------------------------
|
||||
config rights Mugger Mugger
|
||||
singlex mode nb
|
||||
config rights User User
|
||||
|
||||
singlex ub 0.0228379 0.0773564 0.0476423 -0.1007840 0.0437923 0.0051331 -0.0213284 -0.0568516 0.0940093
|
||||
singlex cell 9.663 9.663 9.663 81.496 81.496 81.496
|
||||
ref clear
|
||||
ref addax 1 -2 -1 17.889732 -123.9175 -0.1104
|
||||
ref addax 1 1 1 10.621792 -14.005692 0.804147
|
||||
ref addax -1 2 1 17.8897 56.069 -.154
|
||||
|
||||
proc testNBReflection {ref} {
|
||||
drive h [lindex $ref 0] k [lindex $ref 1] l [lindex $ref 2]
|
||||
set stt [SICSValue a4]
|
||||
compareValue $stt [lindex $ref 3]
|
||||
set om [SICSValue a3]
|
||||
compareValue $om [lindex $ref 4]
|
||||
set nu [SICSValue nu]
|
||||
compareValue $nu [lindex $ref 5]
|
||||
}
|
||||
#--------------------------------------------------------------
|
||||
proc testNBAng {ref} {
|
||||
set stt [SICSValue a4]
|
||||
compareValue $stt [lindex $ref 0]
|
||||
set om [SICSValue a3]
|
||||
compareValue $om [lindex $ref 1]
|
||||
set nu [SICSValue nu]
|
||||
compareValue $nu [lindex $ref 2]
|
||||
}
|
||||
|
||||
test singlex-1.9 {Driving NB Reflection} -body {
|
||||
set ref [list 1 -2 -1 17.889 -123.9175 -0.1104]
|
||||
testNBReflection $ref
|
||||
return OK
|
||||
} -result OK
|
||||
|
||||
|
||||
test singlex-1.10 {Driving NB- Reflection though hkl} -body {
|
||||
hkl drive 1 -2 -1
|
||||
set ref [list 17.889 -123.9175 -0.1104]
|
||||
testNBAng $ref
|
||||
return OK
|
||||
} -result OK
|
||||
|
||||
test singlex-1.6 {UB Calculation,NB, 2 Reflections, Cell} -body {
|
||||
ubcalc ub2ref 0000 0001
|
||||
ubcalc activate
|
||||
set ubr [SICSValue "singlex ub"]
|
||||
compareMultiValue $ubr $testub
|
||||
return OK
|
||||
} -result OK
|
||||
|
||||
test singlex-1.7 {UB Calculation,NB, 3 Reflections} -body {
|
||||
ubcalc ub3ref 0000 0001 0002
|
||||
ubcalc activate
|
||||
set ubr [SICSValue "singlex ub"]
|
||||
compareMultiValue $ubr $testub
|
||||
return OK
|
||||
} -result OK
|
||||
|
||||
config rights Mugger Mugger
|
||||
singlex mode bi
|
||||
config rights User User
|
||||
|
Reference in New Issue
Block a user