Changeset 8d97277 in sasview for sansmodels


Ignore:
Timestamp:
Mar 31, 2010 1:36:22 PM (15 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:
7dca26e
Parents:
f10063e
Message:

changed scale definition to be uncorrelated with length: due to the recent NIST code changes

File:
1 edited

Legend:

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

    r1ed3834 r8d97277  
    1313        Class that evaluates a DAB model. 
    1414         
    15         F(x) = scale/( 1 + (x*L)^2 )^(2) + background 
     15        F(x) = scale*(L^3)/( 1 + (x*L)^2 )^(2) + background 
    1616         
    1717        The model has three parameters:  
     
    2929        ## Name of the model 
    3030        self.name = "DAB_Model" 
    31         self.description="""F(x) = scale/( 1 + (x*L)^2 )^(2) + background 
     31        self.description="""F(x) = scale*(L^3)/( 1 + (x*L)^2 )^(2) + background 
    3232         
    3333        The model has three parameters:  
     
    5050    def _DAB(self, x): 
    5151        """ 
    52             Evaluate  F(x) = scale/( 1 + (x*L)^2 )^(2) + background 
     52            Evaluate  F(x) = (scale*L^3)/( 1 + (x*L)^2 )^(2) + background 
    5353            
    5454        """ 
    55         return self.params['scale']/math.pow(( 1 + math.pow(x * self.params['length'],2)),2) \ 
     55        # According to SRK (Igor/NIST code: 6 JUL 2009  changed definition of 'scale' to be uncorrelated with 'length') 
     56        return self.params['scale']*math.pow(self.params['length'],3)/math.pow(( 1 + math.pow(x * self.params['length'],2)),2) \ 
    5657         + self.params['background'] 
    5758        
Note: See TracChangeset for help on using the changeset viewer.