Changeset b324aa9 in sasview for sansview/perspectives/fitting/fitting.py
- Timestamp:
- Feb 26, 2010 5:15:24 PM (15 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:
- 4d6cce0
- Parents:
- 3562fbc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
r25f766a rb324aa9 185 185 fit_option = "Select data for fitting" 186 186 fit_hint = "Dialog with fitting parameters " 187 invariant_option = "Compute Invariant" 188 invariant_hint = "A dialog will appears for further computation" 187 189 188 for item in graph.plottables: 190 189 if item.__class__.__name__ is "Data2D": … … 205 204 if item.is_data: 206 205 return [[fit_option, fit_hint, 207 self._onSelect], 208 [invariant_option, 209 invariant_hint, self._compute_invariant]] 206 self._onSelect]] 210 207 else: 211 208 return [] 212 209 else: 213 return [[fit_option, fit_hint, self._onSelect], 214 [invariant_option, 215 invariant_hint, self._compute_invariant]] 210 return [[fit_option, fit_hint, self._onSelect]] 216 211 return [] 217 212 … … 524 519 and panel_name to find the slicer 's panel concerned. 525 520 """ 526 527 521 for item in self.parent.panels: 528 522 if self.parent.panels[item].window_caption.startswith(event.panel_name): … … 530 524 531 525 self.parent._mgr.Update() 532 533 def _compute_invariant(self, event): 534 """ 535 Open the invariant panel to invariant computation 536 """ 537 self.panel = event.GetEventObject() 538 Plugin.on_perspective(self,event=event) 539 for plottable in self.panel.graph.plottables: 540 if plottable.name == self.panel.graph.selected_plottable: 541 data = self.copy_data(item= plottable, dy=plottable.dy) 542 543 from invariant_panel import InvariantWindow 544 frame = InvariantWindow(base=self.parent, data=plottable, graph=self.panel.graph) 545 frame.Show(True) 526 546 527 547 528 def _closed_fitpage(self, event): … … 665 646 ## before sending them to the fit engine 666 647 if len(self.err_dy)>0: 648 dy = item.dy 667 649 if item.name in self.err_dy.iterkeys(): 668 dy= self.err_dy[item.name] 669 data= self.copy_data(item, dy) 670 data.is_data= item.is_data 671 else: 672 data= self.copy_data(item, item.dy) 673 data.is_data= item.is_data 674 675 650 dy = self.err_dy[item.name] 651 data = self.copy_data(item, dy) 652 data.is_data= item.is_data 653 676 654 else: 677 655 if item.dy==None: … … 1143 1121 their errors of y coordinates for 1Data hide and show error 1144 1122 """ 1145 self.err_dy = event.err_dy1123 self.err_dy = event.err_dy 1146 1124 1147 1125
Note: See TracChangeset
for help on using the changeset viewer.