Changeset 1124 for trunk/bindings/python/nxs/tree.py
- Timestamp:
- 14/11/08 21:19:43 (4 years ago)
- File:
-
- 1 edited
-
trunk/bindings/python/nxs/tree.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bindings/python/nxs/tree.py
r1122 r1124 126 126 import nxs.napi 127 127 import nxs.unit 128 from nxs.napi import NeXusError 128 129 129 130 … … 403 404 try: 404 405 gid[target] = self.getdataID() 405 except RuntimeError:406 except NeXusError: 406 407 gid[target] = self.getgroupID() 407 408 … … 718 719 """ 719 720 def plot(self, signal, axes, entry, title, **opts): 721 """ 722 Plot the data entry. 723 724 Raises NeXusError if the data cannot be plotted. 725 """ 720 726 import pylab 721 727 pylab.cla() … … 755 761 # No support for higher dimensions yet 756 762 else: 757 raise RuntimeError, "Cannot plot a dataset of rank 3 or greater."763 raise NeXusError, "Cannot plot a dataset of rank 3 or greater." 758 764 @staticmethod 759 765 def show(): … … 798 804 """ 799 805 Plot data contained within the group. 806 807 Raises NeXusError if the data could not be plotted. 800 808 """ 801 809 … … 806 814 break 807 815 else: 808 raise RuntimeError('No plottable signal')816 raise NeXusError('No plottable signal') 809 817 810 818 # Find the associated axes … … 812 820 axes = [getattr(self,a) for a in signal.Aaxes.nxdata.split(':')] 813 821 else: 814 raise RuntimeError('Axes attribute missing from signal')822 raise NeXusError('Axes attribute missing from signal') 815 823 816 824 # Construct title
Note: See TracChangeset
for help on using the changeset viewer.
