Changeset 273a6d7 in sasview for src/sas/sascalc/calculator


Ignore:
Timestamp:
Mar 24, 2016 1:38:02 AM (9 years ago)
Author:
wojciech
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:
c31dcdb1
Parents:
197260f (diff), e81f6dd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/SasView/sasview

Location:
src/sas/sascalc/calculator
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/calculator/BaseComponent.py

    r74c5521 r53aa66d  
    119119            q = [q[0], q[1], q[2], ....] 
    120120 
    121         ..note:: 
    122           Due to 2D speed issue, no anisotropic scattering 
    123           is supported for python models, thus C-models should have 
    124           their own evalDistribution methods. 
     121        .. note:: Due to 2D speed issue, no anisotropic scattering 
     122                  is supported for python models, thus C-models should have 
     123                  their own evalDistribution methods. 
    125124 
    126125        The method is then called the following way: :: 
  • src/sas/sascalc/calculator/c_extensions/libfunc.c

    r9e531f2 r197260f  
    8787} 
    8888 
    89  
     89/* 
    9090double gamln(double xx) { 
    9191 
     
    103103    return -tmp+log(2.5066282746310005*ser/x); 
    104104} 
    105  
     105*/ 
    106106// calculate magnetic sld and return total sld 
    107107// bn : contrast (not just sld of the layer) 
     
    236236 
    237237/** 
    238    Implements eq 6.2.5 (small gamma) of Numerical Recipes in C, essentially 
    239    the incomplete gamma function multiplied by the gamma function. 
    240    Required for implementation of fast error function (erf) 
     238Wojtek's comment Mar 22 2016: The remaing code can mostly likely be deleated 
     239Keeping it in order to check if it is not breaking anything 
    241240**/ 
    242241 
     
    250249  float sum,del,ap; 
    251250 
    252   *gln = gamln(a); 
     251  *gln = lgamma(a); 
    253252  if(x <= 0.0) { 
    254253    if (x < 0.0) printf("Error: x less than 0 in routine gser"); 
     
    280279   representation 
    281280**/ 
    282  
    283281void gcf(float *gammcf, float a, float x, float *gln) { 
    284282  int i; 
    285283  float an,b,c,d,del,h; 
    286284 
    287   *gln = gamln(a); 
     285  *gln = lgamma(a); 
    288286  b = x+1.0-a; 
    289287  c = 1.0/FPMIN; 
     
    307305} 
    308306 
    309  
    310307/** 
    311308   Represents incomplete error function, P(a,x) 
     
    322319  } 
    323320} 
    324  
    325321/** 
    326322    Implementation of the error function, erf(x) 
    327323**/ 
    328  
    329324float erff(float x) { 
    330325  return x < 0.0 ? -gammp(0.5,x*x) : gammp(0.5,x*x); 
    331326} 
    332  
Note: See TracChangeset for help on using the changeset viewer.