Changeset 3c24ccd in sasmodels for sasmodels/compare.py
- Timestamp:
- Oct 18, 2017 10:03:43 AM (7 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- ef8e68c
- Parents:
- fbb9397
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
rfbb9397 r3c24ccd 42 42 from . import exception 43 43 from .data import plot_theory, empty_data1D, empty_data2D, load_data 44 from .direct_model import DirectModel 44 from .direct_model import DirectModel, get_mesh 45 45 from .convert import revert_name, revert_pars, constrain_new_to_old 46 46 from .generate import FLOAT_RE 47 from .weights import plot_weights 47 48 48 49 try: … … 102 103 -abs/-rel* plot relative or absolute error 103 104 -title="note" adds note to the plot title, after the model name 105 -weights shows weights plots for the polydisperse parameters 104 106 105 107 === output options === … … 834 836 if opts['plot']: 835 837 limits = plot_models(opts, result, limits=limits, setnum=k) 838 if opts['show_weights']: 839 base, _ = opts['engines'] 840 base_pars, _ = opts['pars'] 841 model_info = base._kernel.info 842 dim = base._kernel.dim 843 plot_weights(model_info, get_mesh(model_info, base_pars, dim=dim)) 836 844 if opts['plot']: 837 845 import matplotlib.pyplot as plt … … 996 1004 OPTIONS = [ 997 1005 # Plotting 998 'plot', 'noplot', 1006 'plot', 'noplot', 'weights', 999 1007 'linear', 'log', 'q4', 1000 1008 'rel', 'abs', … … 1146 1154 'engine' : 'default', 1147 1155 'evals' : '1', 1156 'show_weights' : False, 1148 1157 } 1149 1158 for arg in flags: … … 1194 1203 elif arg == '-demo': opts['use_demo'] = True 1195 1204 elif arg == '-default': opts['use_demo'] = False 1205 elif arg == '-weights': opts['show_weights'] = True 1196 1206 elif arg == '-html': opts['html'] = True 1197 1207 elif arg == '-help': opts['html'] = True
Note: See TracChangeset
for help on using the changeset viewer.