Changeset 258


Ignore:
Timestamp:
Feb 12, 2008 4:37:32 PM (15 years ago)
Author:
srkline
Message:

changes to method for fitting slope as data is loaded - added constraints and initial guess.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v4.00/USANS_SlitSmearing_v40.ipf

    r252 r258  
    6666        String baseStr 
    6767         
    68         NVAR USANS_m,USANS_slope_numpnts 
     68//      NVAR USANS_m,USANS_slope_numpnts 
     69        NVAR USANS_m = $("root:"+baseStr+":USANS_m") 
     70        NVAR USANS_slope_numpnts = $("root:"+baseStr+":USANS_slope_numpnts") 
     71 
    6972         
    7073//      Variable slope=-4 
     
    108111        Variable nend 
    109112         
    110         NVAR USANS_m 
     113//      NVAR USANS_m 
     114        NVAR USANS_m = $("root:"+baseStr+":USANS_m") 
    111115         
    112116        Wave iw = $(basestr+"_i") 
     
    144148         
    145149                Make/O/D P_coef={0,1,-4}                        //input 
    146         //      Make/O/T Constr={"K2<0","K2 > -20"} 
     150                Make/O/T Constr={"K2<0","K2 > -8"} 
    147151                //(set background to zero and hold fixed) 
    148                 CurveFit/H="100" Power kwCWave=P_coef  iw[(num-1-nend),(num-1)] /X=qw /W=sw  
     152                // initial guess  
     153                P_coef[1] = iw[num-1]/qw[num-1]^P_coef[2] 
     154                 
     155                CurveFit/H="100" Power kwCWave=P_coef  iw[(num-1-nend),(num-1)] /X=qw /W=sw /C=constr 
    149156                extr_hqi=P_coef[0]+P_coef[1]*extr_hqq^P_coef[2] 
    150157         
     
    164171         
    165172        SVAR basestr =  root:Packages:NIST:USANS_basestr 
    166         NVAR USANS_m, USANS_slope_numpnts 
     173         
     174        NVAR USANS_m = $("root:"+baseStr+":USANS_m") 
     175        NVAR USANS_slope_numpnts = $("root:"+baseStr+":USANS_slope_numpnts") 
    167176         
    168177        strswitch (ctrlName) 
Note: See TracChangeset for help on using the changeset viewer.