-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow single step option during fitting (Trac #31) #259
Comments
Trac update at |
Trac update at |
Trac update at |
This ticket came up today during our training class at NIST. The biggest hurdle the students are facing is no longer writing the model structure, it is debugging the mathematics, especially in more complex systems. The suggestion in this ticket may not be the best way, but some form of debugging tool is needed when writing plugin models. |
perhaps we could implement a logger function for the C code that can pass back to the console whatever it is passed? maybe not elegant.... but? |
I mostly use sascomp from the command line for debugging models. It turns out you can run it from import sasmodels.compare
def sascomp(s): sasmodels.compare.main(*s.split())
sascomp("sphere radius=500,600") # compares two radii of sphere on the same plot
sascomp("sphere,cylinder length=4/3*radius -highq") # compare sphere to same volume cylinder
cd ~/.sasview/plugin_model
sascomp("newmodel.py") # runs a model in the plugin directory
sascomp("-h") # Show the many options available to sascomp Unfortunately you can't use The other thing I use is |
Also see #1800 |
To clarify a bit there are (so far) 2 critical issues identified here (none of which are about validation of the model - i.e. is it giving the correct answer compared to some known "standard").
There may be other issues I'm forgetting but these are the ones I noticed both in preparing the demo and working with the model writing group. |
You can put You could set up the sasview application to run python scripts. This would be useful for people who want to do batch processing on files but don't have a python development environment set up. Add the You could probably run the model within the sasview gui and capture the output to the log window but it'll take a bit of fiddling. Maybe it is as simple as redirecting sys.stdout to a string before running the model. Or maybe you will have to run it as a separate process and capture the process output. |
The ability to launch a "debug my model" process or window might be good ask user for a single Q value, or list of Q values, then print out everything that comes back from compilation and run output - the main results, plus perhaps, optionally, the whole long list that the model returns. This would be a half way house to what "show plot" might do. May be very helpful when we try to make more complex sum & product combination models, where sasview needs some work still. |
Richard Heenan points out that it can be very useful when fits go awry to be able to single step through each iteration, with a rewind option.
Migrated from http://trac.sasview.org/ticket/31
The text was updated successfully, but these errors were encountered: