- Timestamp:
- May 4, 2011 9:47:33 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Common/GaussUtils_v40.ipf
r797 r800 419 419 Variable nord //number of quadrature points to used 420 420 421 422 // special case of integral limits that are identical 423 if(upLim == loLim) 424 return( fcn(w,x, loLim)) 425 endif 426 421 427 // local variables 422 428 Variable ii,va,vb,summ,yyy,zi … … 445 451 // Using 5 Gauss points 446 452 // remember to index from 0,size-1 447 453 448 454 summ = 0.0 // initialize integral 449 455 ii=0 // loop counter … … 472 478 Variable x //x-value (q) for the calculation 473 479 480 481 // special case of integral limits that are identical 482 if(upLim == loLim) 483 return( fcn(w,x, loLim)) 484 endif 485 474 486 // local variables 475 487 Variable nord,ii,va,vb,summ,yyy,zi … … 525 537 Variable x //x-value (q) for the calculation 526 538 539 // special case of integral limits that are identical 540 if(upLim == loLim) 541 return( fcn(w,x, loLim)) 542 endif 543 527 544 // local variables 528 545 Variable nord,ii,va,vb,summ,yyy,zi … … 578 595 Variable x //x-value (q) for the calculation 579 596 597 // special case of integral limits that are identical 598 if(upLim == loLim) 599 return( fcn(w,x, loLim)) 600 endif 601 580 602 // local variables 581 603 Variable nord,ii,va,vb,summ,yyy,zi … … 631 653 632 654 //**** The coefficient wave is passed into this function and straight through to the unsmeared model function 633 655 // special case of integral limits that are identical 656 if(upLim == loLim) 657 return( fcn(w,x, loLim)) 658 endif 659 634 660 // local variables 635 661 Variable nord,ii,va,vb,summ,yyy,zi … … 906 932 endif 907 933 908 answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord)909 //Smear_Model_N_AAO(fcn,w,x,resW,weightW,abscissW,nord,answer)934 // answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord) 935 Smear_Model_N_AAO(fcn,w,x,resW,weightW,abscissW,nord,answer) 910 936 911 937 Return (0) … … 956 982 endif 957 983 958 answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord)959 //Smear_Model_N_AAO(fcn,w,x,resW,weightW,abscissW,nord,answer)984 // answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord) 985 Smear_Model_N_AAO(fcn,w,x,resW,weightW,abscissW,nord,answer) 960 986 961 987 Return (0) … … 982 1008 String weightStr,zStr 983 1009 Variable nord=20 1010 984 1011 985 1012 if (dimsize(resW,1) > 4 && useTrap != 1) … … 1012 1039 endif 1013 1040 1014 answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord)1015 //Smear_Model_N_AAO(fcn,w,x,resW,weightW,abscissW,nord,answer)1041 // answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord) 1042 Smear_Model_N_AAO(fcn,w,x,resW,weightW,abscissW,nord,answer) 1016 1043 1017 1044 Return (0) … … 1060 1087 endif 1061 1088 1062 answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord)1063 //Smear_Model_N_AAO(fcn,w,x,resW,weightW,abscissW,nord,answer)1089 // answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord) 1090 Smear_Model_N_AAO(fcn,w,x,resW,weightW,abscissW,nord,answer) 1064 1091 1065 1092 Return (0) … … 1612 1639 // provides some speedup. 1613 1640 // 1614 //// APRIL 2011 *** this function is NOT YET CURSOR-AWARE. This needs to be addressed before it can be used1641 //// APRIL 2011 *** this function is now cursor aware. The whole input x-wave is interpolated 1615 1642 // 1616 1643 // … … 1653 1680 // returned from the interpolation (as expected) 1654 1681 1655 Make/O/D/N=(DimSize(resW, 0)) sigQ,qbar,shad,qvals,va,vb 1656 sigq = resW[p][0] //std dev of resolution fn 1657 qbar = resW[p][1] //mean q-value 1658 shad = resW[p][2] //beamstop shadow factor 1659 qvals = resW[p][3] //q-values where R(q) is known 1660 1661 //SKIP the interpolation, points passed in ARE (MUST) be the experimental q-values 1662 1682 Make/O/D/N=(numpnts(x)) sigQ,qbar,shad,qvals,va,vb 1683 Make/O/D/N=(DimSize(resW, 0)) tmpsigQ,tmpqbar,tmpshad,tmpqvals 1684 tmpsigq = resW[p][0] //std dev of resolution fn 1685 tmpqbar = resW[p][1] //mean q-value 1686 tmpshad = resW[p][2] //beamstop shadow factor 1687 tmpqvals = resW[p][3] //q-values where R(q) is known 1688 1689 //interpolate the whole input x-wave to make sure that the resolution and input x are in sync if cursors are used 1690 shad = interp(x,tmpqvals,tmpshad) 1691 qbar = interp(x,tmpqvals,tmpqbar) 1692 sigq = interp(x,tmpqvals,tmpsigq) 1663 1693 1664 1694 // if USANS data, handle separately … … 1755 1785 sm_ans /= normalize 1756 1786 1787 KillWaves/Z tmpsigQ,tmpqbar,tmpshad,tmpqvals 1788 1757 1789 return(0) 1758 1790
Note: See TracChangeset
for help on using the changeset viewer.