Changeset 1678 for branches/alma
- Timestamp:
- 01/28/10 17:48:32 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/python/scantable.py
r1677 r1678 2047 2047 if len(other) == self.nrow(): 2048 2048 s = scantable(self._math._arrayop(self.copy(), other, "ADD", False, 'row')) 2049 elif len(other) == self.nchan( 0):2049 elif len(other) == self.nchan(self.getifnos()[0]): 2050 2050 s = scantable(self._math._arrayop(self.copy(), other, "ADD", False, 'channel')) 2051 2051 else: 2052 casalog.post( 'Length of list operand should equal to either scantable.nchan() or scantable.nrow().', 'ERROR' ) 2052 asaplog.push( 'Length of list operand should equal to either scantable.nchan() or scantable.nrow().' ) 2053 print_log( 'ERROR' ) 2053 2054 else: 2054 2055 raise TypeError("Other input is not a scantable or float value or float list") … … 2070 2071 if len(other) == self.nrow(): 2071 2072 s = scantable(self._math._arrayop(self.copy(), other, "SUB", False, 'row')) 2072 elif len(other) == self.nchan( 0):2073 elif len(other) == self.nchan(self.getifnos()[0]): 2073 2074 s = scantable(self._math._arrayop(self.copy(), other, "SUB", False, 'channel')) 2074 2075 else: 2075 casalog.post( 'Length of list operand should equal to either scantable.nchan() or scantable.nrow().', 'ERROR' ) 2076 asaplog.push( 'Length of list operand should equal to either scantable.nchan() or scantable.nrow().' ) 2077 print_log( 'ERROR' ) 2076 2078 else: 2077 2079 raise TypeError("Other input is not a scantable or float value or float list") … … 2093 2095 if len(other) == self.nrow(): 2094 2096 s = scantable(self._math._arrayop(self.copy(), other, "MUL", False, 'row')) 2095 elif len(other) == self.nchan( 0):2097 elif len(other) == self.nchan(self.getifnos()[0]): 2096 2098 s = scantable(self._math._arrayop(self.copy(), other, "MUL", False, 'channel')) 2097 2099 else: 2098 casalog.post( 'Length of list operand should equal to either scantable.nchan() or scantable.nrow().', 'ERROR' ) 2100 asaplog.push( 'Length of list operand should equal to either scantable.nchan() or scantable.nrow().' ) 2101 print_log( 'ERROR' ) 2099 2102 else: 2100 2103 raise TypeError("Other input is not a scantable or float value or float list") … … 2118 2121 if len(other) == self.nrow(): 2119 2122 s = scantable(self._math._array2dop(self.copy(), other, "DIV", False, 'row')) 2120 elif len(other) == self.nchan( 0):2123 elif len(other) == self.nchan(self.getifnos()[0]): 2121 2124 s = scantable(self._math._arrayop(self.copy(), other, "DIV", False, 'channel')) 2122 2125 else: 2123 casalog.post( 'Length of list operand should equal to either scantable.nchan() or scantable.nrow().', 'ERROR' ) 2126 asaplog.push( 'Length of list operand should equal to either scantable.nchan() or scantable.nrow().' ) 2127 print_log( 'ERROR' ) 2124 2128 else: 2125 2129 raise TypeError("Other input is not a scantable or float value or float list")
Note:
See TracChangeset
for help on using the changeset viewer.