Changeset 9457498 in sasmodels
- Timestamp:
- Aug 8, 2016 10:32:13 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 3a45c2c
- Parents:
- 2472141
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/sasview_model.py
r99f446a r9457498 15 15 import traceback 16 16 import logging 17 from os.path import basename, splitext 17 18 18 19 import numpy as np # type: ignore 20 21 # Monkey patch sas.sascalc.fit as sas.models so that sas.models.pluginmodel 22 # is available to the plugin modules. 23 import sys 24 import sas 25 import sas.sascalc.fit 26 sys.modules['sas.models'] = sas.sascalc.fit 27 sas.models = sas.sascalc.fit 19 28 20 29 from . import core … … 37 46 pass 38 47 48 39 49 # TODO: separate x_axis_label from multiplicity info 40 50 MultiplicityInfo = collections.namedtuple( … … 84 94 Load a custom model given the model path. 85 95 """ 86 #print("load custom model", path)87 96 kernel_module = custom.load_custom_kernel_module(path) 88 97 try: 89 98 model = kernel_module.Model 99 # Old style models do not set the name in the class attributes, so 100 # set it here; this name will be overridden when the object is created 101 # with an instance variable that has the same value. 102 if model.name == "": 103 model.name = splitext(basename(path))[0] 90 104 except AttributeError: 91 105 model_info = modelinfo.make_model_info(kernel_module)
Note: See TracChangeset
for help on using the changeset viewer.