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/CorrLengthModel.py

    r8f20419d r18695bf  
    55 
    66from sans.models.BaseComponent import BaseComponent 
    7 from math import pow 
     7from numpy import power 
    88 
    99class CorrLengthModel(BaseComponent): 
     
    5757        inten = self.params['scale_p']/pow(x,self.params['exponent_p']) 
    5858        inten += self.params['scale_l']/(1.0 + \ 
    59                 pow((x*self.params['length_l']),self.params['exponent_l'])) 
     59                power((x*self.params['length_l']),self.params['exponent_l'])) 
    6060        inten += self.params['background'] 
    6161 
Note: See TracChangeset for help on using the changeset viewer.