Changeset 1088
- Timestamp:
- Feb 26, 2018 3:31:01 PM (4 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SASCALC.ipf
r940 r1088 2326 2326 // all of this is bypassed if the lenses are in 2327 2327 // 2328 // returns beam diameter in [cm] 2329 // 2328 2330 Function beamDiameter(direction) 2329 2331 String direction … … 2371 2373 2372 2374 //on NG3 and NG7, allowable sizes are 1,2,3,4" diameter 2375 // 2376 // at the NGB-10m instrument, allowable sizes are 1, 1.5, 2, 3 (inches) ( SRK 2018) 2377 // 2373 2378 //will return values larger than 4.0*2.54 if a larger beam is needed 2374 2379 // … … 2378 2383 NVAR yesLens = root:Packages:NIST:SAS:gUsingLenses 2379 2384 Variable bm=0 2380 Variable bs=0.0 2385 Variable bs=0.0,pass=0 2386 2387 SVAR selInstr = root:Packages:NIST:SAS:gInstStr // "NG3","NG7","NGB" 2381 2388 2382 2389 if(yesLens) … … 2386 2393 bm = beamDiameter("maximum") 2387 2394 do 2388 bs += 1 2395 if(cmpstr(selInstr,"NGB") == 0) 2396 pass +=1 2397 if(pass == 1) 2398 bs = 1 2399 endif 2400 if(pass == 2) 2401 bs = 1.5 2402 endif 2403 if(pass == 3) 2404 bs = 2 2405 endif 2406 if(pass == 4) 2407 bs = 3 2408 endif 2409 if(pass > 4) 2410 bs += 1 2411 endif 2412 2413 else 2414 bs += 1 // always add 1" at a time to the beam stop (NG3B-30m and NG7) 2415 endif 2416 2389 2417 while ( (bs*2.54 < bm) || (bs > 30.0)) //30 = ridiculous limit to avoid inf loop 2390 2418 endif … … 2394 2422 rw[21] = bs*25.4 //store the BS diameter in mm 2395 2423 2396 2424 return (bs*2.54) //return diameter in cm, not inches for txt 2397 2425 End 2398 2426 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Protocol_Reduction.ipf
r1084 r1088 1 #pragma TextEncoding = "MacRoman" 1 2 #pragma rtGlobals=1 // Use modern global access method. 2 3 #pragma version=5.0 3 #pragma IgorVersion= 6.14 #pragma IgorVersion=7 4 5 5 6 //************************ … … 2337 2338 // 2338 2339 2340 // 2341 // (DONE) 2342 // -x this generates a "Bin Type Not Found" error if reducing only to a 2D level (like for DIV) 2343 // because binTypeStr is null 2339 2344 String binTypeStr = StringByKey("BINTYPE",prot[5],"=",";") 2340 2345 // plotting is not really necessary, and the graph may not be open - so skip for now? 2341 2346 Variable binType 2342 binType = V_BinTypeStr2Num(binTypeStr) 2343 if(binType == 0) 2344 Abort "Binning mode not found in V_QBinAllPanels() "// when no case matches 2347 // only get the binning type if user asks for averaging 2348 If(cmpstr(av_type,"none") != 0) 2349 binType = V_BinTypeStr2Num(binTypeStr) 2350 if(binType == 0) 2351 Abort "Binning mode not found in V_QBinAllPanels() "// when no case matches 2352 endif 2345 2353 endif 2346 2347 2354 2348 2355 // … … 2403 2410 // -- BAD logic here, skipping the normal graph if annular is chosen. Go back and see how I do this 2404 2411 // in SANS for a better and more foolproof way to do this 2412 // x- don't draw the graph if "none" is the average type! 2405 2413 // 2406 if(cmpstr(av_type,"Annular") != 0 )2414 if(cmpstr(av_type,"Annular") != 0 && (cmpstr(av_type,"none") != 0) ) 2407 2415 V_PlotData_Panel() //this brings the plot window to the front, or draws it (ONLY) 2408 2416 V_Update1D_Graph(activeType,binType) //update the graph, data was already binned
Note: See TracChangeset
for help on using the changeset viewer.