Changes in / [4b0e1f3:56fac50] in sasmodels
- Files:
-
- 6 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
ra4a7308 r6869ceb 31 31 import sys 32 32 import math 33 from os.path import basename, dirname, join as joinpath34 import glob35 33 import datetime 36 34 import traceback … … 98 96 kerneldll.ALLOW_SINGLE_PRECISION_DLLS = True 99 97 100 # List of available models 101 ROOT = dirname(__file__) 102 MODELS = [basename(f)[:-3] 103 for f in sorted(glob.glob(joinpath(ROOT, "models", "[a-zA-Z]*.py")))] 98 MODELS = core.list_models() 104 99 105 100 # CRUFT python 2.6 … … 671 666 Parse command line options. 672 667 """ 668 MODELS = core.list_models() 673 669 flags = [arg for arg in sys.argv[1:] 674 670 if arg.startswith('-')] … … 683 679 print(columnize(MODELS, indent=" ")) 684 680 sys.exit(1) 685 if args[0] not in MODELS: 686 print("Model %r not available. Use one of:\n %s"%(args[0], models)) 681 682 name = args[0] 683 try: 684 model_definition = core.load_model_definition(name) 685 except ImportError, exc: 686 print(str(exc)) 687 print("Use one of:\n " + models) 687 688 sys.exit(1) 688 689 if len(args) > 3: … … 764 765 del engines[2:] 765 766 766 name = args[0]767 model_definition = core.load_model_definition(name)768 769 767 n1 = int(args[1]) if len(args) > 1 else 1 770 768 n2 = int(args[2]) if len(args) > 2 else 1 -
sasmodels/data.py
rd18582e r7824276 548 548 #plottable = Iq 549 549 plottable = masked_array(image, ~valid | data.mask) 550 # Divide range by 10 to convert from angstroms to nanometers 550 551 xmin, xmax = min(data.qx_data)/10, max(data.qx_data)/10 551 552 ymin, ymax = min(data.qy_data)/10, max(data.qy_data)/10 -
sasmodels/models/rpa.py
rfa8011eb r5cfda00 133 133 case_num = pars.get("case_num", parameters[0][2]) 134 134 if case_num < 2: 135 return HIDE_AB 136 elif case_num < 5: 135 137 return HIDE_A 136 elif case_num < 5:137 return HIDE_AB138 138 else: 139 139 return HIDE_NONE
Note: See TracChangeset
for help on using the changeset viewer.