Changeset 558 for sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Timestamp:
- Sep 23, 2009 12:56:57 PM (13 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Marquee.ipf
r482 r558 302 302 // output is dumped to the command window 303 303 // 304 Function DoBoxSum(fileStr,x1,x2,y1,y2 )304 Function DoBoxSum(fileStr,x1,x2,y1,y2,type) 305 305 String fileStr 306 306 Variable x1,x2,y1,y2 307 String type 307 308 308 309 //parse the list of file numbers … … 332 333 // String/G root:myGlobals:gDataDisplayType="RAW" 333 334 // fRawWindowHook() 334 err = Raw_to_work("SAM") 335 String/G root:myGlobals:gDataDisplayType="SAM" 335 if(cmpstr(type,"SAM")==0) 336 err = Raw_to_work("SAM") 337 endif 338 String/G root:myGlobals:gDataDisplayType=type 336 339 fRawWindowHook() 337 cts=SumCountsInBox(x1,x2,y1,y2, "SAM")340 cts=SumCountsInBox(x1,x2,y1,y2,type) 338 341 BoxCounts[ii]=cts 339 342 Print item+" counts = ",cts … … 384 387 385 388 String fileStr="",msgStr="Enter a comma-delimited list of run numbers, use dashes for ranges" 389 String type="RAW" 386 390 Prompt fileStr,msgStr 387 DoPrompt "Pick the file range",fileStr 391 Prompt type,"RAW or Normalized (SAM)",popup,"RAW;SAM;" 392 DoPrompt "Pick the file range",fileStr,type 388 393 Print "fileStr = ",fileStr 389 394 printf "(x1,x2) (y1,y2) = (%d,%d) (%d,%d)\r",x1,x2,y1,y2 390 395 391 DoBoxSum(fileStr,x1,x2,y1,y2 )396 DoBoxSum(fileStr,x1,x2,y1,y2,type) 392 397 393 398 return(0) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MultScatter_MonteCarlo_2D.ipf
r551 r558 982 982 // data, to appear as if it was loaded from a real data file. 983 983 // 984 // currently only works with SANS data, but can later be expanded to generate fake USANS data sets 985 // ---- use FakeUSANSDataFolder() instead---- 984 // ---- use FakeUSANSDataFolder() if you want to fake a 1D USANS data set ---- 986 985 // 987 986 Function Fake1DDataFolder(qval,aveint,sigave,sigmaQ,qbar,fSubs,dataFolder) … … 1000 999 Duplicate/O aveint, $(baseStr+"_i") 1001 1000 Duplicate/O sigave, $(baseStr+"_s") 1002 // Duplicate/O sigmaQ, $(baseStr+"sq") 1003 // Duplicate/O qbar, $(baseStr+"qb") 1004 // Duplicate/O fSubS, $(baseStr+"fs") 1005 1006 // need to switch based on SANS/USANS 1007 if (isSANSResolution(sigave[0])) //checks to see if the first point of the wave is <0] 1008 // make a resolution matrix for SANS data 1009 Variable np=numpnts(qval) 1010 Make/D/O/N=(np,4) $(baseStr+"_res") 1011 Wave res=$(baseStr+"_res") 1012 1013 res[][0] = sigmaQ[p] //sigQ 1014 res[][1] = qBar[p] //qBar 1015 res[][2] = fSubS[p] //fShad 1016 res[][3] = qval[p] //Qvalues 1017 1018 // keep a copy of everything in SAS too... the smearing wrapper function looks for 1019 // data in folders based on waves it is passed - an I lose control of that 1020 Duplicate/O res, $("root:Packages:NIST:SAS:"+baseStr+"_res") 1021 Duplicate/O qval, $("root:Packages:NIST:SAS:"+baseStr+"_q") 1022 Duplicate/O aveint, $("root:Packages:NIST:SAS:"+baseStr+"_i") 1023 Duplicate/O sigave, $("root:Packages:NIST:SAS:"+baseStr+"_s") 1024 else 1025 //the data is USANS data 1026 // nothing done here yet 1027 // dQv = -$w3[0] 1028 1029 // USANS_CalcWeights(baseStr,dQv) 1030 1031 endif 1032 1001 1002 1003 // make a resolution matrix for SANS data 1004 Variable np=numpnts(qval) 1005 Make/D/O/N=(np,4) $(baseStr+"_res") 1006 Wave res=$(baseStr+"_res") 1007 1008 res[][0] = sigmaQ[p] //sigQ 1009 res[][1] = qBar[p] //qBar 1010 res[][2] = fSubS[p] //fShad 1011 res[][3] = qval[p] //Qvalues 1012 1013 // keep a copy of everything in SAS too... the smearing wrapper function looks for 1014 // data in folders based on waves it is passed - an I lose control of that 1015 Duplicate/O res, $("root:Packages:NIST:SAS:"+baseStr+"_res") 1016 Duplicate/O qval, $("root:Packages:NIST:SAS:"+baseStr+"_q") 1017 Duplicate/O aveint, $("root:Packages:NIST:SAS:"+baseStr+"_i") 1018 Duplicate/O sigave, $("root:Packages:NIST:SAS:"+baseStr+"_s") 1019 1033 1020 //clean up 1034 1021 SetDataFolder root: -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SASCALC.ipf
r551 r558 1369 1369 1370 1370 Variable L2 = reals[18] 1371 // Variable BS = reals[21] //this the diameter is stored in mm 1372 Variable BS = beamstopDiamProjection(1) * 10 //calculated projection in cm *10 = mm 1371 Variable BS = reals[21] //this the diameter is stored in mm 1372 // SRK - why was I using the projected diameter of the beam stop?? I added a step at the beginning of every recalculation 1373 // of the intensity to get the right beamstop diameter into RealsRead... 1374 // Variable BS = beamstopDiamProjection(1) * 10 //calculated projection in cm *10 = mm 1373 1375 Variable S1 = reals[23] 1374 1376 Variable S2 = reals[24] … … 1574 1576 QBar = (4.0*Pi/lambda)*sin(0.5*atan(rm/L2)) 1575 1577 SigmaQ = QBar*sqrt(v_r/rmd^2 +v_lambda) 1576 1578 1577 1579 results = "success" 1578 1580 Return results
Note: See TracChangeset
for help on using the changeset viewer.