Changes between Version 4 and Version 5 of ModelConvInst
- Timestamp:
- Nov 1, 2015 6:34:32 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ModelConvInst
v4 v5 6 6 - As a python wrapper with separate C code : Example - barbell.py 7 7 8 The documentation for the sasmodels package can be found at http://www.sasview.org/sasmodels/ (not very pretty at the moment)8 The documentation for the sasmodels package can be found at http://www.sasview.org/sasmodels/ 9 9 10 10 Before 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. … … 44 44 - 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. 45 45 - 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. 46 47 - 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. 47 48 - 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. … … 58 59 If the latter, you need to add the sasview build directory to your PYTHONPATH or use compare.sh which will do so for you. 59 60 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:61 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: 61 62 62 ''' 63 {{{ 63 64 ./compare.sh -1d modelname 64 ''' 65 }}} 65 66 66 67 This 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. … … 68 69 If the model has 2D orientational calculation, then you should additionally test with: 69 70 70 ''' 71 {{{ 71 72 ./compare.sh -2d modelname 72 ''' 73 }}} 73 74 74 75 Brief help for the comparison script can be obtained by just running '''./compare.sh'''