Changeset 1033 for sans/Dev/trunk
- Timestamp:
- Apr 24, 2017 2:04:29 PM (6 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VSANS_Includes.ipf
r1030 r1033 92 92 #include "V_RealTimeUpdate" 93 93 #include "V_Combine_1D" 94 #include "V_Transmission" 94 95 95 96 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_DIVUtils.ipf
r1030 r1033 10 10 // JAN 2017 11 11 // 12 // TODO: 13 // -- complete the description of the steps needed... 14 // Data needs to be reduced to the "COR" level - that means that the 15 // PLEX data has been added to work files, and the empty and blocked beam have been 16 // subtracted off. 17 // -- but what detector corrections should/ should not be done? 18 // -- non-linear corrections are not needed, since this will strictly be a per-pixel correction 19 // -- solid angle? 20 // -- dead time? 21 // -- efficiency? 22 // -- large angle transmission? 12 23 // 13 // 24 // we may need to think more carefully about some of these since the front carriage may need to be 25 // closer than the nominal 4m distance on SANS that was deemed far enough back to be "safe" from 26 // the high angle issues. 14 27 // 15 28 // … … 25 38 // 26 39 // 40 41 42 43 44 27 45 28 46 //works on the data in "type" folder (expecting data to be reduced to the COR level) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MainPanel.ipf
r1029 r1033 82 82 String ctrlName 83 83 84 CalcTrans()84 V_InitTransmissionPanel() 85 85 End 86 86 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_PatchFiles.ipf
r1026 r1033 313 313 fname = S_path + fname 314 314 315 Variable nRows = 1 3315 Variable nRows = 14 316 316 Redimension/N=(nRows,3) ListWave 317 317 Redimension/N=(nRows,3) selWave … … 349 349 listWave[8][1] = "group_id (sample)" 350 350 listWave[8][2] = num2str(V_getSample_group_ID(fname)) 351 352 listWave[9][1] = "box_count" 353 listWave[9][2] = num2str(V_getBoxCounts(fname)) 354 355 listWave[10][1] = "box_count_error" 356 listWave[10][2] = num2str(V_getBoxCountsError(fname)) 357 358 listWave[11][1] = "whole_trans" 359 listWave[11][2] = num2str(V_getSampleTransWholeDetector(fname)) 360 361 listWave[12][1] = "whole_trans_error" 362 listWave[12][2] = num2str(V_getSampleTransWholeDetErr(fname)) 363 364 351 352 listWave[9][1] = "Box Coordinates" 353 WAVE boxCoord = V_getBoxCoordinates(fname) 354 listWave[9][2] = V_NumWave2List(boxCoord,";") 355 356 listWave[10][1] = "box_count" 357 listWave[10][2] = num2str(V_getBoxCounts(fname)) 358 359 listWave[11][1] = "box_count_error" 360 listWave[11][2] = num2str(V_getBoxCountsError(fname)) 361 362 listWave[12][1] = "whole_trans" 363 listWave[12][2] = num2str(V_getSampleTransWholeDetector(fname)) 364 365 listWave[13][1] = "whole_trans_error" 366 listWave[13][2] = num2str(V_getSampleTransWholeDetErr(fname)) 365 367 366 368 … … 970 972 switch(V_Value) // numeric switch 971 973 case 0: // execute if case matches expression 972 V_WriteHeaderForPatch_0(tempName) 974 V_WriteHeaderForPatch_0(tempName) //control 973 975 break // exit from switch 974 976 case 1: 975 V_WriteHeaderForPatch_1(tempName) 977 V_WriteHeaderForPatch_1(tempName) //reduction 976 978 break 977 979 case 2: 978 V_WriteHeaderForPatch_2(tempName) 980 V_WriteHeaderForPatch_2(tempName) // sample 979 981 break 980 982 case 3: 981 V_WriteHeaderForPatch_3(tempName) 983 V_WriteHeaderForPatch_3(tempName) // instrument 982 984 break 983 985 case 4: 984 V_WriteHeaderForPatch_4(tempName) 986 V_WriteHeaderForPatch_4(tempName) //detectors 985 987 break 986 988 case 5: 987 V_WriteHeaderForPatch_5(tempName) 989 V_WriteHeaderForPatch_5(tempName) // polSANS 988 990 break 989 991 default: // optional default expression executed … … 1099 1101 err = V_writeSample_GroupID(fname,val) 1100 1102 endif 1101 1102 if ((selWave[9][0] & 2^4) != 0) //"box_count" 1103 val = str2num(listWave[9][2]) 1103 1104 1105 1106 if ((selWave[9][0] & 2^4) != 0) //"box coordinates" 1107 str = listWave[9][2] 1108 err = V_writeBoxCoordinates(fname,V_List2NumWave(str,";","inW")) 1109 endif 1110 1111 1112 1113 if ((selWave[10][0] & 2^4) != 0) //"box_count" 1114 val = str2num(listWave[10][2]) 1104 1115 err = V_writeBoxCounts(fname,val) 1105 1116 endif 1106 1117 1107 if ((selWave[1 0][0] & 2^4) != 0) //"box_count_error"1108 val = str2num(listWave[1 0][2])1118 if ((selWave[11][0] & 2^4) != 0) //"box_count_error" 1119 val = str2num(listWave[11][2]) 1109 1120 err = V_writeBoxCountsError(fname,val) 1110 1121 endif 1111 1122 1112 if ((selWave[1 1][0] & 2^4) != 0) //"whole_trans"1113 val = str2num(listWave[1 1][2])1123 if ((selWave[12][0] & 2^4) != 0) //"whole_trans" 1124 val = str2num(listWave[12][2]) 1114 1125 err = V_writeSampleTransWholeDetector(fname,val) 1115 1126 endif 1116 1127 1117 if ((selWave[1 2][0] & 2^4) != 0) //"whole_trans_error"1118 val = str2num(listWave[1 2][2])1128 if ((selWave[13][0] & 2^4) != 0) //"whole_trans_error" 1129 val = str2num(listWave[13][2]) 1119 1130 err = V_writeSampleTransWholeDetErr(fname,val) 1120 1131 endif -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Utilities_General.ipf
r1027 r1033 387 387 388 388 return outputPath 389 End 390 391 392 393 // 394 // this will only load the data into RAW, overwriting whatever is there. no copy is put in rawVSANS 395 // 396 Function V_LoadAndPlotRAW_wName(fname) 397 String fname 398 399 Variable err= V_LoadHDF5Data(fname,"RAW") // load the data 400 // Print "Load err = "+num2str(err) 401 if(!err) 402 SVAR hdfDF = root:file_name // last file loaded, may not be the safest way to pass 403 String folder = StringFromList(0,hdfDF,".") 404 405 // this (in SANS) just passes directly to fRawWindowHook() 406 V_UpdateDisplayInformation("RAW") // plot the data in whatever folder type 407 408 // set the global to display ONLY if the load was called from here, not from the 409 // other routines that load data (to read in values) 410 SVAR gLastFile = root:Packages:NIST:VSANS:Globals:gLastLoadedFile 411 gLastFile = hdfDF 412 endif 389 413 End 390 414 … … 1120 1144 End 1121 1145 1146 //********************* 1147 // List utilities 1148 //********************* 1149 Function/WAVE V_List2TextWave(list,sep,waveStr) 1150 String list,sep,waveStr 1151 1152 Variable n= ItemsInList(list,sep) 1153 Make/O/T/N=(n) $waveStr= StringFromList(p,list,sep) 1154 return $waveStr 1155 End 1156 1157 Function/WAVE V_List2NumWave(list,sep,waveStr) 1158 String list,sep,waveStr 1159 1160 Variable n= ItemsInList(list,sep) 1161 Make/O/D/N=(n) $waveStr= str2num( StringFromList(p,list,sep) ) 1162 return $waveStr 1163 End 1164 1165 Function /S V_TextWave2List(w,sep) 1166 Wave/T w 1167 String sep 1168 1169 String newList="" 1170 Variable n=numpnts(w),ii=0 1171 do 1172 newList += w[ii] + sep 1173 ii+=1 1174 while(ii<n) 1175 return(newList) 1176 End 1177 1178 //for numerical waves 1179 Function/S V_NumWave2List(w,sep) 1180 Wave w 1181 String sep 1182 1183 String newList="",temp="" 1184 Variable n=numpnts(w),ii=0,val 1185 do 1186 val=w[ii] 1187 temp="" 1188 sprintf temp,"%g",val 1189 newList += temp 1190 newList += sep 1191 ii+=1 1192 while(ii<n) 1193 return(newList) 1194 End
Note: See TracChangeset
for help on using the changeset viewer.