Changeset 83b81b8 in sasview
- Timestamp:
- Jun 28, 2012 5:49:52 PM (12 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:
- 3b2b031
- Parents:
- 986da97
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/fitpage.py
rb0eeabf1 r83b81b8 1712 1712 if data is not None: 1713 1713 if not hasattr(data, "data"): 1714 qmin = min(data.x) 1715 # Maximum value of data 1716 qmax = max(data.x) 1717 npts = len(data.x) 1714 try: 1715 qmin = min(data.x) 1716 # Maximum value of data 1717 qmax = max(data.x) 1718 npts = len(data.x) 1719 except: 1720 msg = "Unable to find min/max/length of \n data named %s"% \ 1721 data.filename 1722 wx.PostEvent(self._manager.parent, StatusEvent(status=msg, 1723 info="error")) 1724 raise ValueError, msg 1725 1718 1726 else: 1719 1727 qmin = 0 1720 x = max(math.fabs(data.xmin), math.fabs(data.xmax)) 1721 y = max(math.fabs(data.ymin), math.fabs(data.ymax)) 1728 try: 1729 x = max(math.fabs(data.xmin), math.fabs(data.xmax)) 1730 y = max(math.fabs(data.ymin), math.fabs(data.ymax)) 1731 except: 1732 msg = "Unable to find min/max of \n data named %s"% \ 1733 data.filename 1734 wx.PostEvent(self._manager.parent, StatusEvent(status=msg, 1735 info="error")) 1736 raise ValueError, msg 1722 1737 ## Maximum value of data 1723 1738 qmax = math.sqrt(x * x + y * y) -
sansdataloader/src/sans/dataloader/readers/ascii_reader.py
r7d6351e r83b81b8 353 353 # Store loading process information 354 354 output.meta_data['loader'] = self.type_name 355 355 if len(output.x) < 1: 356 raise RuntimeError, "%s is empty" % path 356 357 return output 357 358 -
sansguiframe/src/sans/guiframe/gui_manager.py
r1618a7e r83b81b8 2641 2641 Show data dialog 2642 2642 """ 2643 try: 2644 xmin = min(data.x) 2645 ymin = min(data.y) 2646 except: 2647 msg = "Unable to find min/max of \n data named %s"% \ 2648 data.filename 2649 wx.PostEvent(self, StatusEvent(status=msg, 2650 info="error")) 2651 raise ValueError, msg 2643 2652 text = data.__str__() 2644 2653 text += 'Data Min Max:\n' 2645 text += 'X_min = %s: X_max = %s\n'% ( min(data.x), max(data.x))2646 text += 'Y_min = %s: Y_max = %s\n'% ( min(data.y), max(data.y))2654 text += 'X_min = %s: X_max = %s\n'% (xmin, max(data.x)) 2655 text += 'Y_min = %s: Y_max = %s\n'% (ymin, max(data.y)) 2647 2656 if data.dy != None: 2648 2657 text += 'dY_min = %s: dY_max = %s\n'% (min(data.dy), max(data.dy))
Note: See TracChangeset
for help on using the changeset viewer.