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