Changeset 3e1c9e5 in sasview for src/sas/sasgui/perspectives/fitting/media/plugin.rst
- Timestamp:
- Oct 10, 2016 5:52:25 PM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- d472e86, 49e000b
- Parents:
- f2261c2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/media/plugin.rst
r7e6bdf9 r3e1c9e5 9 9 ^^^^^^^^^^^^ 10 10 11 There are currently two ways to add your own models to SasView: 12 13 * Using the :ref:`Custom_Model_Editor` 14 * By Writing a Plugin Model 15 16 The Custom Model Editor lets you combine *existing* SasView library models. For anything more 17 complex, or if you want to apply polydispersity to parameters, you will need to write a Plugin Model. 11 There are essentially three ways to generate new fitting models for SasView: 12 13 * Using the SasView :ref:`New_Plugin_Model` helper dialog (best for beginners and/or relatively simple models) 14 * By copying/editing an existing model (this can include models generated by the *New Plugin Model* dialog) in the :ref:`Python_shell` or :ref:`Advanced_Plugin_Editor` as described below (suitable for all use cases) 15 * By writing a model from scratch outside of SasView (only recommended for code monkeys!) 18 16 19 17 Overview … … 22 20 If you write your own model and save it to the the SasView *plugin_models* folder 23 21 24 *C:\\Users\\ [username]\\.sasview\\plugin_models* (on Windows)22 *C:\\Users\\{username}\\.sasview\\plugin_models* (on Windows) 25 23 26 24 the next time SasView is started it will compile the plugin and add 27 it to the list of * CustomizedModels* in a FitPage.28 29 SasView has three ways of writing models:30 31 - A s apure python model : Example -25 it to the list of *Plugin Models* in a FitPage. 26 27 SasView models can be of three types: 28 29 - A pure python model : Example - 32 30 `broadpeak.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/broad_peak.py>`_ 33 - A s apython model with embedded C : Example -31 - A python model with embedded C : Example - 34 32 `sphere.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/sphere.py>`_ 35 - A s apython wrapper with separate C code : Example -33 - A python wrapper with separate C code : Example - 36 34 `cylinder.py <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/cylinder.py>`_, 37 35 `cylinder.c <https://github.com/SasView/sasmodels/blob/master/sasmodels/models/cylinder.c>`_ … … 671 669 ^^^^^^^^^^^^^^^^^^^ 672 670 673 Installed SasView 674 ................. 675 676 If you are editing your model from the SasView GUI, you can test it 677 by selecting *Run > Check Model* from the *Model Editor* menu bar. An 678 *Info* box will appear with the results of the compilation and a 679 check that the model runs. 680 681 682 Built SasView 683 ............. 671 Minimal Testing 672 ............... 673 674 Either open the :ref:`Python_shell` (*Tools* > *Python Shell/Editor*) or the :ref:`Advanced_Plugin_Editor` (*Fitting* > *Plugin Model Operations* > *Advanced 675 Plugin Editor*), load your model, and then select *Run > Check Model* from the 676 menu bar. 677 678 An *Info* box will appear with the results of the compilation and a check that 679 the model runs. 680 681 Recommended Testing 682 ................... 684 683 685 684 If the model compiles and runs, you can next run the unit tests that … … 802 801 consider adding your model to the 803 802 `Model Marketplace <http://marketplace.sasview.org/>`_ so that others may use it! 803 804 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 805 806 .. note:: This help document was last changed by Steve King, 10Oct2016
Note: See TracChangeset
for help on using the changeset viewer.