Loading...
Searching...
No Matches
casacore::LatticeUtilities Class Reference
lattices package (libcasa_lattices) » Lattices_module

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.
template<class T>
static void | replicate (Lattice< T > &lat, const Slicer &region, const Array< T > &pixels)
| Replicate array through lattice in the specified region.
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).
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).

## Detailed Description

Static functions for Lattices

### Intended use:

Public interface

### Review Status

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

### Prerequisite

- Lattice

### Synopsis

Some static helper functions for Lattices

### Motivation

Common functionality not appropriate for Lattice member functions

### To Do

- nothing I know of

Definition at line 64 of file LatticeUtilities.h.

## Member Function Documentation

## addDegenerateAxes()

template<class T>

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.

## bin()

template<class T>

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).

References bin().

Referenced by bin().

## copyDataAndMask()

template<class T>

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.

References casacore::False.

## replicate()

template<class T>

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:

- lattices/Lattices/LatticeUtilities.h