Changeset 116 for sans/SANSReduction/trunk/Put in User Procedures/SANS_Reduction_v5.00/RectAnnulAvg.ipf
- Timestamp:
- May 31, 2007 12:58:47 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/SANSReduction/trunk/Put in User Procedures/SANS_Reduction_v5.00/RectAnnulAvg.ipf
r47 r116 59 59 60 60 // center of detector, for non-linear corrections 61 xcenter = 64.5 62 ycenter = 64.5 61 NVAR pixelsX = root:myGlobals:gNPixelsX 62 NVAR pixelsY = root:myGlobals:gNPixelsY 63 64 xcenter = pixelsX/2 + 0.5 // == 64.5 for 128x128 Ordela 65 ycenter = pixelsY/2 + 0.5 // == 64.5 for 128x128 Ordela 63 66 64 67 // beam center, in pixels … … 323 326 //good values 324 327 325 Variable DDet, apOff=0.0 328 Variable DDet 329 NVAR apOff = root:myGlobals:apOff //in cm 326 330 DDet = DetectorPixelResolution(fileStr,detStr) //needs detector type and beamline 327 // do328 // if(strsearch(fileStr, "NG5", 0) != -1)329 // //string was found, it's an NG5 file330 // DDet = 1.0331 // break332 // Endif333 // if(strsearch(fileStr, "NG3", 0) != -1)334 // //string was found, it's an NG3 file335 // DDet = 1.0336 // break337 // Endif338 // if(strsearch(fileStr, "NG7", 0) != -1)339 // //string was found, it's an NG7 file340 // DDet = 0.5341 // break342 // Endif343 // while(0)344 331 345 332 //Width of annulus used for the average is gotten from the … … 351 338 352 339 ii=0 353 // String res_string="root:myGlobals:Res_vals" 354 // Make/O/D/N=3 $res_string 355 // Wave res_wave=$res_string 340 356 341 Variable ret1,ret2,ret3 357 342 do 358 343 getResolution(qval[ii],lambda,lambdaWidth,DDet,apOff,S1,S2,L1,L2,BS,ddr,ret1,ret2,ret3) 359 sigmaq[ii] = ret1 //res_wave[0]360 qbar[ii] = ret2 //res_wave[1]361 fsubs[ii] = ret3 //res_wave[2]344 sigmaq[ii] = ret1 345 qbar[ii] = ret2 346 fsubs[ii] = ret3 362 347 ii+=1 363 348 while(ii<nq) … … 372 357 373 358 Avg_1D_Graph(aveint,qval,sigave) 374 // DoWindow/F Plot_1d 375 // If(V_flag == 1) //the graph window already exists 376 // //kill the old graph and make a new one 377 // //easier than adjusting the old one 378 // DoWindow/K Plot_1d 379 // Endif 380 // Display /W=(412,51,727,302)/K=1 aveint vs qval 381 // ModifyGraph log=1 382 // ModifyGraph mode=3,marker=19,msize=1,rgb=(0,0,0) 383 // ErrorBars aveint Y,wave=(sigave,sigave) 384 // Label left "Counts";DelayUpdate 385 // Label bottom "q\\U" 386 // SVAR angst = root:myGlobals:gAngstStr 387 // Label bottom "q ("+angst+"\\S-1\\M)" 388 // DoWindow/C Plot_1d 389 359 390 360 //get rid of the default mask, if one was created (it is in the current folder) 391 361 //don't just kill "mask" since it might be pointing to the one in the MSK folder … … 490 460 Wave reals = $(destPath + ":RealsRead") 491 461 462 // center of detector, for non-linear corrections 492 463 NVAR pixelsX = root:myGlobals:gNPixelsX 493 464 NVAR pixelsY = root:myGlobals:gNPixelsY 494 465 495 // center of detector, for non-linear corrections 496 xcenter = 64.5 497 ycenter = 64.5 466 xcenter = pixelsX/2 + 0.5 // == 64.5 for 128x128 Ordela 467 ycenter = pixelsY/2 + 0.5 // == 64.5 for 128x128 Ordela 498 468 499 469 // beam center, in pixels … … 517 487 nphi = numPhiSteps //number of anular sectors is set by users 518 488 519 rcentr = 150 //pixels within rcentr of beam center are broken into 9 parts520 489 rc = 2*dtdist*asin(qc*lambda/4/Pi) //in mm 521 490 delr = nw*sx/2 … … 673 642 //angle dependent transmission correction is not done in phiave 674 643 Ann_1D_Graph(aveint,phival,sigave) 675 // DoWindow/F Plot_1d676 // If(V_flag == 1) //the graph window already exists677 // //kill the old graph and make a new one678 // //easier than adjusting the old one679 // DoWindow/K Plot_1d680 // Endif681 // Display /W=(412,51,727,302)/K=1 aveint vs phival682 // ModifyGraph log=0683 // ModifyGraph mode=3,marker=19,msize=1,rgb=(0,0,0)684 // ErrorBars aveint Y,wave=(sigave,sigave)685 // Label left "Counts";DelayUpdate686 // Label bottom "Angle (degrees)"687 // DoWindow/C Plot_1d688 644 689 645 //get rid of the default mask, if one was created (it is in the current folder)
Note: See TracChangeset
for help on using the changeset viewer.