Ignore:
Timestamp:
Mar 25, 2008 4:19:00 PM (16 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
6b8399b
Parents:
3db3895
Message:

Updated tests to reflect proper math (took test funcs from Igor). Still need to look into incoherence btw Igor docs and Igor code!

File:
1 edited

Legend:

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

    r3db3895 rf629e346  
    6767    def _Block(self,x): 
    6868         
     69         
     70         
    6971        return 1.0 + (math.sin((self.params['fractal_dim']-1.0) * math.atan(x * self.params['corr_length']))\ 
    7072             * self.params['fractal_dim'] * gamma(self.params['fractal_dim']-1.0))\ 
    71            /( math.pow( (x*self.params['radius']),self.params['fractal_dim'])*\ 
    72            ( 1.0 + 1.0/((x**2)*(self.params['corr_length']**2)),(self.params['fractal_dim']-1.0)/2.0))       
     73           /( math.pow( (x*self.params['radius']), self.params['fractal_dim'])*\ 
     74           math.pow( 1.0 + 1.0/((x**2)*(self.params['corr_length']**2)),(self.params['fractal_dim']-1.0)/2.0))    
    7375            
    7476    def _Spherical(self,x): 
    7577        """ 
    76             F(x) = [sin(x)-xcos(x)]/3*(x**3) 
     78            F(x) = 3*[sin(x)-xcos(x)]/x**3 
    7779        """ 
    78         return (math.sin(x)-x*math.cos(x))/(3.0*math.pow(x,3.0)) 
     80        return 3.0*(math.sin(x)-x*math.cos(x))/(math.pow(x,3.0)) 
    7981         
    8082    def _scatterRanDom(self,x): 
     
    8587        delta = self.params['block_sld']-self.params['solvent_sld'] 
    8688         
    87         return self.params['scale']* V *(delta**2)*\ 
     89        return 1.0e8*self.params['scale']* V *(delta**2)*\ 
    8890                (self._Spherical(x*self.params['radius'])**2) 
    8991         
Note: See TracChangeset for help on using the changeset viewer.