Changeset 130 for sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/SmearedRPA.ipf
- Timestamp:
- Jul 26, 2007 9:51:43 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/SmearedRPA.ipf
r127 r130 5 5 // wave that must be carried into the function. 6 6 // this can be done with the STRUCT, if extra space is allocated for such 7 //8 // in addition, the inputvalues, coefvalues_rpa names are not consistent with other models9 // - it would be nice for users to make all models have a consistent naming scheme10 7 // 11 8 // … … 40 37 make/o/t inputnames={"Deg. Polym. Nc","Vol. Frac. Phic","Spec. Vol. Vc","Scatt. Length Lc","Deg. Polym. Nd","Vol. Frac. Phid","Spec. Vol. Vd","Scatt. LengthLd"} 41 38 Edit inputnames,inputvalues 42 Make/O/D coef values_rpa = {5,5,-.0004,1,0}43 make/o/t coefnames_rpa = {"Seg. Length bc","Seg. Length bd","Chi Param. Kcd","scale","Background"}44 Edit coefnames_rpa,coefvalues_rpa39 Make/O/D coef_rpa = {5,5,-.0004,1,0} 40 make/o/t parameters_rpa = {"Seg. Length bc","Seg. Length bd","Chi Param. Kcd","scale","Background"} 41 Edit parameters_rpa,coef_rpa 45 42 ENDIF 46 43 … … 49 46 make/o/t inputnames={"Deg. Polym. Nb","Vol. Frac. Phib","Spec. Vol. Vb","Scatt. Length Lb","Deg. Polym. Nc","Vol. Frac. Phic","Spec. Vol. Vc","Scatt. Length Lc","Deg. Polym. Nd","Vol. Frac. Phid","Spec. Vol. Vd","Scatt. Length Ld"} 50 47 Edit inputnames,inputvalues 51 Make/O/D coef values_rpa = {5,5,5,-.0004,-.0004,-.0004,1,0}52 make/o/t coefnames_rpa = {"Seg. Length bb","Seg. Length bc","Seg. Length bd","Chi Param. Kbc","Chi Param. Kbd","Chi Param. Kcd","scale","Background"}53 Edit coefnames_rpa,coefvalues_rpa48 Make/O/D coef_rpa = {5,5,5,-.0004,-.0004,-.0004,1,0} 49 make/o/t parameters_rpa = {"Seg. Length bb","Seg. Length bc","Seg. Length bd","Chi Param. Kbc","Chi Param. Kbd","Chi Param. Kcd","scale","Background"} 50 Edit parameters_rpa,coef_rpa 54 51 ENDIF 55 52 … … 58 55 make/o/t inputnames={"Deg. Polym. Na","Vol. Frac. Phia","Spec. Vol. Va","Scatt. Length La","Deg. Polym. Nb","Vol. Frac. Phib","Spec. Vol. Vb","Scatt. Length Lb","Deg. Polym. Nc","Vol. Frac. Phic","Spec. Vol. Vc","Scatt. Length Lc","Deg. Polym. Nd","Vol. Frac. Phid","Spec. Vol. Vd","Scatt. Length Ld"} 59 56 Edit inputnames,inputvalues 60 Make/O/D coefvalues_rpa = {5,5,5,5,-.0004,-.0004,-.0004,-.0004,-.0004,-.0004,1,0} 61 make/o/t coefnames_rpa = {"Seg. Length ba","Seg. Length bb","Seg. Length bc","Seg. Length bd","Chi Param. Kab","Chi Param. Kac","Chi Param. Kad","Chi Param. Kbc","Chi Param. Kbd","Chi Param. Kcd","scale","Background"} 62 Edit coefnames_rpa,coefvalues_rpa 63 ENDIF 64 65 ywave_rpa := RPAForm(coefvalues_rpa,xwave_rpa) 57 Make/O/D coef_rpa = {5,5,5,5,-.0004,-.0004,-.0004,-.0004,-.0004,-.0004,1,0} 58 make/o/t parameters_rpa = {"Seg. Length ba","Seg. Length bb","Seg. Length bc","Seg. Length bd","Chi Param. Kab","Chi Param. Kac","Chi Param. Kad","Chi Param. Kbc","Chi Param. Kbd","Chi Param. Kcd","scale","Background"} 59 Edit parameters_rpa,coef_rpa 60 ENDIF 61 62 Variable/G root:g_rpa 63 g_rpa := RPAForm(coef_rpa,ywave_rpa,xwave_rpa) 66 64 Display ywave_rpa vs xwave_rpa 67 65 // ModifyGraph log=1,marker=29,msize=2,mode=4 … … 104 102 make/o/t inputnames={"Deg. Polym. Nc","Vol. Frac. Phic","Spec. Vol. Vc","Scatt. Length Lc","Deg. Polym. Nd","Vol. Frac. Phid","Spec. Vol. Vd","Scatt. LengthLd"} 105 103 Edit inputnames,inputvalues 106 Make/O/D smear_coef values_rpa = {5,5,-.0004,1,0}107 make/o/t smear_ coefnames_rpa = {"Seg. Length bc","Seg. Length bd","Chi Param. Kcd","scale","Background"}108 Edit smear_ coefnames_rpa,smear_coefvalues_rpa104 Make/O/D smear_coef_rpa = {5,5,-.0004,1,0} 105 make/o/t smear_parameters_rpa = {"Seg. Length bc","Seg. Length bd","Chi Param. Kcd","scale","Background"} 106 Edit smear_parameters_rpa,smear_coef_rpa 109 107 ENDIF 110 108 … … 113 111 make/o/t inputnames={"Deg. Polym. Nb","Vol. Frac. Phib","Spec. Vol. Vb","Scatt. Length Lb","Deg. Polym. Nc","Vol. Frac. Phic","Spec. Vol. Vc","Scatt. Length Lc","Deg. Polym. Nd","Vol. Frac. Phid","Spec. Vol. Vd","Scatt. Length Ld"} 114 112 Edit inputnames,inputvalues 115 Make/O/D smear_coef values_rpa = {5,5,5,-.0004,-.0004,-.0004,1,0}116 make/o/t smear_ coefnames_rpa = {"Seg. Length bb","Seg. Length bc","Seg. Length bd","Chi Param. Kbc","Chi Param. Kbd","Chi Param. Kcd","scale","Background"}117 Edit smear_ coefnames_rpa,smear_coefvalues_rpa113 Make/O/D smear_coef_rpa = {5,5,5,-.0004,-.0004,-.0004,1,0} 114 make/o/t smear_parameters_rpa = {"Seg. Length bb","Seg. Length bc","Seg. Length bd","Chi Param. Kbc","Chi Param. Kbd","Chi Param. Kcd","scale","Background"} 115 Edit smear_parameters_rpa,smear_coef_rpa 118 116 ENDIF 119 117 … … 122 120 make/o/t inputnames={"Deg. Polym. Na","Vol. Frac. Phia","Spec. Vol. Va","Scatt. Length La","Deg. Polym. Nb","Vol. Frac. Phib","Spec. Vol. Vb","Scatt. Length Lb","Deg. Polym. Nc","Vol. Frac. Phic","Spec. Vol. Vc","Scatt. Length Lc","Deg. Polym. Nd","Vol. Frac. Phid","Spec. Vol. Vd","Scatt. Length Ld"} 123 121 Edit inputnames,inputvalues 124 Make/O/D smear_coef values_rpa = {5,5,5,5,-.0004,-.0004,-.0004,-.0004,-.0004,-.0004,1,0}125 make/o/t smear_ coefnames_rpa = {"Seg. Length ba","Seg. Length bb","Seg. Length bc","Seg. Length bd","Chi Param. Kab","Chi Param. Kac","Chi Param. Kad","Chi Param. Kbc","Chi Param. Kbd","Chi Param. Kcd","scale","Background"}126 Edit smear_ coefnames_rpa,smear_coefvalues_rpa122 Make/O/D smear_coef_rpa = {5,5,5,5,-.0004,-.0004,-.0004,-.0004,-.0004,-.0004,1,0} 123 make/o/t smear_parameters_rpa = {"Seg. Length ba","Seg. Length bb","Seg. Length bc","Seg. Length bd","Chi Param. Kab","Chi Param. Kac","Chi Param. Kad","Chi Param. Kbc","Chi Param. Kbd","Chi Param. Kcd","scale","Background"} 124 Edit smear_parameters_rpa,smear_coef_rpa 127 125 ENDIF 128 126 … … 145 143 146 144 /////////////////////////////////////////////////////////////// 147 148 Function RPAForm(w,x) : FitFunc 145 //AAO version, uses XOP if available 146 // simply calls the original single point calculation with 147 // a wave assignment (this will behave nicely if given point ranges) 148 Function RPAForm(cw,yw,xw) : FitFunc 149 Wave cw,yw,xw 150 151 #if exists("RPAFormX") 152 yw = RPAFormX(cw,xw) 153 #else 154 yw = fRPAForm(cw,xw) 155 #endif 156 return(0) 157 End 158 159 160 Function fRPAForm(w,x) : FitFunc 149 161 Wave w 150 162 Variable x 163 151 164 Wave var=$"inputvalues" 152 165 Nvar lCASE=gCASE
Note: See TracChangeset
for help on using the changeset viewer.