Ignore:
Timestamp:
Jan 18, 2011 10:38:36 AM (14 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:
18b89c4
Parents:
1b02da1d
Message:

replaced math.pow to numpy.power since math.pow is not working with list of x values(remember we use the list in fitting for speed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/FractalCoreShellModel.py

    r8f20419d r18695bf  
    33from sans.models.CoreShellModel import CoreShellModel 
    44from scipy.special import gammaln 
    5 from math import exp, pow, sin, atan 
     5from math import exp, sin, atan 
     6from numpy import power 
    67from copy import deepcopy 
    78 
     
    7980        #calculate S(q) 
    8081        sq = Df*exp(gammaln(Df-1.0))*sin((Df-1.0)*atan(x*corr)) 
    81         sq /= pow((x*r0),Df) * pow((1.0 + 1.0/(x*corr*x*corr)),((Df-1)/2)) 
     82        sq /= power((x*r0),Df) * power((1.0 + 1.0/(x*corr*x*corr)),((Df-1)/2)) 
    8283        sq += 1.0 
    8384        return sq 
Note: See TracChangeset for help on using the changeset viewer.