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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.