- Timestamp:
- Aug 14, 2007 4:12:23 PM (16 years ago)
- Location:
- sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/GaussUtils.ipf
r144 r145 729 729 // 730 730 // 731 Function Smear_Model_5(fcn,w,x, resW)731 Function Smear_Model_5(fcn,w,x,answer,resW) 732 732 FUNCREF SANSModelAAO_proto fcn 733 733 Wave w //coefficients of function fcn(w,x) 734 Variable x //x-value (q) for the calculation 734 Wave x //x-value (q) for the calculation 735 Wave answer // ywave for calculation result 735 736 Wave resW // Nx4 or NxN matrix of resolution 736 737 737 738 String weightStr,zStr 738 Variable answer,nord=5 739 740 weightStr = "gauss5wt" 741 zStr = "gauss5z" 742 743 // if wt,z waves don't exist, create them (only check for weight, should really check for both) 744 if (WaveExists($weightStr) == 0) // wave reference is not valid, 745 Make/D/N=(nord) $weightStr,$zStr 746 Wave weightW = $weightStr 747 Wave abscissW = $zStr // wave references to pass 748 Make5GaussPoints(weightW,abscissW) 739 Variable nord=5 740 741 if (dimsize(resW,1) > 4) 742 //USANS Weighting matrix is present. 743 fcn(w,answer,x) 744 745 MatrixOP/O answer = resW x answer 746 //Duplicate/O answer,tmpMat 747 //MatrixOP/O answer = resW x tmpMat 748 Return(0) 749 749 else 750 if(exists(weightStr) > 1) 751 Abort "wave name is already in use" //executed only if name is in use elsewhere 752 endif 753 Wave weightW = $weightStr 754 Wave abscissW = $zStr // create the wave references 755 endif 756 757 answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord) 758 Return (answer) 750 weightStr = "gauss20wt" 751 zStr = "gauss20z" 752 753 // if wt,z waves don't exist, create them (only check for weight, should really check for both) 754 if (WaveExists($weightStr) == 0) // wave reference is not valid, 755 Make/D/N=(nord) $weightStr,$zStr 756 Wave weightW = $weightStr 757 Wave abscissW = $zStr // wave references to pass 758 Make20GaussPoints(weightW,abscissW) 759 else 760 if(exists(weightStr) > 1) 761 Abort "wave name is already in use" //executed only if name is in use elsewhere 762 endif 763 Wave weightW = $weightStr 764 Wave abscissW = $zStr // create the wave references 765 endif 766 767 answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord) 768 Return (0) 769 endif 759 770 760 771 End … … 763 774 // 764 775 // 765 Function Smear_Model_10(fcn,w,x, resW)776 Function Smear_Model_10(fcn,w,x,answer,resW) 766 777 FUNCREF SANSModelAAO_proto fcn 767 778 Wave w //coefficients of function fcn(w,x) 768 Variable x //x-value (q) for the calculation 779 Wave x //x-value (q) for the calculation 780 Wave answer // ywave for calculation result 769 781 Wave resW // Nx4 or NxN matrix of resolution 770 782 771 783 String weightStr,zStr 772 Variable answer,nord=10 773 774 weightStr = "gauss10wt" 775 zStr = "gauss10z" 776 777 // if wt,z waves don't exist, create them (only check for weight, should really check for both) 778 if (WaveExists($weightStr) == 0) // wave reference is not valid, 779 Make/D/N=(nord) $weightStr,$zStr 780 Wave weightW = $weightStr 781 Wave abscissW = $zStr // wave references to pass 782 Make10GaussPoints(weightW,abscissW) 784 Variable nord=10 785 786 if (dimsize(resW,1) > 4) 787 //USANS Weighting matrix is present. 788 fcn(w,answer,x) 789 790 MatrixOP/O answer = resW x answer 791 //Duplicate/O answer,tmpMat 792 //MatrixOP/O answer = resW x tmpMat 793 Return(0) 783 794 else 784 if(exists(weightStr) > 1) 785 Abort "wave name is already in use" //executed only if name is in use elsewhere 786 endif 787 Wave weightW = $weightStr 788 Wave abscissW = $zStr // create the wave references 789 endif 790 791 answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord) 792 Return (answer) 795 weightStr = "gauss20wt" 796 zStr = "gauss20z" 797 798 // if wt,z waves don't exist, create them (only check for weight, should really check for both) 799 if (WaveExists($weightStr) == 0) // wave reference is not valid, 800 Make/D/N=(nord) $weightStr,$zStr 801 Wave weightW = $weightStr 802 Wave abscissW = $zStr // wave references to pass 803 Make20GaussPoints(weightW,abscissW) 804 else 805 if(exists(weightStr) > 1) 806 Abort "wave name is already in use" //executed only if name is in use elsewhere 807 endif 808 Wave weightW = $weightStr 809 Wave abscissW = $zStr // create the wave references 810 endif 811 812 answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord) 813 Return (0) 814 endif 793 815 794 816 End … … 802 824 // Wave qvals //q-values where R(q) is known 803 825 // 804 Function Smear_Model_20(fcn,w,x, resW)826 Function Smear_Model_20(fcn,w,x,answer,resW) 805 827 FUNCREF SANSModelAAO_proto fcn 806 828 Wave w //coefficients of function fcn(w,x) 807 Variable x //x-value (q) for the calculation 829 Wave x //x-value (q) for the calculation 830 Wave answer // ywave for calculation result 808 831 Wave resW // Nx4 or NxN matrix of resolution 809 832 810 833 String weightStr,zStr 811 Variable answer,nord=20 812 813 weightStr = "gauss20wt" 814 zStr = "gauss20z" 815 816 // if wt,z waves don't exist, create them (only check for weight, should really check for both) 817 if (WaveExists($weightStr) == 0) // wave reference is not valid, 818 Make/D/N=(nord) $weightStr,$zStr 819 Wave weightW = $weightStr 820 Wave abscissW = $zStr // wave references to pass 821 Make20GaussPoints(weightW,abscissW) 834 Variable nord=20 835 836 if (dimsize(resW,1) > 4) 837 //USANS Weighting matrix is present. 838 fcn(w,answer,x) 839 840 MatrixOP/O answer = resW x answer 841 //Duplicate/O answer,tmpMat 842 //MatrixOP/O answer = resW x tmpMat 843 Return(0) 822 844 else 823 if(exists(weightStr) > 1) 824 Abort "wave name is already in use" //executed only if name is in use elsewhere 825 endif 826 Wave weightW = $weightStr 827 Wave abscissW = $zStr // create the wave references 828 endif 829 830 answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord) 831 Return (answer) 845 weightStr = "gauss20wt" 846 zStr = "gauss20z" 847 848 // if wt,z waves don't exist, create them (only check for weight, should really check for both) 849 if (WaveExists($weightStr) == 0) // wave reference is not valid, 850 Make/D/N=(nord) $weightStr,$zStr 851 Wave weightW = $weightStr 852 Wave abscissW = $zStr // wave references to pass 853 Make20GaussPoints(weightW,abscissW) 854 else 855 if(exists(weightStr) > 1) 856 Abort "wave name is already in use" //executed only if name is in use elsewhere 857 endif 858 Wave weightW = $weightStr 859 Wave abscissW = $zStr // create the wave references 860 endif 861 862 answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord) 863 Return (0) 864 endif 832 865 833 866 End 834 867 /////////////////////////////////////////////////////////////// 835 Function Smear_Model_76(fcn,w,x, resW)868 Function Smear_Model_76(fcn,w,x,answer,resW) 836 869 FUNCREF SANSModelAAO_proto fcn 837 870 Wave w //coefficients of function fcn(w,x) 838 Variable x //x-value (q) for the calculation 871 Wave x //x-value (q) for the calculation 872 Wave answer // ywave for calculation result 839 873 Wave resW // Nx4 or NxN matrix of resolution 840 874 841 842 // local variables843 Variable answer,nord=76844 875 String weightStr,zStr 845 846 weightStr = "gauss76wt" 847 zStr = "gauss76z" 848 849 if (WaveExists($weightStr) == 0) // wave reference is not valid, 850 Make/D/N=(nord) $weightStr,$zStr 851 Wave weightW = $weightStr 852 Wave abscissW = $zStr // wave references to pass 853 Make76GaussPoints(weightW,abscissW) 876 Variable nord=76 877 878 if (dimsize(resW,1) > 4) 879 //USANS Weighting matrix is present. 880 fcn(w,answer,x) 881 882 MatrixOP/O answer = resW x answer 883 //Duplicate/O answer,tmpMat 884 //MatrixOP/O answer = resW x tmpMat 885 Return(0) 854 886 else 855 if(exists(weightStr) > 1) 856 Abort "wave name is already in use" //executed only if name is in use elsewhere 857 endif 858 Wave weightW = $weightStr 859 Wave abscissW = $zStr // create the wave references 860 endif 861 answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord) 862 Return (answer) 887 weightStr = "gauss20wt" 888 zStr = "gauss20z" 889 890 // if wt,z waves don't exist, create them (only check for weight, should really check for both) 891 if (WaveExists($weightStr) == 0) // wave reference is not valid, 892 Make/D/N=(nord) $weightStr,$zStr 893 Wave weightW = $weightStr 894 Wave abscissW = $zStr // wave references to pass 895 Make20GaussPoints(weightW,abscissW) 896 else 897 if(exists(weightStr) > 1) 898 Abort "wave name is already in use" //executed only if name is in use elsewhere 899 endif 900 Wave weightW = $weightStr 901 Wave abscissW = $zStr // create the wave references 902 endif 903 904 answer = Smear_Model_N(fcn,w,x,resW,weightW,abscissW,nord) 905 Return (0) 906 endif 907 863 908 End 864 909 -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/NewModels_2006/SchulzSpheres.ipf
r131 r145 215 215 216 216 // the name of your unsmeared model (AAO) is the first argument 217 s.yW = Smear_Model_20(SchulzSpheres,s.coefW,s.xW,s.resW)217 Smear_Model_20(SchulzSpheres,s.coefW,s.xW,s.yW,s.resW) 218 218 219 219 return(0) -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Sphere.ipf
r144 r145 163 163 164 164 ////the name of your unsmeared model is the first argument 165 s.yW = Smear_Model_20(SphereForm,s.coefW,s.xW,s.resW)165 Smear_Model_20(SphereForm,s.coefW,s.xW,s.yW,s.resW) 166 166 167 167 return(0) -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/USANS_SlitSmearing.ipf
r138 r145 31 31 String/G USANS_basestr = basestr 32 32 33 Make/ O/N=(USANS_N,USANS_N) $(basestr+"_res")33 Make/D/O/N=(USANS_N,USANS_N) $(basestr+"_res") 34 34 //Make/O/N=(N,N) W1mat 35 35 //Make/O/N=(N,N) W2mat
Note: See TracChangeset
for help on using the changeset viewer.