Changeset 5251ec6 in sasview for src/sas/sasgui/perspectives/simulation
- Timestamp:
- Oct 11, 2018 2:20:56 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1249
- Children:
- 98b9f32
- Parents:
- 67ed543
- Location:
- src/sas/sasgui/perspectives/simulation
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/simulation/ShapeAdapter.py
r959eb01 r5251ec6 87 87 self.sim_canvas._model_changed() 88 88 else: 89 raise ValueError , "SimShapeVisitor: Wrong class for visited object"89 raise ValueError("SimShapeVisitor: Wrong class for visited object") 90 90 91 91 … … 115 115 self.sim_canvas._model_changed() 116 116 else: 117 raise ValueError , "SimShapeVisitor: Wrong class for visited object"117 raise ValueError("SimShapeVisitor: Wrong class for visited object") 118 118 119 119 … … 130 130 shape.accept_update(self) 131 131 else: 132 raise ValueError , "ShapeAdapter: Shape [%s] not in list" % shape.name132 raise ValueError("ShapeAdapter: Shape [%s] not in list" % shape.name) 133 133 -
src/sas/sasgui/perspectives/simulation/ShapeParameters.py
ra1b8fee r5251ec6 10 10 from __future__ import print_function 11 11 12 import sys 13 from copy import deepcopy 14 12 15 import wx 13 import sys14 16 import wx.lib.newevent 15 from copy import deepcopy 16 import SimCanvas17 18 from . import SimCanvas 17 19 18 20 (CreateShapeEvent, EVT_ADD_SHAPE) = wx.lib.newevent.NewEvent() … … 201 203 n = 1 202 204 self.parameters = [] 203 keys = shape.params.keys() 204 keys.sort() 205 206 for item in keys: 205 206 for item in sorted(shape.params.keys()): 207 207 if item in ['contrast', 'order']: 208 208 continue … … 393 393 if not tmp==None: 394 394 self.current_shape.params[item[0]] = tmp 395 except :395 except Exception as exc: 396 396 print("Could not create") 397 print( sys.exc_value)397 print(exc) 398 398 399 399 def _onCreate(self, evt): … … 489 489 print("NOT YET IMPLMENTED") 490 490 print("renaming", self.shape_listbox.GetString(indices[0])) 491 -
src/sas/sasgui/perspectives/simulation/__init__.py
r959eb01 r5251ec6 1 1 PLUGIN_ID = "Simulation plug-in 1.0" 2 from simulation import *2 from .simulation import * -
src/sas/sasgui/perspectives/simulation/simulation.py
r7432acb r5251ec6 15 15 16 16 # Application imports 17 import SimCanvas 18 import ShapeParameters 19 import ShapeAdapter 17 from sas.sascalc.realspace import VolumeCanvas 18 from sas.sascalc.data_util.calcthread import CalcThread 20 19 from sas.sasgui.guiframe.dataFitting import Data1D 21 # Real-space simulation import22 import sas.sascalc.realspace.VolumeCanvas as VolumeCanvas23 24 from sas.sascalc.data_util.calcthread import CalcThread25 20 from sas.guicomm.events import NewPlotEvent, StatusEvent 21 22 from . import SimCanvas 23 from . import ShapeParameters 24 from . import ShapeAdapter 26 25 27 26 logger = logging.getLogger(__name__)
Note: See TracChangeset
for help on using the changeset viewer.