casa
5.7.0-16
|
Static functions for Lattices. More...
#include <LatticeUtilities.h>
Static Public Member Functions | |
template<class T > | |
static void | copyDataAndMask (LogIO &os, MaskedLattice< T > &out, const MaskedLattice< T > &in, Bool zeroMasked=False) |
Copy data and mask from input to output. More... | |
template<class T > | |
static void | replicate (Lattice< T > &lat, const Slicer ®ion, const Array< T > &pixels) |
Replicate array through lattice in the specified region. More... | |
template<class T > | |
static void | bin (MaskedArray< T > &out, const MaskedArray< T > &in, uInt axis, uInt bin) |
Bin up one axis of MaskedArray (uses Lattices in implementation) More... | |
template<class T > | |
static void | addDegenerateAxes (Lattice< T > *&pLatOut, const Lattice< T > &latIn, uInt nDim) |
Add degenerate axes to the lattice if needed (nDim is the desired number of dimensions for the output lattice). More... | |
Static functions for Lattices.
Public interface
Some static helper functions for Lattices
Common functionality not appropriate for Lattice member functions
Definition at line 67 of file LatticeUtilities.h.
|
static |
Add degenerate axes to the lattice if needed (nDim is the desired number of dimensions for the output lattice).
If the shapes are the same, the returned pointer holds a SubLattice. If a reshape was necessary, the pointer holds an ExtendLattice. The pointer is the callers responsibility to delete.
|
static |
Bin up one axis of MaskedArray (uses Lattices in implementation)
|
static |
Copy data and mask from input to output.
If the input has no mask, that means all True (good), and these values will be transferred to the output. Mask transfer only occurs if the output has a writeable mask.
|
static |
Replicate array through lattice in the specified region.
The shape of pixels
has to fit exactly into the shape of the selected region for each axis of pixels
. Otherwise and exception will be thrown. For example, if the shape of the region is [10,20], the shape of pixels could be [10] and it will be replicated 20 times. Another example would be that the shape of pixels could be [5,10] and it would be replicated 4 times fitting into the Lattice