Changeset 5251ec6 in sasview for src/sas/sasgui/plottools/plottables.py
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/plottools/plottables.py
r2469df7 r5251ec6 389 389 390 390 """ 391 raise NotImplemented , "Not a valid transform"391 raise NotImplemented("Not a valid transform") 392 392 393 393 # Related issues … … 689 689 msg = "Plottable.View: Given x and dx are not" 690 690 msg += " of the same length" 691 raise ValueError , msg691 raise ValueError(msg) 692 692 # Check length of y array 693 693 if not len(y) == len(x): 694 694 msg = "Plottable.View: Given y " 695 695 msg += "and x are not of the same length" 696 raise ValueError , msg696 raise ValueError(msg) 697 697 698 698 if dy is not None and not len(dy) == 0 and not len(y) == len(dy): 699 699 msg = "Plottable.View: Given y and dy are not of the same " 700 700 msg += "length: len(y)=%s, len(dy)=%s" % (len(y), len(dy)) 701 raise ValueError , msg701 raise ValueError(msg) 702 702 self.x = [] 703 703 self.y = [] … … 734 734 msg = "Plottable.View: transformed x " 735 735 msg += "and y are not of the same length" 736 raise ValueError , msg736 raise ValueError(msg) 737 737 if has_err_x and not (len(self.x) == len(self.dx)): 738 738 msg = "Plottable.View: transformed x and dx" 739 739 msg += " are not of the same length" 740 raise ValueError , msg740 raise ValueError(msg) 741 741 if has_err_y and not (len(self.y) == len(self.dy)): 742 742 msg = "Plottable.View: transformed y" 743 743 msg += " and dy are not of the same length" 744 raise ValueError , msg744 raise ValueError(msg) 745 745 # Check that negative values are not plot on x and y axis for 746 746 # log10 transformation … … 812 812 tempy.append(self.y[i]) 813 813 tempdy.append(self.dy[i]) 814 except :814 except Exception as exc: 815 815 logger.error("check_data_logX: skipping point x %g", self.x[i]) 816 logger.error( sys.exc_value)816 logger.error(exc) 817 817 self.x = tempx 818 818 self.y = tempy … … 842 842 tempy.append(self.y[i]) 843 843 tempdy.append(self.dy[i]) 844 except :844 except Exception as exc: 845 845 logger.error("check_data_logY: skipping point %g", self.y[i]) 846 logger.error( sys.exc_value)846 logger.error(exc) 847 847 848 848 self.x = tempx … … 996 996 self.zmax = zmax 997 997 else: 998 raise "zmin is greater or equal to zmax "998 raise("zmin is greater or equal to zmax ") 999 999 1000 1000 def render(self, plot, **kw): … … 1108 1108 Plottable.__init__(self) 1109 1109 msg = "Theory1D is no longer supported, please use Data1D and change symbol.\n" 1110 raise DeprecationWarning , msg1110 raise DeprecationWarning(msg) 1111 1111 1112 1112 class Fit1D(Plottable):
Note: See TracChangeset
for help on using the changeset viewer.