Binary Operators

From LIBISIS
Revision as of 13:58, 17 March 2008 by Dean Whittaker (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The binary operators in Libisis can be used in many different ways. They may be used with IXTdataset_1d and IXTdataset_2d objects. All operators act in a similar, intuitive way. The lists below give the most general case wherever possible (i.e. does not distinguish between IXTdataset_1d and IXTdataset_2d objects.

The data in an IXTdataset_1d object can be thought of as a single row of data, while the signal data in an IXTdataset_2d ojbect can be thought of as a matrix, with x data corresponding to columns and y data corresponding to rows.

operation_x and operation_y methods

These functions are

>> plus_x(a,b)
>> plus_y(a,b)
>> minus_x(a,b)
>> minus_y(a,b)
>> times_x(a,b)
>> times_y(a,b)
>> divide_x(a,b)
>> divide_y(a,b) 

These functions are methods of IXTdataset_2d objects.

operation_x(a,b)

  • Forces any operation with a linear array to operate on the x columns of the signal data of an IXTdataset_2d object separately. Otherwise, this operation is the same as the normal operator.

example:


>> new_ww = plus_x(ww,n)


where n is a one dimensional array of objects and ww is an array of IXTdataset_2d, gives


new_ww(i).signal(j,k) = ww(i).signal(j,k) + a(k)


and similarly for the error information.


operation_y(a,b)

  • Forces any operation with a linear array to operate on the y rows of the signal data of the IXTdataset_2d object separately. Otherwise, this operation is the same as the normal operator.

example:


>> new_ww = plus_y(ww, n)


gives