Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/bugfix/9484_mask_file_command_no…
Browse files Browse the repository at this point in the history
…t_working_in_batch_mode'
  • Loading branch information
Anders-Markvardsen committed May 21, 2014
2 parents 8d806a6 + c52257d commit d3682a6
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 0 deletions.
60 changes: 60 additions & 0 deletions Data/SANS2D/MaskSANS2DReductionGUI_MaskFiles.txt
@@ -0,0 +1,60 @@
PRINT for changer
MASK/CLEAR
MASK/CLEAR/TIME
L/WAV 1.5 12.5 0.125/LIN

L/Q .001,.001,.0126,-.08,.2
!L/Q .001 .8 .08/log
L/QXY 0 0.05 .001/lin
BACK/M1 35000 65000
BACK/M2 85000 98000
DET/REAR
GRAVITY/ON
!FIT/TRANS/OFF
FIT/TRANS/LOG 1.5 12.5
mask/rear h0
mask/rear h190>h191
mask/rear h167>h172
mask/rear v0
mask/rear v191
mask/front h0
mask/front h190>h191
mask/front v0
mask/front v191
! dead wire near top
mask/front h156>h159
!masking off beamstop arm - 12mm wide @ 19degrees
!mask/rear/line 12 19
! spot on rhs beam stop at 11m
! mask h57>h66+v134>v141
!
! mask for Bragg at 12m, 26/03/11, 3 time channels
mask/time 17500 22000
!
L/R 41 -1 3
!L/Q/RCut 200
!L/Q/WCut 8.0
!PRINT REMOVED RCut=200 WCut=8
!
MON/DIRECT=DIRECTM1_15785_12m_31Oct12_v12.dat
MON/TRANS/SPECTRUM=1/INTERPOLATE
MON/SPECTRUM=1/INTERPOLATE
TRANS/TRANSPEC=3
!TRANS/TRANSPEC=4/SHIFT=-70
!
set centre 155.45 -169.6 5.1 5.1
!
! 25/10/13 centre gc 22021, fit gdw20 22023
set scales 0.074 1.0 1.0 1.0 1.0
! correction to actual sample position, notionally 81mm before shutter
SAMPLE/OFFSET +53.0
! Correction to SANS2D encoders in mm
DET/CORR REAR X -16.0
DET/CORR REAR Z 47.0
DET/CORR FRONT X -44.0
DET/CORR FRONT Y -20.0
DET/CORR FRONT Z 47.0
DET/CORR FRONT ROT 0.0
!
!! 01/10/13 MASKSANS2d_133F M3 by M1 trans Hellsing, Rennie, Jackson, L1=L2=12m A1=20 and A2=8mm
MASKFILE=target_circles_mask.xml, linked_circles_mask.xml
2 changes: 2 additions & 0 deletions Data/SANS2D/SANS2D_mask_batch.csv
@@ -0,0 +1,2 @@
sample_sans,22048,output_as,iteration_1
sample_sans,22048,output_as,iteration_2
6 changes: 6 additions & 0 deletions Data/SANS2D/linked_circles_mask.xml
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<detector-masking>
<group>
<detids>1118097-1118104,1119093-1119107,1120091-1120110,1121090-1121111,1122088-1122094,1122106-1122113,1123087-1123092,1123109-1123114,1124086-1124090,1124110-1124115,1125085-1125089,1125112-1125116,1126084-1126088,1126113-1126117,1127083-1127087,1127114-1127117,1128083-1128086,1128115-1128118,1129082-1129085,1129115-1129118,1130082-1130085,1130116-1130119,1131081-1131084,1131117-1131119,1132081-1132084,1132117-1132120,1133081-1133083,1133117-1133120,1134081-1134083,1134118-1134120,1135080-1135083,1135118-1135120,1136080-1136083,1136118-1136121,1137080-1137083,1137118-1137121,1138080-1138083,1138089-1138093,1138110-1138113,1138118-1138121,1139080-1139083,1139085-1139097,1139105-1139121,1140080-1140100,1140103-1140121,1141080-1141122,1142079-1142086,1142096-1142107,1142117-1142124,1143078-1143083,1143099-1143104,1143117-1143125,1144077-1144084,1144097-1144105,1144117-1144126,1145076-1145084,1145097-1145106,1145117-1145119,1145123-1145127,1146075-1146079,1146082-1146085,1146096-1146099,1146103-1146107,1146116-1146119,1146124-1146128,1147074-1147078,1147082-1147085,1147095-1147098,1147104-1147108,1147116-1147119,1147125-1147128,1148073-1148077,1148083-1148086,1148094-1148098,1148105-1148108,1148115-1148118,1148126-1148129,1149073-1149076,1149083-1149087,1149094-1149097,1149106-1149109,1149114-1149117,1149127-1149130,1150072-1150075,1150084-1150088,1150093-1150096,1150107-1150110,1150113-1150117,1150127-1150130,1151072-1151075,1151085-1151089,1151093-1151096,1151107-1151110,1151112-1151116,1151128-1151130,1152072-1152074,1152086-1152090,1152093-1152095,1152108-1152115,1152128-1152131,1153071-1153074,1153087-1153095,1153108-1153114,1153128-1153131,1154071-1154074,1154088-1154095,1154107-1154113,1154129-1154131,1155071-1155073,1155089-1155111,1155129-1155132,1156071-1156073,1156091-1156111,1156129-1156132,1157071-1157073,1157092-1157111,1157129-1157132,1158071-1158073,1158092-1158094,1158096-1158104,1158109-1158111,1158129-1158132,1159071-1159073,1159092-1159094,1159109-1159111,1159129-1159132,1160071-1160073,1160092-1160094,1160109-1160111,1160129-1160132,1161071-1161074,1161092-1161094,1161108-1161111,1161129-1161132,1162071-1162074,1162092-1162095,1162108-1162111,1162129-1162131,1163071-1163074,1163092-1163095,1163108-1163111,1163129-1163131,1164072-1164074,1164093-1164095,1164108-1164110,1164128-1164131,1165072-1165075,1165093-1165096,1165107-1165110,1165128-1165131,1166072-1166075,1166093-1166096,1166107-1166109,1166127-1166130,1167073-1167076,1167094-1167097,1167106-1167109,1167127-1167130,1168074-1168077,1168094-1168097,1168105-1168108,1168126-1168129,1169074-1169078,1169095-1169098,1169104-1169108,1169125-1169129,1170075-1170079,1170096-1170099,1170103-1170107,1170124-1170128,1171076-1171080,1171096-1171100,1171102-1171106,1171123-1171127,1172077-1172081,1172097-1172105,1172122-1172126,1173078-1173083,1173098-1173104,1173120-1173125,1174079-1174086,1174096-1174106,1174118-1174124,1175081-1175123,1176082-1176099,1176103-1176121,1177085-1177097,1177105-1177119,1178091,1178108-1178115</detids>
</group>
</detector-masking>
6 changes: 6 additions & 0 deletions Data/SANS2D/target_circles_mask.xml
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<detector-masking>
<group>
<detids>1027120-1027129,1028115-1028134,1029113-1029137,1030110-1030139,1031108-1031117,1031133-1031141,1032107-1032113,1032136-1032143,1033105-1033111,1033138-1033144,1034104-1034109,1034120-1034129,1034140-1034145,1035103-1035107,1035116-1035133,1035142-1035147,1036102-1036106,1036114-1036135,1036143-1036148,1037100-1037105,1037112-1037137,1037145-1037149,1038100-1038103,1038110-1038117,1038132-1038139,1038146-1038150,1039099-1039102,1039109-1039115,1039135-1039141,1039147-1039151,1040098-1040101,1040107-1040113,1040137-1040142,1040148-1040151,1041097-1041101,1041106-1041111,1041138-1041143,1041149-1041152,1042096-1042100,1042105-1042109,1042140-1042144,1042150-1042153,1043096-1043099,1043104-1043108,1043141-1043145,1043150-1043154,1044095-1044098,1044103-1044107,1044142-1044146,1044151-1044154,1045095-1045098,1045103-1045106,1045143-1045147,1045152-1045155,1046094-1046097,1046102-1046105,1046144-1046147,1046152-1046155,1047094-1047096,1047101-1047104,1047145-1047148,1047153-1047156,1048093-1048096,1048101-1048104,1048146-1048149,1048153-1048156,1049093-1049096,1049100-1049103,1049146-1049149,1049154-1049157,1050092-1050095,1050100-1050103,1050147-1050150,1050154-1050157,1051092-1051095,1051099-1051102,1051147-1051150,1051155-1051157,1052092-1052094,1052099-1052102,1052148-1052150,1052155-1052158,1053091-1053094,1053098-1053101,1053148-1053151,1053155-1053158,1054091-1054094,1054098-1054101,1054149-1054151,1054156-1054158,1055091-1055094,1055098-1055100,1055149-1055151,1055156-1055158,1056091-1056093,1056098-1056100,1056149-1056152,1056156-1056159,1057091-1057093,1057097-1057100,1057149-1057152,1057156-1057159,1058090-1058093,1058097-1058100,1058150-1058152,1058156-1058159,1059090-1059093,1059097-1059100,1059150-1059152,1059156-1059159,1060090-1060093,1060097-1060099,1060150-1060152,1060156-1060159,1061090-1061093,1061097-1061099,1061150-1061152,1061157-1061159,1062090-1062093,1062097-1062099,1062150-1062152,1062157-1062159,1063090-1063093,1063097-1063099,1063150-1063152,1063157-1063159,1064090-1064093,1064097-1064099,1064150-1064152,1064157-1064159,1065090-1065093,1065097-1065099,1065150-1065152,1065156-1065159,1066090-1066093,1066097-1066100,1066150-1066152,1066156-1066159,1067091-1067093,1067097-1067100,1067149-1067152,1067156-1067159,1068091-1068093,1068097-1068100,1068149-1068152,1068156-1068159,1069091-1069093,1069098-1069100,1069149-1069152,1069156-1069158,1070091-1070094,1070098-1070101,1070149-1070151,1070156-1070158,1071091-1071094,1071098-1071101,1071148-1071151,1071155-1071158,1072092-1072094,1072099-1072101,1072148-1072151,1072155-1072158,1073092-1073095,1073099-1073102,1073148-1073150,1073155-1073157,1074092-1074095,1074099-1074102,1074147-1074150,1074154-1074157,1075093-1075095,1075100-1075103,1075147-1075150,1075154-1075157,1076093-1076096,1076100-1076103,1076146-1076149,1076153-1076156,1077093-1077096,1077101-1077104,1077145-1077148,1077153-1077156,1078094-1078097,1078101-1078105,1078145-1078148,1078152-1078155,1079094-1079097,1079102-1079105,1079144-1079147,1079152-1079155,1080095-1080098,1080103-1080106,1080143-1080146,1080151-1080154,1081096-1081099,1081104-1081107,1081142-1081146,1081151-1081154,1082096-1082099,1082104-1082109,1082141-1082145,1082150-1082153,1083097-1083100,1083105-1083110,1083139-1083144,1083149-1083152,1084098-1084101,1084106-1084111,1084138-1084143,1084148-1084152,1085098-1085102,1085108-1085113,1085136-1085142,1085147-1085151,1086099-1086103,1086109-1086115,1086134-1086140,1086146-1086150,1087100-1087104,1087111-1087119,1087131-1087139,1087145-1087149,1088101-1088105,1088112-1088137,1088144-1088148,1089102-1089107,1089114-1089135,1089142-1089147,1090103-1090108,1090117-1090132,1090141-1090146,1091105-1091110,1091122-1091127,1091139-1091145,1092106-1092112,1092137-1092143,1093108-1093115,1093134-1093142,1094109-1094120,1094129-1094140,1095112-1095138,1096114-1096135,1097118-1097131</detids>
</group>
</detector-masking>
4 changes: 4 additions & 0 deletions SystemTests/AnalysisTests/LoadLotsOfFiles.py
Expand Up @@ -32,6 +32,7 @@
'MASKSANS2D.091A',
'MASKSANS2Doptions.091A',
'MaskSANS2DReductionGUI.txt',
'MaskSANS2DReductionGUI_MaskFiles.txt',
'MAP17269.raw', # Don't need to check multiple MAPS files
'MAP17589.raw',
'MER06399.raw', # Don't need to check multiple MERLIN files
Expand All @@ -42,9 +43,12 @@
'REF_M_9709_event.nxs',
'SANS2D_periodTests.csv',
'SANS2D_992_91A.csv',
'SANS2D_mask_batch.csv',
'sans2d_reduction_gui_batch.csv',
'squaricn.phonon',
'squaricn.castep',
'target_circles_mask.xml',
'linked_circles_mask.xml',
'testCansas1DMultiEntry.xml',
'Wish_Diffuse_Scattering_ISAW_UB.mat',
'WSH_test.dat',
Expand Down
Binary file not shown.
26 changes: 26 additions & 0 deletions SystemTests/AnalysisTests/SANS2DBatch.py
Expand Up @@ -33,3 +33,29 @@ def validate(self):
self.disableChecking.append('Instrument')

return '5512p7_SANS2DBatch','SANS2DBatch.nxs'

class SANS2DNewSettingsCarriedAcrossInBatchMode(stresstesting.MantidStressTest):
"""
We want to make sure that any settings saved in the PropertyManager objects
are used across all iterations of the reduction in Batch mode. The MASKFILE
command uses this new way of storing settings in ISIS SANS, and so we'll
see if the same masks get applied in the second iteration as they do in the
first.
"""
def runTest(self):
config['default.instrument'] = 'SANS2D'
SANS2D()
Set1D()
Detector("rear-detector")
# This contains two MASKFILE commands, each resulting in a seperate call to MaskDetectors.
MaskFile('MaskSANS2DReductionGUI_MaskFiles.txt')
Gravity(True)

# This does 2 seperate reductions of the same data, but saving the result of each to a different workspace.
csv_file = FileFinder.getFullPath("SANS2D_mask_batch.csv")
BatchReduce(csv_file, 'nxs', plotresults=False)

def validate(self):
self.tolerance_is_reller = True
self.tolerance = 1.0e-2
return "iteration_2", "SANS2DNewSettingsCarriedAcross.nxs"

0 comments on commit d3682a6

Please sign in to comment.