Changes between Version 4 and Version 5 of ModelConvInst


Ignore:
Timestamp:
Nov 1, 2015 6:34:32 PM (9 years ago)
Author:
butler
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ModelConvInst

    v4 v5  
    66- As a python wrapper with separate C code : Example - barbell.py 
    77 
    8 The documentation for the sasmodels package can be found at http://www.sasview.org/sasmodels/ (not very pretty at the moment) 
     8The documentation for the sasmodels package can be found at http://www.sasview.org/sasmodels/ 
    99 
    1010Before following the conversion instructions below, it is worth reading the documentation at http://www.sasview.org/sasmodels/api/generate.html#module-sasmodels.generate which describes the structure of a model. 
     
    4444  - the c file must contain the Iq and Iqxy methods.  These and any other functions defined (e.g. form_volume, radius, etc) must be defined as doubles in the first lines of the file. 
    4545- 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). 
     46- For certain models, namely core shell type models, the VR attribute returns the volume ratio for the core-shell. 
    4647- demo is a dictionary containing the value of each parameter as given in the rst documentation.  Make sure to enter the appropriate values from that documentation.  This will then be used to generate the example curve in said documentation. 
    4748- oldname is the name for this model used in !SasView.  Make sure to put the correct original name.  This is required for the transition to allow compatibility. 
     
    5859If the latter, you need to add the sasview build directory to your PYTHONPATH or use compare.sh which will do so for you. 
    5960 
    60 The first thing to test is that you are getting the same answer as SasView for the 1D version of the model. This is done with: 
     61The first thing to test is that you are getting the same answer as !SasView for the 1D version of the model. This is done with: 
    6162 
    62 ''' 
     63{{{ 
    6364./compare.sh -1d modelname  
    64 ''' 
     65}}} 
    6566 
    6667This will result in some comparison metrics between the openCL implementation (if installed - should revert to using ctypes if no OpenCL is installed) and a plot of the two calculations and a comparison plot. 
     
    6869If the model has 2D orientational calculation, then you should additionally test with: 
    6970 
    70 ''' 
     71{{{ 
    7172./compare.sh -2d modelname 
    72 ''' 
     73}}} 
    7374 
    7475Brief help for the comparison script can be obtained by just running '''./compare.sh'''