54 | | Test your new model by runing compare.py to verify that the converted model is giving the same results as it did in SasView prior to conversion |
| 56 | Test your new model by runing compare.py to verify that the converted model is giving the same results as it did in SasView prior to conversion. In order to do this, you need either a version of sasview installed in your python path, or a built sasview in a checked out directory at the same level as the checked out sasmodels repository. |
| 57 | |
| 58 | 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 | 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 | ''' |
| 63 | ./compare.sh -1d modelname |
| 64 | ''' |
| 65 | |
| 66 | 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. |
| 67 | |
| 68 | If the model has 2D orientational calculation, then you should additionally test with: |
| 69 | |
| 70 | ''' |
| 71 | ./compare.sh -2d modelname |
| 72 | ''' |
| 73 | |
| 74 | Brief help for the comparison script can be obtained by just running '''./compare.sh''' |
| 75 | |