Changeset ad6f597 in sasview for calculatorview/perspectives/calculator/aperture_editor.py
- Timestamp:
- May 4, 2010 12:51:49 PM (14 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 85e665e
- Parents:
- 90b23e1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/perspectives/calculator/aperture_editor.py
r91f151a rad6f597 20 20 class ApertureDialog(wx.Dialog): 21 21 def __init__(self, parent=None, manager=None,aperture=None, *args, **kwds): 22 try:23 kwds['size'] =(PANEL_WIDTH, PANEL_HEIGHT)24 kwds['title'] = "Aperture Editor"25 wx.Dialog.__init__(self, parent=parent, *args, **kwds)26 self.parent = parent27 self.manager = manager28 self._aperture = aperture29 self._reset_aperture = deepcopy(aperture)30 self._notes = ""31 self_description = "Edit aperture"32 self._do_layout()33 self.set_values()34 except:35 print "error", sys.exc_value36 22 """ 23 Dialog allows to enter values for aperture 24 """ 25 kwds['size'] =(PANEL_WIDTH, PANEL_HEIGHT) 26 kwds['title'] = "Aperture Editor" 27 wx.Dialog.__init__(self, parent=parent, *args, **kwds) 28 self.parent = parent 29 self.manager = manager 30 self._aperture = aperture 31 self._reset_aperture = deepcopy(aperture) 32 self._notes = "" 33 self_description = "Edit aperture" 34 self._do_layout() 35 self.set_values() 36 37 37 def _define_structure(self): 38 38 """ … … 316 316 self._notes += "%s to %s \n"%(self._aperture.size.z, 317 317 z_aperture_size) 318 self._aperture. aperture_size.z = float(z_aperture_size)318 self._aperture.size.z = float(z_aperture_size) 319 319 else: 320 320 self._notes += "Error: Expected a float for the offset 's x " … … 356 356 loader = Loader() 357 357 # Load data 358 data = loader.load("MAR07232_rest.ASC") 359 360 if len(data.collimation) == 0: 361 from DataLoader.data_info import Collimation 362 collimation = Collimation() 363 from DataLoader.data_info import Aperture 364 aperture = Aperture() 365 dlg = ApertureDialog(aperture=aperture) 366 dlg.ShowModal() 367 else: 368 for collimation in data.collimation: 369 for aperture in collimation: 370 dlg = ApertureDialog(aperture=aperture) 371 dlg.ShowModal() 372 break 358 from DataLoader.data_info import Aperture 359 aperture = Aperture() 360 dlg = ApertureDialog(aperture=aperture) 361 dlg.ShowModal() 373 362 app.MainLoop() 374 363
Note: See TracChangeset
for help on using the changeset viewer.