Ignore:
Timestamp:
Jul 26, 2007 9:51:43 AM (16 years ago)
Author:
srkline
Message:

-Fixed RPA and HPMSA functions to be up-to-date and use data folders properly for the smeared calculations.

-Changed the coef/param naming scheme for RPA to be consistent with all other models.

-SANSModelPicker now finds Smeared Plot Procs with the correct number of parameters to populate the menus

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  
    55// wave that must be carried into the function. 
    66// 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 models 
    9 // - it would be nice for users to make all models have a consistent naming scheme 
    107// 
    118// 
     
    4037                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"} 
    4138                Edit inputnames,inputvalues 
    42                 Make/O/D coefvalues_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_rpa 
     39                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 
    4542        ENDIF 
    4643 
     
    4946                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"} 
    5047                Edit inputnames,inputvalues 
    51                 Make/O/D coefvalues_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_rpa 
     48                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 
    5451        ENDIF 
    5552 
     
    5855                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"} 
    5956                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) 
    6664        Display ywave_rpa vs xwave_rpa 
    6765//      ModifyGraph log=1,marker=29,msize=2,mode=4 
     
    104102                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"} 
    105103                Edit inputnames,inputvalues 
    106                 Make/O/D smear_coefvalues_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_rpa 
     104                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 
    109107        ENDIF 
    110108 
     
    113111                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"} 
    114112                Edit inputnames,inputvalues 
    115                 Make/O/D smear_coefvalues_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_rpa 
     113                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 
    118116        ENDIF 
    119117 
     
    122120                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"} 
    123121                Edit inputnames,inputvalues 
    124                 Make/O/D smear_coefvalues_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_rpa 
     122                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 
    127125        ENDIF 
    128126         
     
    145143 
    146144/////////////////////////////////////////////////////////////// 
    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) 
     148Function 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) 
     157End 
     158 
     159 
     160Function fRPAForm(w,x) : FitFunc 
    149161        Wave w 
    150162        Variable x 
     163         
    151164        Wave var=$"inputvalues" 
    152165        Nvar lCASE=gCASE 
Note: See TracChangeset for help on using the changeset viewer.