Changes in src/sas/sasgui/perspectives/fitting/media/plugin.rst [e081946:96f00a0] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/media/plugin.rst
re081946 r96f00a0 19 19 code monkeys!) 20 20 21 **What follows below is quite technical. If you just want a helping hand to get22 started creating your own models see** :ref:`Adding_your_own_models`.23 24 21 Overview 25 22 ^^^^^^^^ … … 49 46 50 47 Other models are available for download from our 51 `Model Marketplace <http://marketplace.sasview.org/>`_. You can contribute your own models to the 48 `Model Marketplace <http://marketplace.sasview.org/>`_. You can contribute your own models to the 52 49 Marketplace aswell. 53 50 … … 83 80 - without any capitalization or CamelCase 84 81 - without incorporating the word "model" 85 - examples: *barbell* **not** *BarBell*; *broad_peak* **not** *BroadPeak*; 82 - examples: *barbell* **not** *BarBell*; *broad_peak* **not** *BroadPeak*; 86 83 *barbell* **not** *BarBellModel* 87 84 … … 103 100 at the top of the *.py* file 104 101 - what you write here is abstracted into the SasView help documentation 105 - this is what other users will refer to when they want to know what your model does; 102 - this is what other users will refer to when they want to know what your model does; 106 103 so please be helpful! 107 104 … … 128 125 converted/created the model file 129 126 130 Models that do not conform to these requirements will *never* be incorporated 127 Models that do not conform to these requirements will *never* be incorporated 131 128 into the built-in library. 132 129 … … 309 306 defines the parameters that form the model. 310 307 311 **Note: The order of the parameters in the definition will be the order of the 312 parameters in the user interface and the order of the parameters in Iq(), 313 Iqxy() and form_volume(). And** *scale* **and** *background* **parameters are 308 **Note: The order of the parameters in the definition will be the order of the 309 parameters in the user interface and the order of the parameters in Iq(), 310 Iqxy() and form_volume(). And** *scale* **and** *background* **parameters are 314 311 implicit to all models, so they do not need to be included in the parameter table.** 315 312 … … 492 489 and it includes orientation parameters. 493 490 494 *form_volume* defines the volume of the shape. As in python models, it 491 *form_volume* defines the volume of the shape. As in python models, it 495 492 includes only the volume parameters. 496 493 … … 626 623 627 624 sas_gamma(x): 628 Gamma function $\text{sas_gamma}(x) = \Gamma(x)$.625 Gamma function sas_gamma\ $(x) = \Gamma(x)$. 629 626 630 627 The standard math function, tgamma(x) is unstable for $x < 1$ … … 636 633 sas_erf(x), sas_erfc(x): 637 634 Error function 638 $\text{sas_erf}(x) = \frac{2}{\sqrt\pi}\int_0^x e^{-t^2}\,dt$635 sas_erf\ $(x) = \frac{2}{\sqrt\pi}\int_0^x e^{-t^2}\,dt$ 639 636 and complementary error function 640 $\text{sas_erfc}(x) = \frac{2}{\sqrt\pi}\int_x^{\infty} e^{-t^2}\,dt$.637 sas_erfc $(x) = \frac{2}{\sqrt\pi}\int_x^{\infty} e^{-t^2}\,dt$. 641 638 642 639 The standard math functions erf(x) and erfc(x) are slower and broken … … 647 644 648 645 sas_J0(x): 649 Bessel function of the first kind $\text{sas_J0}(x)=J_0(x)$ where646 Bessel function of the first kind sas_J0\ $(x)=J_0(x)$ where 650 647 $J_0(x) = \frac{1}{\pi}\int_0^\pi \cos(x\sin(\tau))\,d\tau$. 651 648 … … 656 653 657 654 sas_J1(x): 658 Bessel function of the first kind $\text{sas_J1}(x)=J_1(x)$ where655 Bessel function of the first kind sas_J1\ $(x)=J_1(x)$ where 659 656 $J_1(x) = \frac{1}{\pi}\int_0^\pi \cos(\tau - x\sin(\tau))\,d\tau$. 660 657 … … 666 663 sas_JN(n, x): 667 664 Bessel function of the first kind and integer order $n$: 668 $\text{sas_JN}(n, x)=J_n(x)$ where665 sas_JN\ $(n, x)=J_n(x)$ where 669 666 $J_n(x) = \frac{1}{\pi}\int_0^\pi \cos(n\tau - x\sin(\tau))\,d\tau$. 670 667 If $n$ = 0 or 1, it uses sas_J0(x) or sas_J1(x), respectively. … … 676 673 677 674 sas_Si(x): 678 Sine integral $\text{Si}(x) = \int_0^x \tfrac{\sin t}{t}\,dt$.675 Sine integral Si\ $(x) = \int_0^x \tfrac{\sin t}{t}\,dt$. 679 676 680 677 This function uses Taylor series for small and large arguments: … … 701 698 sas_3j1x_x(x): 702 699 Spherical Bessel form 703 $\text{sph_j1c}(x) = 3 j_1(x)/x = 3 (\sin(x) - x \cos(x))/x^3$,700 sph_j1c\ $(x) = 3 j_1(x)/x = 3 (\sin(x) - x \cos(x))/x^3$, 704 701 with a limiting value of 1 at $x=0$, where $j_1(x)$ is the spherical 705 702 Bessel function of the first kind and first order. … … 712 709 713 710 sas_2J1x_x(x): 714 Bessel form $\text{sas_J1c}(x) = 2 J_1(x)/x$, with a limiting value711 Bessel form sas_J1c\ $(x) = 2 J_1(x)/x$, with a limiting value 715 712 of 1 at $x=0$, where $J_1(x)$ is the Bessel function of first kind 716 713 and first order. … … 835 832 one return value for each point in the mesh grid. 836 833 837 *NOTE: we may be removing or modifying this feature soon. As of the 834 *NOTE: we may be removing or modifying this feature soon. As of the 838 835 time of writing, core-shell sphere returns (1., 1.) for VR, giving a volume 839 836 ratio of 1.0.* … … 881 878 ............... 882 879 883 Either open the :ref:`Python_shell` (*Tools* > *Python Shell/Editor*) or the :ref:`Advanced_Plugin_Editor` (*Fitting* > *Plugin Model Operations* > *Advanced 884 Plugin Editor*), load your model, and then select *Run > Check Model* from the 880 Either open the :ref:`Python_shell` (*Tools* > *Python Shell/Editor*) or the :ref:`Advanced_Plugin_Editor` (*Fitting* > *Plugin Model Operations* > *Advanced 881 Plugin Editor*), load your model, and then select *Run > Check Model* from the 885 882 menu bar. 886 883 887 An *Info* box will appear with the results of the compilation and a check that 884 An *Info* box will appear with the results of the compilation and a check that 888 885 the model runs. 889 886 … … 950 947 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 951 948 952 **NB: For now we are not providing pylint with the installer version of SasView; 949 **NB: For now we are not providing pylint with the installer version of SasView; 953 950 so unless you have a SasView build environment available, you can ignore this section!** 954 951
Note: See TracChangeset
for help on using the changeset viewer.