Ignore:
Timestamp:
Nov 15, 2007 11:27:16 AM (15 years ago)
Author:
srkline
Message:

Changed 2D model calculations to use a FIXED 25 integration points in an effort to get the number of integration points out of the fitting coefficient wave.

Added "Freeze Model" back to the SANS Models menu

Added the 2D model functions to the list on the model picker

Minor tweaks to the wrapper

Location:
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/CoreShellCyl2D.ipf

    r198 r200  
    2525         
    2626        // Setup parameter table for model function 
    27         make/O/T/N=15 parameters_CSCyl2D 
    28         Make/O/D/N=15 coef_CSCyl2D 
     27//      make/O/T/N=15 parameters_CSCyl2D 
     28//      Make/O/D/N=15 coef_CSCyl2D 
     29        make/O/T/N=14 parameters_CSCyl2D 
     30        Make/O/D/N=14 coef_CSCyl2D 
    2931         
    3032        coef_CSCyl2D[0] = 1.0 
     
    4244        coef_CSCyl2D[12] = 0.0 
    4345        coef_CSCyl2D[13] = 0.0 
    44         coef_CSCyl2D[14] = 10 
     46        //hard-wire the number of integration points 
     47//      coef_CSCyl2D[14] = 10 
    4548         
    4649        parameters_CSCyl2D[0] = "Scale" 
     
    5861        parameters_CSCyl2D[12] = "Sigma of polydisp in Theta [rad]" 
    5962        parameters_CSCyl2D[13] = "Sigma of polydisp in Phi [rad]" 
    60         parameters_CSCyl2D[14] = "Num of polydisp points" 
     63//      parameters_CSCyl2D[14] = "Num of polydisp points" 
    6164         
    6265        Edit parameters_CSCyl2D,coef_CSCyl2D                                     
     
    103106//       
    104107//#if exists("CoreShellCylinderModel_D") 
    105 //      zw = CoreShellCylinderModel_D(cw,xw,yw) 
     108//      Make/O/D/N=15 CSCyl2D_tmp 
     109//      CSCyl2D_tmp = cw 
     110//      CSCyl2D_tmp[14] = 25 
     111// 
     112//      zw = CoreShellCylinderModel_D(CSCyl2D_tmp,xw,yw) 
     113//       
     114////    zw = CoreShellCylinderModel_D(cw,xw,yw) 
    106115//#else 
    107116//      Abort "You do not have the SANS Analysis XOP installed" 
     
    117126         
    118127#if exists("CoreShellCylinderModel_D")                  //to hide the function if XOP not installed 
    119         zw[p1,p2]= CoreShellCylinderModel_D(cw,xw,yw) 
     128 
     129        Make/O/D/N=15 CSCyl2D_tmp 
     130        CSCyl2D_tmp = cw 
     131        CSCyl2D_tmp[14] = 25 
     132 
     133        zw[p1,p2]= CoreShellCylinderModel_D(CSCyl2D_tmp,xw,yw) 
     134         
    120135#endif 
    121136 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/Cylinder_2D.ipf

    r198 r200  
    22#pragma IgorVersion=6.0 
    33 
    4 // "simple" version of 2D function 
    54// 
    65// The plotting macro sets up TWO dependencies 
     
    2524        SetDataFolder $("root:"+str) 
    2625         
    27          
    2826        // NOTE THAT THE COEFFICIENTS [N] ARE IN A DIFFERENT ORDER !!! 
    2927        // Setup parameter table for model function 
    30         make/O/T/N=11 parameters_Cyl2D 
    31         Make/O/D/N=11 coef_Cyl2D 
     28//      make/O/T/N=11 parameters_Cyl2D 
     29//      Make/O/D/N=11 coef_Cyl2D 
     30        make/O/T/N=10 parameters_Cyl2D 
     31        Make/O/D/N=10 coef_Cyl2D 
    3232        coef_Cyl2D[0] = 1.0 
    3333        coef_Cyl2D[1] = 20.0 
     
    4040        coef_Cyl2D[8] = 0.0 
    4141        coef_Cyl2D[9] = 0.0 
    42         coef_Cyl2D[10] = 25 
     42         
     43        // currently, the number of integration points is hard-wired to be 25 in Cylinder2D_T 
     44        //coef_Cyl2D[10] = 25 
    4345        // 
    4446        parameters_Cyl2D[0] = "Scale" 
     
    5456        parameters_Cyl2D[7] = "Sigma of polydisp in Radius [A]"         //***** 
    5557         
    56         parameters_Cyl2D[10] = "number of integration points" 
     58//      parameters_Cyl2D[10] = "number of integration points" 
    5759 
    5860        Edit parameters_Cyl2D,coef_Cyl2D                                         
     
    99101//       
    100102//#if exists("CylinderModel_D") 
    101 //      zw = CylinderModel_D(cw,xw,yw) 
     103// 
     104//      Make/O/D/N=11 Cyl2D_tmp                         // there seems to be no speed penalty for doing this... 
     105//      Cyl2D_tmp = cw 
     106//      Cyl2D_tmp[10] = 25                                      // hard-wire the number of integration points 
     107//       
     108//      zw= CylinderModel_D(Cyl2D_tmp,xw,yw) 
     109// 
     110//      //zw = CylinderModel_D(cw,xw,yw) 
    102111//#else 
    103112//      Abort "You do not have the SANS Analysis XOP installed" 
     
    113122         
    114123#if exists("CylinderModel_D")                   //to hide the function if XOP not installed 
    115         zw[p1,p2]= CylinderModel_D(cw,xw,yw) 
     124 
     125        Make/O/D/N=11 Cyl2D_tmp                         // there seems to be no speed penalty for doing this... 
     126        Cyl2D_tmp = cw 
     127        Cyl2D_tmp[10] = 25                                      // hard-wire the number of integration points 
     128         
     129        zw[p1,p2]= CylinderModel_D(Cyl2D_tmp,xw,yw) 
     130 
    116131#endif 
    117132 
     
    134149        variable mt= ThreadGroupCreate(nthreads) 
    135150 
     151//      Variable t1=StopMSTimer(-2) 
     152         
    136153        for(i=0;i<nthreads;i+=1) 
    137154        //      Print (i*npt/nthreads),((i+1)*npt/nthreads-1) 
     
    145162        variable dummy= ThreadGroupRelease(mt) 
    146163         
     164//      Print "elapsed time = ",(StopMSTimer(-2) - t1)/1e6 
     165         
    147166        return(0) 
    148167End 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/Ellipsoid2D.ipf

    r198 r200  
    22#pragma IgorVersion=6.0 
    33 
     4// 
     5// !!! FOR THE ELLIPSOID, THE ANGLE THETA IS DEFINED FROM ???? 
    46// 
    57// The plotting macro sets up TWO dependencies 
     
    2527         
    2628        // Setup parameter table for model function 
    27         make/O/T/N=12 parameters_Ellip2D 
    28         Make/O/D/N=12 coef_Ellip2D 
     29//      make/O/T/N=12 parameters_Ellip2D 
     30//      Make/O/D/N=12 coef_Ellip2D 
     31        make/O/T/N=11 parameters_Ellip2D 
     32        Make/O/D/N=11 coef_Ellip2D 
    2933         
    3034        coef_Ellip2D[0] = 1.0 
     
    3943        coef_Ellip2D[9] = 0.0 
    4044        coef_Ellip2D[10] = 0.0 
    41         coef_Ellip2D[11] = 10 
     45        // hard-wire the number of integration points 
     46//      coef_Ellip2D[11] = 10 
    4247         
    4348        parameters_Ellip2D[0] = "Scale" 
     
    5257        parameters_Ellip2D[9] = "Sigma of polydisp in Theta [rad]" 
    5358        parameters_Ellip2D[10] = "Sigma of polydisp in Phi [rad]" 
    54         parameters_Ellip2D[11] = "Num of polydisp points" 
     59         
     60//      parameters_Ellip2D[11] = "Num of polydisp points" 
    5561 
    5662         
     
    98104//       
    99105//#if exists("EllipsoidModel_D") 
    100 //      zw = EllipsoidModel_D(cw,xw,yw) 
     106// 
     107//      Make/O/D/N=12 Ellip2D_tmp 
     108//      Ellip2D_tmp = cw 
     109//      Ellip2D_tmp[11] = 25 
     110//       
     111//      zw = EllipsoidModel_D(Ellip2D_tmp,xw,yw) 
     112//       
     113////    zw = EllipsoidModel_D(cw,xw,yw) 
    101114//#else 
    102115//      Abort "You do not have the SANS Analysis XOP installed" 
     
    112125         
    113126#if exists("EllipsoidModel_D")                  //to hide the function if XOP not installed 
    114         zw[p1,p2]= EllipsoidModel_D(cw,xw,yw) 
     127 
     128        Make/O/D/N=12 Ellip2D_tmp 
     129        Ellip2D_tmp = cw 
     130        Ellip2D_tmp[11] = 25 
     131         
     132        zw[p1,p2]= EllipsoidModel_D(Ellip2D_tmp,xw,yw) 
     133         
    115134#endif 
    116135 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Models_2D/EllipticalCylinder2D.ipf

    r198 r200  
    2525         
    2626        // Setup parameter table for model function 
    27         make/O/T/N=14 parameters_EllCyl2D 
    28         Make/O/D/N=14 coef_EllCyl2D 
    29                  
     27        //make/O/T/N=14 parameters_EllCyl2D 
     28        //Make/O/D/N=14 coef_EllCyl2D 
     29        make/O/T/N=13 parameters_EllCyl2D 
     30        Make/O/D/N=13 coef_EllCyl2D 
     31         
    3032        coef_EllCyl2D[0] = 1.0 
    3133        coef_EllCyl2D[1] = 20.0 
     
    4143        coef_EllCyl2D[11] = 0.0 
    4244        coef_EllCyl2D[12] = 0.0 
    43         coef_EllCyl2D[13] = 10 
     45         
     46        // now hard-wire the # of integration points 
     47        //coef_EllCyl2D[13] = 25 
    4448                 
    4549        parameters_EllCyl2D[0] = "Scale" 
     
    5660        parameters_EllCyl2D[11] = "Sigma of polydisp in Theta [rad]" 
    5761        parameters_EllCyl2D[12] = "Sigma of polydisp in Phi [rad]" 
    58         parameters_EllCyl2D[13] = "Num of polydisp points" 
     62        //parameters_EllCyl2D[13] = "Num of polydisp points" 
    5963         
    6064        Edit parameters_EllCyl2D,coef_EllCyl2D                                   
     
    101105//       
    102106//#if exists("EllipticalCylinderModel_D") 
    103 //      zw = EllipticalCylinderModel_D(cw,xw,yw) 
     107// 
     108//      Make/O/D/N=14 EllCyl2D_tmp 
     109//      EllCyl2D_tmp = cw 
     110//      EllCyl2D_tmp[13] = 25 
     111//       
     112//      zw = EllipticalCylinderModel_D(EllCyl2D_tmp,xw,yw) 
     113//       
     114////    zw = EllipticalCylinderModel_D(cw,xw,yw) 
    104115//#else 
    105116//      Abort "You do not have the SANS Analysis XOP installed" 
     
    115126         
    116127#if exists("EllipticalCylinderModel_D")                 //to hide the function if XOP not installed 
    117         zw[p1,p2]= EllipticalCylinderModel_D(cw,xw,yw) 
     128 
     129        Make/O/D/N=14 EllCyl2D_tmp 
     130        EllCyl2D_tmp = cw 
     131        EllCyl2D_tmp[13] = 25 
     132         
     133        zw[p1,p2]= EllipticalCylinderModel_D(EllCyl2D_tmp,xw,yw) 
     134         
    118135#endif 
    119136 
Note: See TracChangeset for help on using the changeset viewer.