- Timestamp:
- Sep 5, 2019 3:00:05 PM (3 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VSANS_Includes.ipf
r1146 r1203 125 125 // VSANS Analysis functions (under Analysis trunk, not Reduction) 126 126 #include "V_WB_BroadPeak" 127 #include "V_SWB_BroadPeak" 127 128 #include "V_WB_GaussSpheres" 128 129 #include "V_WB_Beaucage" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Attenuation.ipf
r1153 r1203 169 169 numAtt = V_getAtten_number(fname) 170 170 lambda = V_getWavelength(fname) 171 171 172 if(lambda < 4.52 || lambda > 19) 173 Abort "Wavelength out of range for attenuation table" 174 endif 175 172 176 // TODO -- need to switch on "type" 173 177 // == velocity_selector || ?? for white beam || graphite 174 178 // monoType = V_getMonochromatorType(fname) 175 179 176 monoType = V_ DeduceMonochromatorType(fname)180 monoType = V_IdentifyMonochromatorType(fname) 177 181 print monoType 178 182 … … 194 198 endswitch 195 199 196 197 200 Wave w = V_getAttenIndex_table(fname) // N=(x,17) 198 201 Variable num = DimSize(w,0) … … 230 233 numAtt = V_getAtten_number(fname) 231 234 lambda = V_getWavelength(fname) 232 235 236 if(lambda < 4.52 || lambda > 19) 237 Abort "Wavelength out of range for attenuation error table" 238 endif 239 233 240 // TODO -- need to switch on "type" 234 241 // == velocity_selector || ?? for white beam || crystal 235 242 // monoType = V_getMonochromatorType(fname) 236 243 237 monoType = V_ DeduceMonochromatorType(fname)244 monoType = V_IdentifyMonochromatorType(fname) 238 245 print monoType 239 246 // set a fake wavelength for the interpolation or get out -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_EventModeProcessing.ipf
r1116 r1203 561 561 case 2: // mouse up 562 562 // click code here 563 DisplayHelpTopic/Z " Event Mode Data"563 DisplayHelpTopic/Z "VSANS Event Mode Data" 564 564 break 565 565 case -1: // control being killed -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_EventMode_Utils.ipf
r1114 r1203 1069 1069 SetVariable ERSelSlice,proc=V_ChangeSliceViewSetVar 1070 1070 1071 Button ToSTOButton,pos={305,45},size={100,20},proc=V_EVR_LoadAndSTO,title=" to STO"1071 Button ToSTOButton,pos={305,45},size={100,20},proc=V_EVR_LoadAndSTO,title="Load to STO" 1072 1072 Button ToSTOButton,help={"Load the event file and copy to STO"} 1073 1073 … … 1240 1240 // locates the time bins and shows the time bin table (and plot?) 1241 1241 // 1242 // Can't show the plot of counts/bin since there would be 8 of these now, one for 1243 // each panel. Could show a total count per slice, but the numbers (binCount) is currently 1244 // not written to the Event_ file. 1245 // 1246 // the macro that is called from the main Event panel shows the total counts/bin for the carriage 1247 // that is active. Maybe this would be OK, but then there are still two sets of data, one for 1248 // Front and one for Middle... 1249 // 1242 1250 Function V_EVR_TimeBins(PathButton) : ButtonControl 1243 1251 String PathButton … … 1247 1255 1248 1256 edit binEnd,timeWidth 1257 1258 // DoWindow/F V_EventBarGraph 1259 // if(V_flag == 0) 1260 // PauseUpdate; Silent 1 // building window... 1261 // String fldrSav0= GetDataFolder(1) 1262 // SetDataFolder root:Packages:NIST:VSANS:Event: 1263 // Display /W=(110,705,610,1132)/N=V_EventBarGraph /K=1 binCount vs binEndTime 1264 // SetDataFolder fldrSav0 1265 // ModifyGraph mode=5 1266 // ModifyGraph marker=19 1267 // ModifyGraph lSize=2 1268 // ModifyGraph rgb=(0,0,0) 1269 // ModifyGraph msize=2 1270 // ModifyGraph hbFill=2 1271 // ModifyGraph gaps=0 1272 // ModifyGraph usePlusRGB=1 1273 // ModifyGraph toMode=0 1274 // ModifyGraph useBarStrokeRGB=1 1275 // ModifyGraph standoff=0 1276 // SetAxis left 0,* 1277 // Label bottom "\\Z14Time (seconds)" 1278 // Label left "\\Z14Number of Events" 1279 // endif 1280 1249 1281 1250 1282 return(0) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_HDF5_Read.ipf
r1150 r1203 465 465 // transmission value for the attenuator in the beam 466 466 // use this, but if something wrong, the tables are present 467 // (and something is wrong -- NICE always writes out "1" for the atten factor (and error) 468 //-- so I am forced to use the tables every time 469 // 467 470 Function V_getAttenuator_transmission(fname) 468 471 String fname -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Instrument_Resolution.ipf
r1130 r1203 212 212 BS = VC_beamstopDiam(type[0,1])*10 // convert cm to mm 213 213 else 214 BS = V_ DeduceBeamstopDiameter(folderStr,type) //returns diameter in [mm]214 BS = V_IdentifyBeamstopDiameter(folderStr,type) //returns diameter in [mm] 215 215 endif 216 216 // BS = V_getBeamStopC2_size(folderStr) // Units are [mm] … … 512 512 // 513 513 // TODO: the values in the file are incorrect!!! BS = 1000 mm diameter!!! 514 BS = V_ DeduceBeamstopDiameter(folderStr,type) //returns diameter in [mm]514 BS = V_IdentifyBeamstopDiameter(folderStr,type) //returns diameter in [mm] 515 515 // BS = V_getBeamStopC2_size(folderStr) // Units are [mm] 516 516 // BS = 25.4 //TODO hard-wired value -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MainPanel.ipf
r1131 r1203 244 244 Proc V_HelpMainButtonProc(ctrlName) : ButtonControl 245 245 String ctrlName 246 DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Tutorial"246 DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Documentation" 247 247 if(V_flag !=0) 248 DoAlert 0,"The VSANS Data Reduction TutorialHelp file could not be found"248 DoAlert 0,"The VSANS Data Reduction Help file could not be found" 249 249 endif 250 250 End -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MaskUtils.ipf
r1188 r1203 167 167 case 2: // mouse up 168 168 // click code here 169 DoAlert 0, "Draw Mask Help not written yet..." 169 DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Documentation[Drawing a Mask]" 170 if(V_flag !=0) 171 DoAlert 0,"The VSANS Data Reduction Help file could not be found" 172 endif 170 173 break 171 174 case -1: // control being killed -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Menu.ipf
r1151 r1203 151 151 152 152 Function VSANSHelp() 153 DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Tutorial"153 DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Documentation" 154 154 if(V_flag !=0) 155 DoAlert 0,"The VSANS Data Reduction Tutorial Help file could not be found, because it has not yet been written"155 DoAlert 0,"The VSANS Data Reduction Help file could not be found" 156 156 endif 157 157 End -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_PatchFiles.ipf
r1151 r1203 455 455 SelWave[][0] = 2^5 // checkboxes 456 456 SelWave[][2] = 2^1 // 3rd column editable 457 457 458 // 459 // TODO - the attenuation factor is always calculated from the table. How do I devise a method to 460 // overrride this behavior if a factor needs to be forced to a new value (old table, lambda out of range, etc.)? 461 // 462 // currently, this simply prevents anyone from "patching" the header, which really doesn't work as intended 463 // 464 SelWave[0][0] += 2^7 // disable the checkbox for attenuator 465 SelWave[1][0] += 2^7 // disable the checkbox for attenuator_err 458 466 459 467 listWave[0][1] = "attenuator_transmission" … … 498 506 listWave[13][1] = "beam stop diameter (Middle) [mm]" 499 507 // listWave[13][2] = num2str(V_getBeamStopC2_size(fname)) 500 listWave[13][2] = num2str(V_ DeduceBeamstopDiameter(fname,"MR"))508 listWave[13][2] = num2str(V_IdentifyBeamstopDiameter(fname,"MR")) 501 509 502 510 listWave[14][1] = "beam stop diameter (Back) [mm]" 503 511 // listWave[14][2] = num2str(V_getBeamStopC3_size(fname)) 504 listWave[14][2] = num2str(V_ DeduceBeamstopDiameter(fname,"B"))512 listWave[14][2] = num2str(V_IdentifyBeamstopDiameter(fname,"B")) 505 513 506 514 listWave[15][1] = "sample aperture(2) to gate valve [cm]" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Utilities_Comparisons.ipf
r1147 r1203 423 423 // for properly handling this error condition 424 424 // 425 Function/S V_ DeduceMonochromatorType(fname)425 Function/S V_IdentifyMonochromatorType(fname) 426 426 String fname 427 427 … … 447 447 // if there is no beamtop in front of the specified detector, return 0.01mm 448 448 // 449 Function V_ DeduceBeamstopDiameter(folderStr,detStr)449 Function V_IdentifyBeamstopDiameter(folderStr,detStr) 450 450 String folderStr,detStr 451 451 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_WhiteBeamDistribution.ipf
r1095 r1203 1 1 #pragma TextEncoding = "MacRoman" 2 2 #pragma rtGlobals=3 // Use modern global access method and strict wave access. 3 4 5 6 7 3 8 4 … … 25 21 // result when compared to the AgBeh data 26 22 // 23 24 25 // 9/2019 26 // added an empirical functional form for the "Super" white beam mode where the deflector is out 27 // and the wavelength is not cut off at the higher wavelength, but extends to 20 28 // 29 // Integral = 30955 (cts*A) for middle fit 30 // 31 32 33 34 35 27 36 28 37 Function V_WhiteBeamDist_top(lam) … … 128 137 End 129 138 139 140 // 141 // 142 // 143 Function V_SuperWhiteBeamDist_mid(lam) 144 Variable lam 145 146 if(lam < 3.37) 147 return(0) 148 endif 149 150 if(lam < 3.72) 151 return(-33536 + 9919*lam) 152 endif 153 154 if(lam < 3.88) 155 return(28941 - 6848*lam) 156 endif 157 158 //// the "middle" of the spikes 159 if(lam < 4.16) 160 return(-1.0111e5 + 26689*lam) 161 endif 162 163 if(lam < 20) 164 return(5 - 10081*exp(-( (lam-4.161)/0.9788 )) + 19776*exp(-( (lam-4.161)/1.921 )) ) 165 endif 166 167 // anything larger than 20, return 0 168 return(0) 169 170 End 171 172
Note: See TracChangeset
for help on using the changeset viewer.