Changeset 630156b in sasmodels for sasmodels/compare.py
- Timestamp:
- Apr 20, 2017 1:52:02 PM (7 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 3a45c2c, 8ae8532, ba62072, 93d0ea7
- Parents:
- f2f5413
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
r650c6d2 r630156b 73 73 -1d*/-2d computes 1d or 2d data 74 74 -preset*/-random[=seed] preset or random parameters 75 -mono /-poly* force monodisperse/polydisperse75 -mono*/-poly force monodisperse or allow polydisperse demo parameters 76 76 -magnetic/-nonmagnetic* suppress magnetism 77 77 -cutoff=1e-5* cutoff value for including a point in polydispersity … … 84 84 -edit starts the parameter explorer 85 85 -default/-demo* use demo vs default parameters 86 -h tml shows the model docs instead of running the model86 -help/-html shows the model docs instead of running the model 87 87 -title="note" adds note to the plot title, after the model name 88 88 -data="path" uses q, dq from the data file … … 753 753 comp = opts['engines'][1] if have_comp else None 754 754 data = opts['data'] 755 use_data = have_base ^ have_comp755 use_data = (opts['datafile'] is not None) and (have_base ^ have_comp) 756 756 757 757 # Plot if requested 758 758 view = opts['view'] 759 759 import matplotlib.pyplot as plt 760 if limits is None :760 if limits is None and not use_data: 761 761 vmin, vmax = np.Inf, -np.Inf 762 762 if have_base: … … 836 836 'linear', 'log', 'q4', 837 837 'hist', 'nohist', 838 'edit', 'html', 838 'edit', 'html', 'help', 839 839 'demo', 'default', 840 840 ]) … … 947 947 'cutoff' : 0.0, 948 948 'seed' : -1, # default to preset 949 'mono' : False,949 'mono' : True, 950 950 # Default to magnetic a magnetic moment is set on the command line 951 951 'magnetic' : False, … … 958 958 'html' : False, 959 959 'title' : None, 960 'data ': None,960 'datafile' : None, 961 961 } 962 962 engines = [] … … 980 980 elif arg.startswith('-random='): opts['seed'] = int(arg[8:]) 981 981 elif arg.startswith('-title='): opts['title'] = arg[7:] 982 elif arg.startswith('-data='): opts['data '] = arg[6:]982 elif arg.startswith('-data='): opts['datafile'] = arg[6:] 983 983 elif arg == '-random': opts['seed'] = np.random.randint(1000000) 984 984 elif arg == '-preset': opts['seed'] = -1 … … 1005 1005 elif arg == '-default': opts['use_demo'] = False 1006 1006 elif arg == '-html': opts['html'] = True 1007 elif arg == '-help': opts['html'] = True 1007 1008 # pylint: enable=bad-whitespace 1008 1009 … … 1121 1122 1122 1123 # Create the computational engines 1123 if opts['data '] is not None:1124 data = load_data(os.path.expanduser(opts['data ']))1124 if opts['datafile'] is not None: 1125 data = load_data(os.path.expanduser(opts['datafile'])) 1125 1126 else: 1126 1127 data, _ = make_data(opts)
Note: See TracChangeset
for help on using the changeset viewer.