Changeset 08648c0 in sasview


Ignore:
Timestamp:
Feb 8, 2012 3:08:49 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
1b023334
Parents:
9cd0baa
Message:

more s king's fractal models: todo: doc, test

Files:
6 added
4 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/models.py

    r7289627 r08648c0  
    480480        self.shape_indep_list.append(FractalModel ) 
    481481        self.model_name_list.append(FractalModel.__name__) 
     482 
     483        from sans.models.MassFractalModel import MassFractalModel 
     484        self.shape_indep_list.append(MassFractalModel) 
     485        self.model_name_list.append(MassFractalModel.__name__) 
     486 
     487        from sans.models.SurfaceFractalModel import SurfaceFractalModel 
     488        self.shape_indep_list.append(SurfaceFractalModel) 
     489        self.model_name_list.append(SurfaceFractalModel.__name__) 
     490         
     491        from sans.models.MassSurfaceFractal import MassSurfaceFractal 
     492        self.shape_indep_list.append(MassSurfaceFractal) 
     493        self.model_name_list.append(MassSurfaceFractal.__name__) 
    482494         
    483495        from sans.models.FractalCoreShellModel import FractalCoreShellModel 
  • sansmodels/include/libmultifunc/libfunc.h

    r503a972 r08648c0  
    88double sinc(double x); 
    99 
     10double gamln(double x); 
     11 
    1012#endif 
  • sansmodels/src/c_models/c_models.cpp

    r7289627 r08648c0  
    5858void addCRPAModel(PyObject *module); 
    5959void addCFractalModel(PyObject *module); 
     60void addCMassSurfaceFractal(PyObject *module); 
     61void addCSurfaceFractalModel(PyObject *module); 
     62void addCMassFractalModel(PyObject *module); 
    6063void addCPoly_GaussCoil(PyObject *module); 
    6164 
     
    296299  addCRPAModel(m); 
    297300  addCFractalModel(m); 
    298 } 
     301  addCMassSurfaceFractal(m); 
     302  addCMassFractalModel(m); 
     303  addCSurfaceFractalModel(m); 
     304} 
  • sansmodels/src/c_models/libfunc.c

    r101065a r08648c0  
    6363        return sin(x)/x; 
    6464} 
     65 
     66double gamln(double xx) { 
     67 
     68    double x,y,tmp,ser; 
     69    static double cof[6]={76.18009172947146,-86.50532032941677, 
     70    24.01409824083091,-1.231739572450155, 
     71    0.1208650973866179e-2,-0.5395239384953e-5}; 
     72    int j; 
     73 
     74    y=x=xx; 
     75    tmp=x+5.5; 
     76    tmp -= (x+0.5)*log(tmp); 
     77    ser=1.000000000190015; 
     78    for (j=0;j<=5;j++) ser += cof[j]/++y; 
     79    return -tmp+log(2.5066282746310005*ser/x); 
     80} 
Note: See TracChangeset for help on using the changeset viewer.