Loading...
Searching...
No Matches
casacore::LatticeExprNode Class Reference
lattices package (libcasa_lattices) » LEL_module

More...

`#include <LatticeExprNode.h>`

## Public Member Functions

| LatticeExprNode ()
| Default constructor.
| LatticeExprNode (Int64 constant)
| Unary constant expression constructors.
| LatticeExprNode (Int constant)
| LatticeExprNode (uInt constant)
| LatticeExprNode (Long constant)
| LatticeExprNode (Float constant)
| LatticeExprNode (Double constant)
| LatticeExprNode (const Complex &constant)
| LatticeExprNode (const DComplex &constant)
| LatticeExprNode (Bool constant)
| LatticeExprNode (const IPosition &)
| Constructor from an IPosition (containing indices or axes).
| LatticeExprNode (const Lattice< Float > &lattice)
| Lattice expression (gets Lattice pixels) constructors.
| LatticeExprNode (const Lattice< Double > &lattice)
| LatticeExprNode (const Lattice< Complex > &lattice)
| LatticeExprNode (const Lattice< DComplex > &lattice)
| LatticeExprNode (const Lattice< Bool > &lattice)
| LatticeExprNode (const MaskedLattice< Float > &lattice)
| LatticeExprNode (const MaskedLattice< Double > &lattice)
| LatticeExprNode (const MaskedLattice< Complex > &lattice)
| LatticeExprNode (const MaskedLattice< DComplex > &lattice)
| LatticeExprNode (const MaskedLattice< Bool > &lattice)
| LatticeExprNode (const LCRegion &region)
| Create a lattice expression from a region.
| LatticeExprNode (const Slicer &slicer)
| LatticeExprNode (const LattRegionHolder &region)
LatticeExprNode | operator[] (const LatticeExprNode &cond) const
| Masking operator using a condition.
| LatticeExprNode (const LatticeExprNode &other)
| Copy constructor (reference semantics).
virtual | ~LatticeExprNode ()
| Destructor, does nothing.
LatticeExprNode & | operator= (const LatticeExprNode &other)
| Assignment (reference semantics).
const IPosition & | getIPosition () const
| Get the IPosition.
std::shared_ptr< LELInterface< Float > > | makeFloat () const
| Convert the expression to another data type.
std::shared_ptr< LELInterface< Double > > | makeDouble () const
std::shared_ptr< LELInterface< Complex > > | makeComplex () const
std::shared_ptr< LELInterface< DComplex > > | makeDComplex () const
std::shared_ptr< LELInterface< Bool > > | makeBool () const
void | eval (LELArray< Float > &result, const Slicer &section) const
| Evaluate the expression.
void | eval (LELArray< Double > &result, const Slicer &section) const
void | eval (LELArray< Complex > &result, const Slicer &section) const
void | eval (LELArray< DComplex > &result, const Slicer &section) const
void | eval (LELArray< Bool > &result, const Slicer &section) const
void | evalRef (LELArrayRef< Float > &result, const Slicer &section) const
| Evaluate the expression.
void | evalRef (LELArrayRef< Double > &result, const Slicer &section) const
void | evalRef (LELArrayRef< Complex > &result, const Slicer &section) const
void | evalRef (LELArrayRef< DComplex > &result, const Slicer &section) const
void | evalRef (LELArrayRef< Bool > &result, const Slicer &section) const
void | eval (Float &result) const
| Evaluate the expression (in case it is a scalar).
void | eval (Double &result) const
void | eval (Complex &result) const
void | eval (DComplex &result) const
void | eval (Bool &result) const
Float | getFloat () const
Double | getDouble () const
Complex | getComplex () const
DComplex | getDComplex () const
Bool | getBool () const
Array< Float > | getArrayFloat () const
| Evaluate the expression (in case it is a constant array).
Array< Double > | getArrayDouble () const
Array< Complex > | getArrayComplex () const
Array< DComplex > | getArrayDComplex () const
Array< Bool > | getArrayBool () const
DataType | dataType () const
| Get the data type of the expression.
Bool | isRegion () const
| Is the expression node a region?
Bool | isScalar () const
| Is the result of "eval" a scalar?
Bool | isMasked () const
| Is the result of "eval" masked?
Bool | isInvalidScalar () const
| Holds the node an invalid scalar?
const IPosition & | shape () const
| Return the shape of the Lattice including all degenerate axes (ie.
const LELAttribute & | getAttribute () const
| Get the attribute object of the expression.
Bool | replaceScalarExpr ()
| Replace a scalar subexpression by its result.
| LatticeExprNode (const std::shared_ptr< LELInterface< Float > > &expr)
| Make the object from a std::shared_ptr<LELInterface> pointer.
| LatticeExprNode (const std::shared_ptr< LELInterface< Double > > &expr)
| LatticeExprNode (const std::shared_ptr< LELInterface< Complex > > &expr)
| LatticeExprNode (const std::shared_ptr< LELInterface< DComplex > > &expr)
| LatticeExprNode (const std::shared_ptr< LELInterface< Bool > > &expr)
Bool | lock (FileLocker::LockType, uInt nattempts)
| Handle locking of the LatticeExpr which is delegated to all of its parts.
void | unlock ()
Bool | hasLock (FileLocker::LockType) const
void | resync ()

## Static Public Member Functions

static DataType | resultDataType (DataType left, DataType right)
| Determine the resulting data type from the given data types.
static LELAttribute | checkArg (const Block< LatticeExprNode > &arg, const Block< Int > &argType, Bool expectArray, Bool matchAxes=True)
| Check the arguments of a function and return the resulting attribute object.

## Private Member Functions

| LatticeExprNode (LELInterface< Float > *expr)
| Make the object from a LELInterface* pointer.
| LatticeExprNode (LELInterface< Double > *expr)
| LatticeExprNode (LELInterface< Complex > *expr)
| LatticeExprNode (LELInterface< DComplex > *expr)
| LatticeExprNode (LELInterface< Bool > *expr)
void | doPrepare () const
| Do the preparation for the evaluation.

## Static Private Member Functions

static Bool | areRegions (const LatticeExprNode &left, const LatticeExprNode &right)
| Test if both operands represent a region.
static LatticeExprNode | newNumUnary (LELUnaryEnums::Operation oper, const LatticeExprNode &expr)
| Create a new node for a numerical unary operation.
static LatticeExprNode | newNumFunc1D (LELFunctionEnums::Function func, const LatticeExprNode &expr)
| Create a new node for a numerical function with 1 argument.
static LatticeExprNode | newRealFunc1D (LELFunctionEnums::Function func, const LatticeExprNode &expr)
| Create a new node for a real numerical function with 1 argument.
static LatticeExprNode | newComplexFunc1D (LELFunctionEnums::Function func, const LatticeExprNode &expr)
| Create a new node for a complex numerical function with 1 argument.
static LatticeExprNode | newNumReal1D (LELFunctionEnums::Function func, const LatticeExprNode &expr)
| Create a new node for a numerical function with 1 argument that returns a real number.
static LatticeExprNode | newNumFunc2D (LELFunctionEnums::Function func, const LatticeExprNode &left, const LatticeExprNode &right)
| Create a new node for a numerical function with 2 arguments.
static LatticeExprNode | newNumBinary (LELBinaryEnums::Operation oper, const LatticeExprNode &left, const LatticeExprNode &right)
| Create a new node for a numerical binary operator.
static LatticeExprNode | newLogBinary (LELBinaryEnums::Operation oper, const LatticeExprNode &left, const LatticeExprNode &right)
| Create a new node for a logical binary operator.
static LatticeExprNode | newBinaryCmp (LELBinaryEnums::Operation oper, const LatticeExprNode &left, const LatticeExprNode &right)
| Create a new node for a comparison binary operator.
static Int | makeEqualDim (LatticeExprNode &expr0, LatticeExprNode &expr1)
| Make (if needed and if possible) the expression nodes such that the dimensionalities are equal.

## Private Attributes

Bool | donePrepare_p
| Member variables.
DataType | dtype_p
Bool | isInvalid_p
IPosition | iposition_p
const LELAttribute * | pAttr_p
std::shared_ptr< LELInterface< Float > > | pExprFloat_p
std::shared_ptr< LELInterface< Double > > | pExprDouble_p
std::shared_ptr< LELInterface< Complex > > | pExprComplex_p
std::shared_ptr< LELInterface< DComplex > > | pExprDComplex_p
std::shared_ptr< LELInterface< Bool > > | pExprBool_p

## Friends

LatticeExprNode | operator+ (const LatticeExprNode &expr)
| All global functions need to be declared as friends.
LatticeExprNode | operator- (const LatticeExprNode &expr)
LatticeExprNode | operator! (const LatticeExprNode &expr)
LatticeExprNode | operator+ (const LatticeExprNode &left, const LatticeExprNode &right)
| Numerical binary operators.
LatticeExprNode | operator- (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | operator* (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | operator/ (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | operator% (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | operator^ (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | operator== (const LatticeExprNode &left, const LatticeExprNode &right)
| Relational binary operators.
LatticeExprNode | operator> (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | operator>= (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | operator< (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | operator<= (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | operator!= (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | operator&& (const LatticeExprNode &left, const LatticeExprNode &right)
| Logical binary operators.
LatticeExprNode | operator|| (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | sin (const LatticeExprNode &expr)
| Numerical 1-argument functions.
LatticeExprNode | sinh (const LatticeExprNode &expr)
LatticeExprNode | asin (const LatticeExprNode &expr)
LatticeExprNode | cos (const LatticeExprNode &expr)
LatticeExprNode | cosh (const LatticeExprNode &expr)
LatticeExprNode | acos (const LatticeExprNode &expr)
LatticeExprNode | tan (const LatticeExprNode &expr)
LatticeExprNode | tanh (const LatticeExprNode &expr)
LatticeExprNode | atan (const LatticeExprNode &expr)
LatticeExprNode | exp (const LatticeExprNode &expr)
LatticeExprNode | log (const LatticeExprNode &expr)
LatticeExprNode | log10 (const LatticeExprNode &expr)
LatticeExprNode | sqrt (const LatticeExprNode &expr)
LatticeExprNode | sign (const LatticeExprNode &expr)
LatticeExprNode | round (const LatticeExprNode &expr)
LatticeExprNode | ceil (const LatticeExprNode &expr)
LatticeExprNode | floor (const LatticeExprNode &expr)
LatticeExprNode | conj (const LatticeExprNode &expr)
LatticeExprNode | atan2 (const LatticeExprNode &left, const LatticeExprNode &right)
| Numerical 2-argument functions.
LatticeExprNode | pow (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | fmod (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | min (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | max (const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode | formComplex (const LatticeExprNode &left, const LatticeExprNode &right)
| Form a complex number from two real numbers.
LatticeExprNode | abs (const LatticeExprNode &expr)
| Numerical 1-argument functions which result in a real number regardless of input expression type.
LatticeExprNode | arg (const LatticeExprNode &expr)
LatticeExprNode | real (const LatticeExprNode &expr)
LatticeExprNode | imag (const LatticeExprNode &expr)
LatticeExprNode | min (const LatticeExprNode &expr)
| 1-argument functions operating on a numeric expression resulting in a scalar
LatticeExprNode | max (const LatticeExprNode &expr)
LatticeExprNode | sum (const LatticeExprNode &expr)
LatticeExprNode | median (const LatticeExprNode &expr)
LatticeExprNode | mean (const LatticeExprNode &expr)
LatticeExprNode | variance (const LatticeExprNode &expr)
LatticeExprNode | stddev (const LatticeExprNode &expr)
LatticeExprNode | avdev (const LatticeExprNode &expr)
LatticeExprNode | fractile (const LatticeExprNode &expr, const LatticeExprNode &fraction)
| Determine the value of the element at the part fraction from the beginning of the given lattice.
LatticeExprNode | fractileRange (const LatticeExprNode &expr, const LatticeExprNode &fraction1, const LatticeExprNode &fraction2)
| Determine the value range of the elements at the part fraction1 and fraction2 from the beginning of the given lattice.
LatticeExprNode | fractileRange (const LatticeExprNode &expr, const LatticeExprNode &fraction)
LatticeExprNode | nelements (const LatticeExprNode &expr)
| 1-argument function to get the number of elements in a lattice.
LatticeExprNode | ndim (const LatticeExprNode &expr)
| 1-argument function to get the dimensionality of a lattice.
LatticeExprNode | length (const LatticeExprNode &expr, const LatticeExprNode &axis)
| 2-argument function to get the length of an axis.
LatticeExprNode | indexin (const LatticeExprNode &axis, const LatticeExprNode &indexFlags)
| 2-argument function telling per pixel if its index on the given axis is contained in the 2nd argument.
LatticeExprNode | rebin (const LatticeExprNode &expr, const LatticeExprNode &bin)
| 2-argument function rebinning Lattice by given factors.
LatticeExprNode | isNaN (const LatticeExprNode &expr)
| Test if a value is a NaN.
LatticeExprNode | any (const LatticeExprNode &expr)
| Functions operating on a logical expression resulting in a scalar; Functions "any" (are any pixels "True") and "all" (are all pixels "True") result in a Bool; functions "ntrue" and "nfalse" result in a Double.
LatticeExprNode | all (const LatticeExprNode &expr)
LatticeExprNode | ntrue (const LatticeExprNode &expr)
LatticeExprNode | nfalse (const LatticeExprNode &expr)
LatticeExprNode | mask (const LatticeExprNode &expr)
| This function returns the mask of the given expression.
LatticeExprNode | value (const LatticeExprNode &expr)
| This function returns the value of the expression without a mask.
LatticeExprNode | amp (const LatticeExprNode &left, const LatticeExprNode &right)
| This function finds sqrt(left^2+right^2).
LatticeExprNode | pa (const LatticeExprNode &left, const LatticeExprNode &right)
| This function finds 180/pi*atan2(left,right)/2.
LatticeExprNode | spectralindex (const LatticeExprNode &left, const LatticeExprNode &right)
| This function finds the spectral index alpha = log(s1/s2) / log(f1/f2).
LatticeExprNode | iif (const LatticeExprNode &condition, const LatticeExprNode &arg1, const LatticeExprNode &arg2)
| Function resembling the ternary ?
LatticeExprNode | replace (const LatticeExprNode &arg1, const LatticeExprNode &arg2)
| This function replaces every masked-off element in the first argument with the corresponding element from the second argument.
LatticeExprNode | toFloat (const LatticeExprNode &expr)
| Functions to convert to the given data type.
LatticeExprNode | toDouble (const LatticeExprNode &expr)
LatticeExprNode | toComplex (const LatticeExprNode &expr)
LatticeExprNode | toDComplex (const LatticeExprNode &expr)
LatticeExprNode | toBool (const LatticeExprNode &expr)

## Detailed Description

Bridging class to allow C++ expressions involving lattices

### Intended use:

Public interface

### Review Status

Date Reviewed:
  yyyy/mm/dd

### Prerequisite

- Lattice
- LatticeExpr
- LELInterface

### Etymology

The name is derived from the fact that this class provides an expression interface to the user which s/he may use to write C++ expressions involving Lattices. This class actually constructs the nodes of the expression tree, hence its name. It is used by the envelope class LatticeExpr and provides a bridge to the letter classes derived from LELInterface.

### Synopsis

This class is part of the interface which allows the C++ programmer to enter mathematical expressions involving Lattices. It is is part of a Letter/envelope scheme. It's actually a bridge between the envelope class (LatticeExpr) and the letter classes (derived from LELInterface) and it exists largely to handle type conversions. In a single type environment, the envelope class could have directly called the letter classes.

The envelope and bridge provide the interface which the programmer sees. The letter classes do the real work and are hidden from the programmer.

All the expression manipulation functionality that the user has access to is viewable in this class; it is here that the operators, functions and constructors are defined. These allow the programmer to write mathematical expressions which involve Lattices. The letter classes take care of the optimal traversal of the Lattice and the memory mangement thereof. Thus the Lattices are iterated through and the expressions evaluated for each chunk (usually a tile shape) of the iteration.

A description of the implementation details of these classes can be found in Note 216

The available functionality is defined by the global friend functions and operators, plus the public constructors. The other public members functions are generally not of interest to the user of this class.

Generally, if one writes an expression such as a.copyData(sin(b)), the expression is automatically converted first to a LatticeExprNode and then to a LatticeExpr (which is a Lattice) before evaluation occurs. However, it may occur that you wish to build an expression from subexpressions. To do this, you must explcitly create objects of class LatticeExprNode. You cannot manipulate subexpressions of type LatticeExpr<T>. See below for an example.

### Example

ArrayLattice<Float> f1(IPosition (2,nx,ny));
ArrayLattice<Float> f2(IPosition (2,nx,ny));
f2.set(2.0);
f1.copyData(2*f2+f2);
casacore::ArrayLattice
Definition ArrayLattice.h:144
casacore::IPosition
Definition IPosition.h:117

In this example, the values of the pixels in Lattice f1 are set to the values resulting from the expression "2*f2 + f2" I.e. the expression is evaluated for each pixel in the Lattices

Note that :

1) the Lattice::copyData function is expecting a Lattice argument.
2) LatticeExpr inherits from Lattice and therefore a LatticeExpr object is a valid argument object type 3) The expression in the copyData call is automatically converted to a LatticeExprNode by the constructors and operators in LatticeExprNode 4) The LatticeExprNode object so created is automatically converted to a LatticeExpr by casting functions in LatticeExprNode.

### Example

ArrayLattice<Float> f1(IPosition (2,nx,ny));
ArrayLattice<Float> f2(IPosition (2,nx,ny));
ArrayLattice<Double> d(IPosition (2,nx,ny));
ArrayLattice<Complex> c(IPosition (2,nx,ny));
ArrayLattice<Bool> b(IPosition (2,nx,ny));
f2.set(1.0); d.set(2.0); c.set(Complex(2.0,3.0)); b.set(True);
f1.copyData((3.5*f2) + (cos(d)) - (10/min(d,f2)*(-abs(c))*ntrue(b)) - (C::pi));
casacore::LatticeExprNode::min
friend LatticeExprNode min(const LatticeExprNode &left, const LatticeExprNode &right)
casacore::LatticeExprNode::ntrue
friend LatticeExprNode ntrue(const LatticeExprNode &expr)
casacore::LatticeExprNode::abs
friend LatticeExprNode abs(const LatticeExprNode &expr)
Numerical 1-argument functions which result in a real number regardless of input expression type.
casacore::LatticeExprNode::cos
friend LatticeExprNode cos(const LatticeExprNode &expr)
casacore::C::pi
constexpr double pi
Pi and functions thereof:
Definition Constants.h:363
casacore::True
const Bool True
Definition aipstype.h:41

In this rather silly example, we fill Lattice "f1" with the result of the expression. The expression shows the use of constants, unary operations, binary operations, 1D and 2D functions. It also shows how mixed types can be handled. The output Lattice is a Float, whereas mixed into the expression are subexpressions involving Float, Double, Complex and Bool Lattices.

### Example

ArrayLattice<Float> f1(IPosition (2,nx,ny));
ArrayLattice<Float> f2(IPosition (2,nx,ny));
f2.set(2.0);
LatticeExprNode exp1(sin(f2));
LatticeExprNode exp2(pow(f2,2.0));
f1.copyData(exp1+exp2);
casacore::LatticeExprNode::pow
friend LatticeExprNode pow(const LatticeExprNode &left, const LatticeExprNode &right)
casacore::LatticeExprNode::LatticeExprNode
LatticeExprNode()
Default constructor.
casacore::LatticeExprNode::sin
friend LatticeExprNode sin(const LatticeExprNode &expr)
Numerical 1-argument functions.

In this example, the expression is "sin(f2) + pow(f2,2.0)", but we have put it together from two subexpressions contained in LatticeExprNode objects exp1 and exp2. Again the LatticeExprNode object formed from summing exp1 and exp2 is automatically converted to a LatticeExpr for consumption by copyData

### Motivation

The Lattice expression classes enable the C++ programmer much simpler handling of mathematical expressions involving lattices. In addition, these classes provide the infrastructure on top of which we can build an image calculator for Glish users

### To Do

- masks
- regions

Definition at line 438 of file LatticeExprNode.h.

## Constructor & Destructor Documentation

## LatticeExprNode() [1/35]

casacore::LatticeExprNode::LatticeExprNode | ( |  | ) |

Default constructor.

Referenced by abs, acos, all, amp, any, areRegions(), arg, asin, atan, atan2, avdev, ceil, conj, cos, cosh, exp, floor, fmod, formComplex, fractile, fractileRange, fractileRange, iif, imag, indexin, isNaN, LatticeExprNode(), length, log, log10, makeEqualDim(), mask, max, max, mean, median, min, min, ndim, nelements, newBinaryCmp(), newComplexFunc1D(), newLogBinary(), newNumBinary(), newNumFunc1D(), newNumFunc2D(), newNumReal1D(), newNumUnary(), newRealFunc1D(), nfalse, ntrue, operator!, operator!=, operator%, operator&&, operator*, operator+, operator+, operator-, operator-, operator/, operator<, operator<=, operator=(), operator==, operator>, operator>=, operator[](), operator^, operator||, pa, pow, real, rebin, replace, round, sign, sin, sinh, spectralindex, sqrt, stddev, sum, tan, tanh, toBool, toComplex, toDComplex, toDouble, toFloat, value, and variance.

## LatticeExprNode() [2/35]

casacore::LatticeExprNode::LatticeExprNode | ( | Int64 | constant | ) |

Unary constant expression constructors.

## LatticeExprNode() [3/35]

casacore::LatticeExprNode::LatticeExprNode | ( | Int | constant | ) |

## LatticeExprNode() [4/35]

casacore::LatticeExprNode::LatticeExprNode | ( | uInt | constant | ) |

## LatticeExprNode() [5/35]

casacore::LatticeExprNode::LatticeExprNode | ( | Long | constant | ) |

## LatticeExprNode() [6/35]

casacore::LatticeExprNode::LatticeExprNode | ( | Float | constant | ) |

## LatticeExprNode() [7/35]

casacore::LatticeExprNode::LatticeExprNode | ( | Double | constant | ) |

## LatticeExprNode() [8/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const Complex & | constant | ) |

## LatticeExprNode() [9/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const DComplex & | constant | ) |

## LatticeExprNode() [10/35]

casacore::LatticeExprNode::LatticeExprNode | ( | Bool | constant | ) |

## LatticeExprNode() [11/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const IPosition & |  | ) |

Constructor from an IPosition (containing indices or axes).

## LatticeExprNode() [12/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const Lattice< Float > & | lattice | ) |

Lattice expression (gets Lattice pixels) constructors.

## LatticeExprNode() [13/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const Lattice< Double > & | lattice | ) |

## LatticeExprNode() [14/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const Lattice< Complex > & | lattice | ) |

## LatticeExprNode() [15/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const Lattice< DComplex > & | lattice | ) |

## LatticeExprNode() [16/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const Lattice< Bool > & | lattice | ) |

## LatticeExprNode() [17/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const MaskedLattice< Float > & | lattice | ) |

## LatticeExprNode() [18/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const MaskedLattice< Double > & | lattice | ) |

## LatticeExprNode() [19/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const MaskedLattice< Complex > & | lattice | ) |

## LatticeExprNode() [20/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const MaskedLattice< DComplex > & | lattice | ) |

## LatticeExprNode() [21/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const MaskedLattice< Bool > & | lattice | ) |

## LatticeExprNode() [22/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const LCRegion & | region | ) |

Create a lattice expression from a region.

It results in a boolean expression node.

## LatticeExprNode() [23/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const Slicer & | slicer | ) |

## LatticeExprNode() [24/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const LattRegionHolder & | region | ) |

## LatticeExprNode() [25/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const LatticeExprNode & | other | ) |

Copy constructor (reference semantics).

References LatticeExprNode().

## ~LatticeExprNode()

virtual casacore::LatticeExprNode::~LatticeExprNode | ( |  | ) |

virtual

Destructor, does nothing.

## LatticeExprNode() [26/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const std::shared_ptr< LELInterface< Float > > & | expr | ) |

Make the object from a std::shared_ptr<LELInterface> pointer.

Ideally this function is private, but alas it is needed in LELFunction1D, operator==, and more (too many to make them friend).

## LatticeExprNode() [27/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const std::shared_ptr< LELInterface< Double > > & | expr | ) |

## LatticeExprNode() [28/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const std::shared_ptr< LELInterface< Complex > > & | expr | ) |

## LatticeExprNode() [29/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const std::shared_ptr< LELInterface< DComplex > > & | expr | ) |

## LatticeExprNode() [30/35]

casacore::LatticeExprNode::LatticeExprNode | ( | const std::shared_ptr< LELInterface< Bool > > & | expr | ) |

## LatticeExprNode() [31/35]

casacore::LatticeExprNode::LatticeExprNode | ( | LELInterface< Float > * | expr | ) |

private

Make the object from a LELInterface* pointer.

## LatticeExprNode() [32/35]

casacore::LatticeExprNode::LatticeExprNode | ( | LELInterface< Double > * | expr | ) |

private

## LatticeExprNode() [33/35]

casacore::LatticeExprNode::LatticeExprNode | ( | LELInterface< Complex > * | expr | ) |

private

## LatticeExprNode() [34/35]

casacore::LatticeExprNode::LatticeExprNode | ( | LELInterface< DComplex > * | expr | ) |

private

## LatticeExprNode() [35/35]

casacore::LatticeExprNode::LatticeExprNode | ( | LELInterface< Bool > * | expr | ) |

private

## Member Function Documentation

## areRegions()

Bool casacore::LatticeExprNode::areRegions | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

static private

Test if both operands represent a region.

An exception is thrown if only one of them is a region.

References LatticeExprNode().

## checkArg()

LELAttribute casacore::LatticeExprNode::checkArg | ( | const Block< LatticeExprNode > & | arg,
|  | const Block< Int > & | argType,
|  | Bool | expectArray,
|  | Bool | matchAxes = True )

static

Check the arguments of a function and return the resulting attribute object.

The matchAxes argument tells if the axes have to match exactly or whether it is possible that one expression is a subset of another (i.e. that axes may be missing).
The expectArray argument tells if the result should be an array which is the case if one of the arguments is an array.

References arg, and casacore::True.

## dataType()

DataType casacore::LatticeExprNode::dataType | ( |  | ) | const

inline

Get the data type of the expression.

Definition at line 679 of file LatticeExprNode.h.

References dtype_p.

## doPrepare()

void casacore::LatticeExprNode::doPrepare | ( |  | ) | const

private

Do the preparation for the evaluation.

Referenced by isInvalidScalar().

## eval() [1/10]

void casacore::LatticeExprNode::eval | ( | Bool & | result | ) | const

## eval() [2/10]

void casacore::LatticeExprNode::eval | ( | Complex & | result | ) | const

## eval() [3/10]

void casacore::LatticeExprNode::eval | ( | DComplex & | result | ) | const

## eval() [4/10]

void casacore::LatticeExprNode::eval | ( | Double & | result | ) | const

## eval() [5/10]

void casacore::LatticeExprNode::eval | ( | Float & | result | ) | const

Evaluate the expression (in case it is a scalar).

The "eval" and "get*" functions do the same thing, they just have a slightly different interface.

## eval() [6/10]

void casacore::LatticeExprNode::eval | ( | LELArray< Bool > & | result,
|  | const Slicer & | section ) const

## eval() [7/10]

void casacore::LatticeExprNode::eval | ( | LELArray< Complex > & | result,
|  | const Slicer & | section ) const

## eval() [8/10]

void casacore::LatticeExprNode::eval | ( | LELArray< DComplex > & | result,
|  | const Slicer & | section ) const

## eval() [9/10]

void casacore::LatticeExprNode::eval | ( | LELArray< Double > & | result,
|  | const Slicer & | section ) const

## eval() [10/10]

void casacore::LatticeExprNode::eval | ( | LELArray< Float > & | result,
|  | const Slicer & | section ) const

Evaluate the expression.

One can be sure that the result is not a reference to another array. This function should be used by LatticeExpr and other users.

## evalRef() [1/5]

void casacore::LatticeExprNode::evalRef | ( | LELArrayRef< Bool > & | result,
|  | const Slicer & | section ) const

inline

Definition at line 649 of file LatticeExprNode.h.

References pExprBool_p.

## evalRef() [2/5]

void casacore::LatticeExprNode::evalRef | ( | LELArrayRef< Complex > & | result,
|  | const Slicer & | section ) const

inline

Definition at line 645 of file LatticeExprNode.h.

References pExprComplex_p.

## evalRef() [3/5]

void casacore::LatticeExprNode::evalRef | ( | LELArrayRef< DComplex > & | result,
|  | const Slicer & | section ) const

inline

Definition at line 647 of file LatticeExprNode.h.

References pExprDComplex_p.

## evalRef() [4/5]

void casacore::LatticeExprNode::evalRef | ( | LELArrayRef< Double > & | result,
|  | const Slicer & | section ) const

inline

Definition at line 643 of file LatticeExprNode.h.

References pExprDouble_p.

## evalRef() [5/5]

void casacore::LatticeExprNode::evalRef | ( | LELArrayRef< Float > & | result,
|  | const Slicer & | section ) const

inline

Evaluate the expression.

The result can be a reference to some internal array (in particular to an array in an ArrayLattice object used as a lattice). This function is meant for internal use by the LEL classes and should not be used externally.

Definition at line 641 of file LatticeExprNode.h.

References pExprFloat_p.

## getArrayBool()

Array< Bool > casacore::LatticeExprNode::getArrayBool | ( |  | ) | const

## getArrayComplex()

Array< Complex > casacore::LatticeExprNode::getArrayComplex | ( |  | ) | const

## getArrayDComplex()

Array< DComplex > casacore::LatticeExprNode::getArrayDComplex | ( |  | ) | const

## getArrayDouble()

Array< Double > casacore::LatticeExprNode::getArrayDouble | ( |  | ) | const

## getArrayFloat()

Array< Float > casacore::LatticeExprNode::getArrayFloat | ( |  | ) | const

Evaluate the expression (in case it is a constant array).

## getAttribute()

const LELAttribute & casacore::LatticeExprNode::getAttribute | ( |  | ) | const

inline

Get the attribute object of the expression.

Definition at line 707 of file LatticeExprNode.h.

References pAttr_p.

## getBool()

Bool casacore::LatticeExprNode::getBool | ( |  | ) | const

## getComplex()

Complex casacore::LatticeExprNode::getComplex | ( |  | ) | const

## getDComplex()

DComplex casacore::LatticeExprNode::getDComplex | ( |  | ) | const

## getDouble()

Double casacore::LatticeExprNode::getDouble | ( |  | ) | const

## getFloat()

Float casacore::LatticeExprNode::getFloat | ( |  | ) | const

## getIPosition()

const IPosition & casacore::LatticeExprNode::getIPosition | ( |  | ) | const

Get the IPosition.

It throws an exception if the node does not contain an IPosition.

## hasLock()

Bool casacore::LatticeExprNode::hasLock | ( | FileLocker::LockType |  | ) | const

## isInvalidScalar()

Bool casacore::LatticeExprNode::isInvalidScalar | ( |  | ) | const

inline

Holds the node an invalid scalar?

Definition at line 695 of file LatticeExprNode.h.

References donePrepare_p, doPrepare(), and isInvalid_p.

## isMasked()

Bool casacore::LatticeExprNode::isMasked | ( |  | ) | const

inline

Is the result of "eval" masked?

Definition at line 691 of file LatticeExprNode.h.

References pAttr_p.

## isRegion()

Bool casacore::LatticeExprNode::isRegion | ( |  | ) | const

inline

Is the expression node a region?

Definition at line 683 of file LatticeExprNode.h.

References pAttr_p.

## isScalar()

Bool casacore::LatticeExprNode::isScalar | ( |  | ) | const

inline

Is the result of "eval" a scalar?

Definition at line 687 of file LatticeExprNode.h.

References pAttr_p.

## lock()

Bool casacore::LatticeExprNode::lock | ( | FileLocker::LockType | ,
|  | uInt | nattempts )

Handle locking of the LatticeExpr which is delegated to all of its parts.

## makeBool()

std::shared_ptr< LELInterface< Bool > > casacore::LatticeExprNode::makeBool | ( |  | ) | const

## makeComplex()

std::shared_ptr< LELInterface< Complex > > casacore::LatticeExprNode::makeComplex | ( |  | ) | const

## makeDComplex()

std::shared_ptr< LELInterface< DComplex > > casacore::LatticeExprNode::makeDComplex | ( |  | ) | const

## makeDouble()

std::shared_ptr< LELInterface< Double > > casacore::LatticeExprNode::makeDouble | ( |  | ) | const

## makeEqualDim()

Int casacore::LatticeExprNode::makeEqualDim | ( | LatticeExprNode & | expr0,
|  | LatticeExprNode & | expr1 )

static private

Make (if needed and if possible) the expression nodes such that the dimensionalities are equal.

This is only possible if both nodes have a coordinate system. It is done by creating an ExtendLattice object for the node with the lower dimensionality.

References LatticeExprNode().

## makeFloat()

std::shared_ptr< LELInterface< Float > > casacore::LatticeExprNode::makeFloat | ( |  | ) | const

Convert the expression to another data type.

## newBinaryCmp()

LatticeExprNode casacore::LatticeExprNode::newBinaryCmp | ( | LELBinaryEnums::Operation | oper,
|  | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

static private

Create a new node for a comparison binary operator.

The result has the same data type as the combined input type.

References LatticeExprNode().

## newComplexFunc1D()

LatticeExprNode casacore::LatticeExprNode::newComplexFunc1D | ( | LELFunctionEnums::Function | func,
|  | const LatticeExprNode & | expr )

static private

Create a new node for a complex numerical function with 1 argument.

The result has the same data type as the input.

References LatticeExprNode().

## newLogBinary()

LatticeExprNode casacore::LatticeExprNode::newLogBinary | ( | LELBinaryEnums::Operation | oper,
|  | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

static private

Create a new node for a logical binary operator.

The result has the same data type as the combined input type.

References LatticeExprNode().

## newNumBinary()

LatticeExprNode casacore::LatticeExprNode::newNumBinary | ( | LELBinaryEnums::Operation | oper,
|  | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

static private

Create a new node for a numerical binary operator.

The result has the same data type as the combined input type.

References LatticeExprNode().

## newNumFunc1D()

LatticeExprNode casacore::LatticeExprNode::newNumFunc1D | ( | LELFunctionEnums::Function | func,
|  | const LatticeExprNode & | expr )

static private

Create a new node for a numerical function with 1 argument.

The result has the same data type as the input.

References LatticeExprNode().

## newNumFunc2D()

LatticeExprNode casacore::LatticeExprNode::newNumFunc2D | ( | LELFunctionEnums::Function | func,
|  | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

static private

Create a new node for a numerical function with 2 arguments.

The result has the same data type as the combined input type.

References LatticeExprNode().

## newNumReal1D()

LatticeExprNode casacore::LatticeExprNode::newNumReal1D | ( | LELFunctionEnums::Function | func,
|  | const LatticeExprNode & | expr )

static private

Create a new node for a numerical function with 1 argument that returns a real number.

References LatticeExprNode().

## newNumUnary()

LatticeExprNode casacore::LatticeExprNode::newNumUnary | ( | LELUnaryEnums::Operation | oper,
|  | const LatticeExprNode & | expr )

static private

Create a new node for a numerical unary operation.

The result has the same data type as the input.

References LatticeExprNode().

## newRealFunc1D()

LatticeExprNode casacore::LatticeExprNode::newRealFunc1D | ( | LELFunctionEnums::Function | func,
|  | const LatticeExprNode & | expr )

static private

Create a new node for a real numerical function with 1 argument.

The result has the same data type as the input.

References LatticeExprNode().

## operator=()

LatticeExprNode & casacore::LatticeExprNode::operator= | ( | const LatticeExprNode & | other | ) |

Assignment (reference semantics).

References LatticeExprNode().

## operator[]()

LatticeExprNode casacore::LatticeExprNode::operator[] | ( | const LatticeExprNode & | cond | ) | const

Masking operator using a condition.

The given boolean expression forms a mask/region for this expression node.

References LatticeExprNode().

## replaceScalarExpr()

Bool casacore::LatticeExprNode::replaceScalarExpr | ( |  | ) |

Replace a scalar subexpression by its result.

## resultDataType()

DataType casacore::LatticeExprNode::resultDataType | ( | DataType | left,
|  | DataType | right )

static

Determine the resulting data type from the given data types.

An exception is thrown if they are incompatible.

## resync()

void casacore::LatticeExprNode::resync | ( |  | ) |

## shape()

const IPosition & casacore::LatticeExprNode::shape | ( |  | ) | const

inline

Return the shape of the Lattice including all degenerate axes (ie.

axes with a length of one)

Definition at line 703 of file LatticeExprNode.h.

References pAttr_p.

## unlock()

void casacore::LatticeExprNode::unlock | ( |  | ) |

## Friends And Related Symbol Documentation

## abs

LatticeExprNode abs | ( | const LatticeExprNode & | expr | ) |

friend

Numerical 1-argument functions which result in a real number regardless of input expression type.

References LatticeExprNode().

## acos

LatticeExprNode acos | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## all

LatticeExprNode all | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## amp

LatticeExprNode amp | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

This function finds sqrt(left^2+right^2).

This could be used to find the (biased) polarized intensity if left and right are images of Stokes Q and U.

References LatticeExprNode().

## any

LatticeExprNode any | ( | const LatticeExprNode & | expr | ) |

friend

Functions operating on a logical expression resulting in a scalar; Functions "any" (are any pixels "True") and "all" (are all pixels "True") result in a Bool; functions "ntrue" and "nfalse" result in a Double.

References LatticeExprNode().

## arg

LatticeExprNode arg | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

Referenced by checkArg().

## asin

LatticeExprNode asin | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## atan

LatticeExprNode atan | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## atan2

LatticeExprNode atan2 | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

Numerical 2-argument functions.

References LatticeExprNode().

## avdev

LatticeExprNode avdev | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## ceil

LatticeExprNode ceil | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## conj

LatticeExprNode conj | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## cos

LatticeExprNode cos | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## cosh

LatticeExprNode cosh | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## exp

LatticeExprNode exp | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## floor

LatticeExprNode floor | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## fmod

LatticeExprNode fmod | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

References LatticeExprNode().

## formComplex

LatticeExprNode formComplex | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

Form a complex number from two real numbers.

References LatticeExprNode().

## fractile

LatticeExprNode fractile | ( | const LatticeExprNode & | expr,
|  | const LatticeExprNode & | fraction )

friend

Determine the value of the element at the part fraction from the beginning of the given lattice.

Thus fraction=0.5 is equal to the median.

References LatticeExprNode().

## fractileRange [1/2]

LatticeExprNode fractileRange | ( | const LatticeExprNode & | expr,
|  | const LatticeExprNode & | fraction )

friend

References LatticeExprNode().

## fractileRange [2/2]

LatticeExprNode fractileRange | ( | const LatticeExprNode & | expr,
|  | const LatticeExprNode & | fraction1,
|  | const LatticeExprNode & | fraction2 )

friend

Determine the value range of the elements at the part fraction1 and fraction2 from the beginning of the given lattice.

Both fractions must be >=0 and <=1 and fraction1 must be <= fraction2. By default fraction2 is equal to 1-fraction1. Thus fraction=0.25 gives the quartile range of the lattice.

References LatticeExprNode().

## iif

LatticeExprNode iif | ( | const LatticeExprNode & | condition,
|  | const LatticeExprNode & | arg1,
|  | const LatticeExprNode & | arg2 )

friend

Function resembling the ternary ?

: construct in C++. The argument "condition" has to be a Bool scalar or lattice. If an element in "condition" is True, the corresponding element from "arg1" is taken, otherwise it is taken from "arg2".

References LatticeExprNode().

## imag

LatticeExprNode imag | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## indexin

LatticeExprNode indexin | ( | const LatticeExprNode & | axis,
|  | const LatticeExprNode & | indexFlags )

friend

2-argument function telling per pixel if its index on the given axis is contained in the 2nd argument.

The 2nd argument should be a boolean vector where True means that the index is contained. For indices >= vector_length, the 2nd argument defaults to False. Results in a Bool array.
Caution: Axes start counting at 0; If the axis is a number < 0 or >= ndim, an exception is thrown;

References LatticeExprNode().

## isNaN

LatticeExprNode isNaN | ( | const LatticeExprNode & | expr | ) |

friend

Test if a value is a NaN.

References LatticeExprNode().

## length

LatticeExprNode length | ( | const LatticeExprNode & | expr,
|  | const LatticeExprNode & | axis )

friend

2-argument function to get the length of an axis.

Results in a scalar Float. The 2nd expression (giving the axis number) has to be a real scalar.
Caution: Axes start counting at 0; If the axis is a number < 0, an exception is thrown; If the axis is a number exceeding the dimensionality, 1 is returned;

References LatticeExprNode().

## log

LatticeExprNode log | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## log10

LatticeExprNode log10 | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## mask

LatticeExprNode mask | ( | const LatticeExprNode & | expr | ) |

friend

This function returns the mask of the given expression.

If it has no mask, the result is an array with all True values.

References LatticeExprNode().

## max [1/2]

LatticeExprNode max | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## max [2/2]

LatticeExprNode max | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

References LatticeExprNode().

## mean

LatticeExprNode mean | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## median

LatticeExprNode median | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## min [1/2]

LatticeExprNode min | ( | const LatticeExprNode & | expr | ) |

friend

1-argument functions operating on a numeric expression resulting in a scalar

References LatticeExprNode().

## min [2/2]

LatticeExprNode min | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

References LatticeExprNode().

## ndim

LatticeExprNode ndim | ( | const LatticeExprNode & | expr | ) |

friend

1-argument function to get the dimensionality of a lattice.

0 is returned if it is a scalar. Results in a scalar Float.

References LatticeExprNode().

## nelements

LatticeExprNode nelements | ( | const LatticeExprNode & | expr | ) |

friend

1-argument function to get the number of elements in a lattice.

If the lattice is masked, only the True elements are counted. Results in a scalar Double.

References LatticeExprNode().

## nfalse

LatticeExprNode nfalse | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## ntrue

LatticeExprNode ntrue | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## operator!

LatticeExprNode operator! | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## operator!=

LatticeExprNode operator!= | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

References LatticeExprNode().

## operator%

LatticeExprNode operator% | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

Definition at line 840 of file LatticeExprNode.h.

References casacore::fmod(), and LatticeExprNode().

## operator&&

LatticeExprNode operator&& | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

Logical binary operators.

References LatticeExprNode().

## operator*

LatticeExprNode operator* | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

References LatticeExprNode().

## operator+ [1/2]

LatticeExprNode operator+ | ( | const LatticeExprNode & | expr | ) |

friend

All global functions need to be declared as friends.

Unary functions.

References LatticeExprNode().

## operator+ [2/2]

LatticeExprNode operator+ | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

Numerical binary operators.

References LatticeExprNode().

## operator- [1/2]

LatticeExprNode operator- | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## operator- [2/2]

LatticeExprNode operator- | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

References LatticeExprNode().

## operator/

LatticeExprNode operator/ | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

References LatticeExprNode().

## operator<

LatticeExprNode operator< | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

References LatticeExprNode().

## operator<=

LatticeExprNode operator<= | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

References LatticeExprNode().

## operator==

LatticeExprNode operator== | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

Relational binary operators.

References LatticeExprNode().

## operator>

LatticeExprNode operator> | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

References LatticeExprNode().

## operator>=

LatticeExprNode operator>= | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

References LatticeExprNode().

## operator^

LatticeExprNode operator^ | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

Definition at line 843 of file LatticeExprNode.h.

References LatticeExprNode(), and casacore::pow().

## operator||

LatticeExprNode operator|| | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

References LatticeExprNode().

## pa

LatticeExprNode pa | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

This function finds 180/pi*atan2(left,right)/2.

This could be used to find the position of linear polarization if left and right are images of Stokes U and Q, respectively.

References LatticeExprNode().

## pow

LatticeExprNode pow | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

References LatticeExprNode().

## real

LatticeExprNode real | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## rebin

LatticeExprNode rebin | ( | const LatticeExprNode & | expr,
|  | const LatticeExprNode & | bin )

friend

2-argument function rebinning Lattice by given factors.

The 2nd argument should be a vector (preferably Float - really Int but Int not well supported in LEL yet). Results in a T array.

References LatticeExprNode().

## replace

LatticeExprNode replace | ( | const LatticeExprNode & | arg1,
|  | const LatticeExprNode & | arg2 )

friend

This function replaces every masked-off element in the first argument with the corresponding element from the second argument.

The first argument has to be a lattice (expression), the second can be a scalar or lattice. The mask of the first argument is not changed. If the first argument does not have a mask, this function does nothing.

References LatticeExprNode().

## round

LatticeExprNode round | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## sign

LatticeExprNode sign | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## sin

LatticeExprNode sin | ( | const LatticeExprNode & | expr | ) |

friend

Numerical 1-argument functions.

References LatticeExprNode().

## sinh

LatticeExprNode sinh | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## spectralindex

LatticeExprNode spectralindex | ( | const LatticeExprNode & | left,
|  | const LatticeExprNode & | right )

friend

This function finds the spectral index alpha = log(s1/s2) / log(f1/f2).

References LatticeExprNode().

## sqrt

LatticeExprNode sqrt | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## stddev

LatticeExprNode stddev | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## sum

LatticeExprNode sum | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## tan

LatticeExprNode tan | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## tanh

LatticeExprNode tanh | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## toBool

LatticeExprNode toBool | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## toComplex

LatticeExprNode toComplex | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## toDComplex

LatticeExprNode toDComplex | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## toDouble

LatticeExprNode toDouble | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## toFloat

LatticeExprNode toFloat | ( | const LatticeExprNode & | expr | ) |

friend

Functions to convert to the given data type.

These are mostly meaningful for down-conversions (e.g. double to float), since up-conversions are automatically done to get matching data types when needed. Note that some conversions are not supported, such as Complex to Double or Float.
The conversion to Bool is useful to convert a region to a boolean lattice, which is only possible if the region is given in world coordinates. Otherwise an exception is thrown.

References LatticeExprNode().

## value

LatticeExprNode value | ( | const LatticeExprNode & | expr | ) |

friend

This function returns the value of the expression without a mask.

References LatticeExprNode().

## variance

LatticeExprNode variance | ( | const LatticeExprNode & | expr | ) |

friend

References LatticeExprNode().

## Member Data Documentation

## donePrepare_p

Bool casacore::LatticeExprNode::donePrepare_p

private

Member variables.

Definition at line 826 of file LatticeExprNode.h.

Referenced by isInvalidScalar().

## dtype_p

DataType casacore::LatticeExprNode::dtype_p

private

Definition at line 827 of file LatticeExprNode.h.

Referenced by dataType().

## iposition_p

IPosition casacore::LatticeExprNode::iposition_p

private

Definition at line 829 of file LatticeExprNode.h.

## isInvalid_p

Bool casacore::LatticeExprNode::isInvalid_p

private

Definition at line 828 of file LatticeExprNode.h.

Referenced by isInvalidScalar().

## pAttr_p

const LELAttribute* casacore::LatticeExprNode::pAttr_p

private

Definition at line 830 of file LatticeExprNode.h.

Referenced by getAttribute(), isMasked(), isRegion(), isScalar(), and shape().

## pExprBool_p

std::shared_ptr<LELInterface<Bool> > casacore::LatticeExprNode::pExprBool_p

private

Definition at line 835 of file LatticeExprNode.h.

Referenced by evalRef().

## pExprComplex_p

std::shared_ptr<LELInterface<Complex> > casacore::LatticeExprNode::pExprComplex_p

private

Definition at line 833 of file LatticeExprNode.h.

Referenced by evalRef().

## pExprDComplex_p

std::shared_ptr<LELInterface<DComplex> > casacore::LatticeExprNode::pExprDComplex_p

private

Definition at line 834 of file LatticeExprNode.h.

Referenced by evalRef().

## pExprDouble_p

std::shared_ptr<LELInterface<Double> > casacore::LatticeExprNode::pExprDouble_p

private

Definition at line 832 of file LatticeExprNode.h.

Referenced by evalRef().

## pExprFloat_p

std::shared_ptr<LELInterface<Float> > casacore::LatticeExprNode::pExprFloat_p

private

Definition at line 831 of file LatticeExprNode.h.

Referenced by evalRef().

The documentation for this class was generated from the following file:

- lattices/LEL/LatticeExprNode.h