Changeset ed10b57 in sasmodels
- Timestamp:
- Oct 9, 2016 10:35:59 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:
- 3c852d4, 9f37726
- Parents:
- 3f5a566
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sasview_model.py
r5b37fd6 red10b57 115 115 Load a custom model given the model path. 116 116 """ 117 #print("load custom", path)118 117 kernel_module = custom.load_custom_kernel_module(path) 119 118 try: … … 127 126 model_info = modelinfo.make_model_info(kernel_module) 128 127 model = _make_model_from_info(model_info) 128 129 # If we are trying to load a model that already exists, 130 # append a version number to its name. 131 # Note that models appear to be periodically reloaded 132 # by SasView and keeping track of whether we are reloading 133 # a model or loading it for the first time is tricky. 134 # For now, just allow one custom model of a given name. 135 if model.name in MODELS: 136 model.name = "%s_v2" % model.name 137 129 138 MODELS[model.name] = model 130 139 return model
Note: See TracChangeset
for help on using the changeset viewer.