Changes between Version 25 and Version 26 of ModelConvInst


Ignore:
Timestamp:
Dec 21, 2015 1:35:35 PM (9 years ago)
Author:
pkienzle
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ModelConvInst

    v25 v26  
    6868   - Iq.vectorized = True or False. This is used to tag the definition as accepting a Q vector, or having to compute each Q individually. 
    6969    - use functions from numpy rather than math 
    70     - don't use if statements.  Instead do tricks like "a = x*(q>0) + y*(q<=0)" which sets a to x if q is positive or y if q is zero  
     70    - don't use if statements.  Instead do tricks like "a = x*(q>0) + y*(q<=0)" which sets a to x if q is positive or y if q is zero or negative 
     71    - return np.NaN if the parameters are not valid (e.g., cap_radius < radius for barbell) 
    7172  - def Iqxy.  If this model does not have an oriented form just set it equal to the square root of the sum of Iq(x) squared and Iq(y) squared. 
    7273  - [https://github.com/SasView/sasview/tree/master/src/sas/models src/sas/models] contains the pure python models, mixed together with the python + C models.  
     
    8182  }}} 
    8283  - the c file must contain the form_volume, Iq, Iqxy methods. These and any other functions defined (e.g. the _cyl() helper function) must be defined as doubles in the first lines of the file. 
     84  - return NAN if the parameters are not valid (e.g., cap_radius < radius for barbell) 
    8385 - ''NOTE: for certain models, such as those that can be multiplied by a structure factor, the ER attribute should be set to the Equivalent Radius (of a sphere).'' 
    8486 - ''NOTE: for certain models, namely core-shell type models, the VR attribute returns the volume ratio for the core-shell.''