Opened 7 years ago

Last modified 6 years ago

#1108 closed defect

"Writing a Plugin Model" does not explain function "random" — at Version 1

Reported by: Joachim Wuttke Owned by:
Priority: minor Milestone: SasView 4.3.0
Component: sasmodels Keywords:
Cc: Work Package: SasView Documentation

Description (last modified by butler)

Each SasView seems to contain a function "random", on a par with "Iq".

However, I find no explanation of this function on the otherwise well
written and informative page "Writing a Plugin Model" [1].

Could you please point me to an existing explanation of "random", or
briefly improvise such explanation?

Thanks, Joachim

[1] http://www.sasview.org/docs/user/sasgui/perspectives/fitting/plugin.html

Change History (1)

comment:1 Changed 7 years ago by butler

  • Description modified (diff)

Can you elaborate please? I just looked at the documentation and it seems pretty clearly explained (though I have not run

main()

To see all the help it may give as suggested. However to note that "random" is not a SasView function at all but a parameter in the compare framework used for testing models. I think it just calls the built in random number generator to create values for the model parameters within what should be generically "reasonable" bounds for a given parameter type as explained in the documentation:

Options will need to be passed as separate strings. For example to run your model
with a random set of parameters:

main("-random", "-pars", "~/.sasview/plugin_models/model.py")

For the random models,
   sld will be in the range (-0.5,10.5),
   angles (theta, phi, psi) will be in the range (-180,180),
   angular dispersion will be in the range (0,45),
   polydispersity will be in the range (0,1)
   other values will be in the range (0, 2v), where v is the value of the parameter in demo.

A better indication of what is confusing and how to make it more clear to a first time model developer would be helpful and very welcome.

Note: See TracTickets for help on using tickets.