1 | cylinder.c + cylinder.py is the cylinder model with renamed variables and |
---|
2 | sld scaled by 1e6 so the numbers are nicer. The model name is "cylinder" |
---|
3 | |
---|
4 | cylinder_clone.c + cylinder_clone.py is the cylinder model using the |
---|
5 | same interface as the sasview, including calling the model CylinderModel, |
---|
6 | so that it can be used as a drop-in replacement for the sasview cylinder |
---|
7 | model. |
---|
8 | |
---|
9 | cylindermodel_onefile.py is cylinder.c+cylinder.py merged into one file. |
---|
10 | This doesn't actually run yet since sasmodels.gen has not been updated |
---|
11 | to support it. It exists as a proposal. Note that the function declaration |
---|
12 | has been removed since there is enough information in the parameter |
---|
13 | definitions to generate it automatically. Note also that "source" which |
---|
14 | used to be all the source has been renamed "includes". |
---|
15 | |
---|
16 | One-file models could coexist with the py+c file models by checking for the |
---|
17 | existence of c_blah and creating the appropriate function wrappers. These |
---|
18 | would be appended after any include files. You shouldn't mix the two forms |
---|
19 | within a single model since form_volume needs to be defined before |
---|
20 | Iq/Iqxy but after the libraries. |
---|
21 | |
---|
22 | Note: may want to rename form_volume to calc_volume and Iq/Iqxy to |
---|
23 | calc_Iq/calc_Iqxy in both the c+py and the one file forms so that the |
---|
24 | names are more predictable. Similarly ER/VR go to calc_ER/calc_VR. |
---|
25 | |
---|
26 | Note: It is possible to translate python code automatically to opencl, using |
---|
27 | something like numba, clyther, shedskin or pypy. |
---|
28 | |
---|
29 | Magnetism hasn't been implemented yet. We may want a separate Imagnetic |
---|
30 | calculator with the extra parameters and calculations. We should |
---|
31 | return all desired spin states together so we can share the work of |
---|
32 | computing the form factors for the different magnetic contrasts. This |
---|
33 | will mean extending the data handler to support multiple cross sections |
---|
34 | in the same data set. |
---|