casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | List of all members
casacore::LatticeUtilities Class Reference

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 &region, 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...
 

Detailed Description

Static functions for Lattices.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd
Test programs:
tLatticeUtilities

Prerequisite

Synopsis

Some static helper functions for Lattices

Motivation

Common functionality not appropriate for Lattice member functions

To Do

Definition at line 66 of file LatticeUtilities.h.

Member Function Documentation

template<class T >
static void casacore::LatticeUtilities::addDegenerateAxes ( Lattice< T > *&  pLatOut,
const Lattice< T > &  latIn,
uInt  nDim 
)
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.

template<class T >
static void casacore::LatticeUtilities::bin ( MaskedArray< T > &  out,
const MaskedArray< T > &  in,
uInt  axis,
uInt  bin 
)
static

Bin up one axis of MaskedArray (uses Lattices in implementation)

template<class T >
static void casacore::LatticeUtilities::copyDataAndMask ( LogIO os,
MaskedLattice< T > &  out,
const MaskedLattice< T > &  in,
Bool  zeroMasked = False 
)
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.

template<class T >
static void casacore::LatticeUtilities::replicate ( Lattice< T > &  lat,
const Slicer region,
const Array< T > &  pixels 
)
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


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