Changeset 8c65a33 in sasmodels
- Timestamp:
- Nov 9, 2016 11:06:42 AM (8 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:
- 88fafac
- Parents:
- 23ae1d6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
r85fe7f8 r8c65a33 60 60 sasmodels rewrite. 61 61 62 model is the name of the modelto compare (see below).62 model or model1,model2 are the names of the models to compare (see below). 63 63 N1 is the number of times to run sasmodels (default=1). 64 64 N2 is the number times to run sasview (default=1). … … 92 92 -sasview sets the sasview calculation engine 93 93 94 The default is -single - sasview. Note that the interpretation of quad94 The default is -single -double. Note that the interpretation of quad 95 95 precision depends on architecture, and may vary from 64-bit to 128-bit, 96 96 with 80-bit floats being common (1e-19 precision). 97 97 98 98 Key=value pairs allow you to set specific values for the model parameters. 99 Key=value1,value2 to compare different values of the same parameter. 100 value can be an expression including other parameters 99 101 """ 100 102 … … 885 887 return isfloat or INTEGER_RE.match(str) 886 888 889 # For distinguishing pairs of models for comparison 890 # key-value pair separator = 891 # shell characters | & ; <> $ % ' " \ # ` 892 # model and parameter names _ 893 # parameter expressions - + * / . ( ) 894 # path characters including tilde expansion and windows drive ~ / : 895 # not sure about brackets [] {} 896 # maybe one of the following @ ? ^ ! , 897 MODEL_SPLIT = ',' 887 898 def parse_opts(argv): 888 899 # type: (List[str]) -> Dict[str, Any] … … 987 998 # pylint: enable=bad-whitespace 988 999 989 if ':'in name:990 name, name2 = name.split( ':',2)1000 if MODEL_SPLIT in name: 1001 name, name2 = name.split(MODEL_SPLIT, 2) 991 1002 else: 992 1003 name2 = name … … 1036 1047 print("%r invalid; parameters are: %s"%(k, ", ".join(sorted(s)))) 1037 1048 return None 1038 v1, v2 = v.split( ':',2) if ':'in v else (v,v)1049 v1, v2 = v.split(MODEL_SPLIT, 2) if MODEL_SPLIT in v else (v,v) 1039 1050 if v1 and k in pars: 1040 1051 presets[k] = float(v1) if isnumber(v1) else v1
Note: See TracChangeset
for help on using the changeset viewer.