casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
casa::FITSQualityImage Class Reference

Class providing native access to FITS Quality Images. More...

#include <FITSQualityImage.h>

Inheritance diagram for casa::FITSQualityImage:
casa::ImageInterface< Float > casa::MaskedLattice< Float > casa::Lattice< Float > casa::LatticeBase

List of all members.

Public Member Functions

 FITSQualityImage (const String &name)
 Construct a FITSQualityImage from the FITS file name and extensions specified in the input.
 FITSQualityImage (const String &name, uInt whichDataHDU, uInt whichErrorHDU)
 Construct a FITSQualityImage from the disk FITS file name and extensions.
 FITSQualityImage (const FITSQualityImage &other)
 Copy constructor (reference semantics)
 ~FITSQualityImage ()
 Destructor.
FITSQualityImageoperator= (const FITSQualityImage &other)
 Assignment (reference semantics).
virtual ImageInterface< Float > * cloneII () const
 Make a copy of the object with new (reference semantics).
FITSImagefitsData () const
 Get the FITS data.
FITSErrorImagefitsError () const
 Get the FITS error.
virtual String imageType () const
 Get the image type (returns FITSImage).
virtual void resize (const TiledShape &newShape)
 Function which changes the shape of the FITSQualityImage.
virtual Bool isMasked () const
 Has the object really a mask? The FITSQualityImage always has a pixel mask and never has a region mask so this always returns True.
virtual Bool hasPixelMask () const
 FITSQualityImage always has a pixel mask so returns True.
virtual const Lattice< Bool > & pixelMask () const
 Get access to the pixelmask.
virtual Lattice< Bool > & pixelMask ()
virtual const LatticeRegiongetRegionPtr () const
 Get the region used.
virtual Bool doGetSlice (Array< Float > &buffer, const Slicer &theSlice)
 Do the actual get of the data.
virtual void doPutSlice (const Array< Float > &sourceBuffer, const IPosition &where, const IPosition &stride)
 The FITSQualityImage is not writable, so this throws an exception.
virtual Bool doGetMaskSlice (Array< Bool > &buffer, const Slicer &section)
 Do the actual get of the mask data.
virtual Bool isPaged () const
 The lattice is paged to disk.
virtual Bool isPersistent () const
 The lattice is persistent.
virtual Bool isWritable () const
 The FITSImage is not writable.
virtual String name (Bool stripPath=False) const
 Returns the name of the disk file.
virtual IPosition shape () const
 Return the shape of the FITSImage.
virtual uInt advisedMaxPixels () const
 Returns the maximum recommended number of pixels for a cursor.
virtual IPosition doNiceCursorShape (uInt maxPixels) const
 Help the user pick a cursor for most efficient access if they only want pixel values and don't care about the order or dimension of the cursor.
virtual Bool ok () const
 Check class invariants.
virtual void tempClose ()
 Temporarily close the image.
virtual void tempCloseData ()
virtual void tempCloseError ()
virtual void reopen ()
 Reopen a temporarily closed image.
DataType dataType () const
 Return the (internal) data type (TpFloat or TpShort).
uInt whichDataHDU () const
 Return the data HDU number.
uInt whichErrorHDU () const
 Return the error HDU number.
virtual uInt maximumCacheSize () const
 Maximum size - not necessarily all used.
virtual void setMaximumCacheSize (uInt howManyPixels)
 Set the maximum (allowed) cache size as indicated.
virtual void setCacheSizeFromPath (const IPosition &sliceShape, const IPosition &windowStart, const IPosition &windowLength, const IPosition &axisPath)
 Set the cache size as to "fit" the indicated path.
virtual void setCacheSizeInTiles (uInt howManyTiles)
 Set the actual cache size for this Array to be be big enough for the indicated number of tiles.
virtual void clearCache ()
 Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSize was called.
virtual void showCacheStatistics (ostream &os) const
 Report on cache success.

Static Public Member Functions

static Bool qualFITSInfo (String &error, TableRecord &dataExtMiscInfo, TableRecord &errorExtMiscInfo, const TableRecord &miscInfo)
 Given the misc-info of a CASA image (with quality-axis) the misc-info of the data sub-image and the error sub-image are produced.

Private Member Functions

void reopenIfNeeded () const
 Reopen the image if needed.
void reopenDataIfNeeded ()
void reopenErrorIfNeeded ()
void getExtInfo ()
 Get the extension indices from an extension expression.
void setup ()
 Setup the object (used by constructors).
Bool checkInput ()
 Make sure the input is compatible.

Private Attributes

String name_p
String fullname_p
FITSImagefitsdata_p
FITSErrorImagefitserror_p
Lattice< Bool > * pPixelMask_p
TiledShape shape_p
uInt whichDataHDU_p
uInt whichErrorHDU_p
uInt whichMaskHDU_p
FITSErrorImage::ErrorType errType_p
Bool isClosed_p
Bool isDataClosed_p
Bool isErrorClosed_p

Detailed Description

Class providing native access to FITS Quality Images.

Intended use:

Public interface

Review Status

Test programs:
tFITSQualityImage

Prerequisite

Etymology

The class provides access to a quality image via two extensions in the corresponding FITS file.

Synopsis

A FITSQualityImage provides native access to FITS images by accessing the data and the error values via the classes FITSImage and FITSErrorImage, respectively. A QualityCoordinate connects these two layers. The FITSQualityImage is read only.

Example

           FITSQualityImage fitsQIStat("im.fits", 1, 2);
           LogIO logger(or);
           ImageStatistics<Float> stats(fitsQIStat, logger);
           Bool ok = stats.display();

Motivation

This provides access to FITS Quality Images

Definition at line 89 of file FITSQualityImage.h.


Constructor & Destructor Documentation

casa::FITSQualityImage::FITSQualityImage ( const String name) [explicit]

Construct a FITSQualityImage from the FITS file name and extensions specified in the input.

casa::FITSQualityImage::FITSQualityImage ( const String name,
uInt  whichDataHDU,
uInt  whichErrorHDU 
) [explicit]

Construct a FITSQualityImage from the disk FITS file name and extensions.

Copy constructor (reference semantics)

Destructor.


Member Function Documentation

virtual uInt casa::FITSQualityImage::advisedMaxPixels ( ) const [virtual]

Returns the maximum recommended number of pixels for a cursor.

This is the number of pixels in a tile.

Reimplemented from casa::Lattice< Float >.

Make sure the input is compatible.

virtual void casa::FITSQualityImage::clearCache ( ) [virtual]

Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSize was called.

Reimplemented from casa::LatticeBase.

virtual ImageInterface<Float>* casa::FITSQualityImage::cloneII ( ) const [virtual]

Make a copy of the object with new (reference semantics).

Implements casa::ImageInterface< Float >.

DataType casa::FITSQualityImage::dataType ( ) const [virtual]

Return the (internal) data type (TpFloat or TpShort).

Reimplemented from casa::Lattice< Float >.

virtual Bool casa::FITSQualityImage::doGetMaskSlice ( Array< Bool > &  buffer,
const Slicer section 
) [virtual]

Do the actual get of the mask data.

The return value is always False, thus the buffer does not reference another array.

Reimplemented from casa::MaskedLattice< Float >.

virtual Bool casa::FITSQualityImage::doGetSlice ( Array< Float > &  buffer,
const Slicer theSlice 
) [virtual]

Do the actual get of the data.

Returns False as the data do not reference another Array

Implements casa::Lattice< Float >.

virtual IPosition casa::FITSQualityImage::doNiceCursorShape ( uInt  maxPixels) const [virtual]

Help the user pick a cursor for most efficient access if they only want pixel values and don't care about the order or dimension of the cursor.

Reimplemented from casa::LatticeBase.

virtual void casa::FITSQualityImage::doPutSlice ( const Array< Float > &  sourceBuffer,
const IPosition where,
const IPosition stride 
) [virtual]

The FITSQualityImage is not writable, so this throws an exception.

Implements casa::Lattice< Float >.

Get the FITS data.

Definition at line 121 of file FITSQualityImage.h.

References fitsdata_p.

Get the FITS error.

Definition at line 124 of file FITSQualityImage.h.

References fitserror_p.

Get the extension indices from an extension expression.

virtual const LatticeRegion* casa::FITSQualityImage::getRegionPtr ( ) const [virtual]

Get the region used.

There is no region. Always returns 0.

Implements casa::MaskedLattice< Float >.

virtual Bool casa::FITSQualityImage::hasPixelMask ( ) const [virtual]

FITSQualityImage always has a pixel mask so returns True.

Reimplemented from casa::MaskedLattice< Float >.

virtual String casa::FITSQualityImage::imageType ( ) const [virtual]

Get the image type (returns FITSImage).

Implements casa::ImageInterface< Float >.

virtual Bool casa::FITSQualityImage::isMasked ( ) const [virtual]

Has the object really a mask? The FITSQualityImage always has a pixel mask and never has a region mask so this always returns True.

Reimplemented from casa::MaskedLattice< Float >.

virtual Bool casa::FITSQualityImage::isPaged ( ) const [virtual]

The lattice is paged to disk.

Reimplemented from casa::LatticeBase.

virtual Bool casa::FITSQualityImage::isPersistent ( ) const [virtual]

The lattice is persistent.

Reimplemented from casa::LatticeBase.

virtual Bool casa::FITSQualityImage::isWritable ( ) const [virtual]

The FITSImage is not writable.

Reimplemented from casa::LatticeBase.

virtual uInt casa::FITSQualityImage::maximumCacheSize ( ) const [virtual]

Maximum size - not necessarily all used.

In pixels.

Reimplemented from casa::LatticeBase.

virtual String casa::FITSQualityImage::name ( Bool  stripPath = False) const [virtual]

Returns the name of the disk file.

Implements casa::ImageInterface< Float >.

virtual Bool casa::FITSQualityImage::ok ( ) const [virtual]

Check class invariants.

Implements casa::ImageInterface< Float >.

FITSQualityImage& casa::FITSQualityImage::operator= ( const FITSQualityImage other)

Assignment (reference semantics).

virtual const Lattice<Bool>& casa::FITSQualityImage::pixelMask ( ) const [virtual]

Get access to the pixelmask.

FITSQualityImage always has a pixel mask.

Reimplemented from casa::MaskedLattice< Float >.

Reimplemented from casa::MaskedLattice< Float >.

static Bool casa::FITSQualityImage::qualFITSInfo ( String error,
TableRecord dataExtMiscInfo,
TableRecord errorExtMiscInfo,
const TableRecord miscInfo 
) [static]

Given the misc-info of a CASA image (with quality-axis) the misc-info of the data sub-image and the error sub-image are produced.

This ensures that, if written to FITS, the data and error extensions have the all necessary keywords.

virtual void casa::FITSQualityImage::reopen ( ) [virtual]

Reopen a temporarily closed image.

Reimplemented from casa::LatticeBase.

void casa::FITSQualityImage::reopenIfNeeded ( ) const [private]

Reopen the image if needed.

virtual void casa::FITSQualityImage::resize ( const TiledShape newShape) [virtual]

Function which changes the shape of the FITSQualityImage.

Throws an exception as FITSQualityImage is not writable.

Implements casa::ImageInterface< Float >.

virtual void casa::FITSQualityImage::setCacheSizeFromPath ( const IPosition sliceShape,
const IPosition windowStart,
const IPosition windowLength,
const IPosition axisPath 
) [virtual]

Set the cache size as to "fit" the indicated path.

Reimplemented from casa::LatticeBase.

virtual void casa::FITSQualityImage::setCacheSizeInTiles ( uInt  howManyTiles) [virtual]

Set the actual cache size for this Array to be be big enough for the indicated number of tiles.

This cache is not shared with PagedArrays in other rows and is always clipped to be less than the maximum value set using the setMaximumCacheSize member function. tiles. Tiles are cached using a first in first out algorithm.

Reimplemented from casa::LatticeBase.

virtual void casa::FITSQualityImage::setMaximumCacheSize ( uInt  howManyPixels) [virtual]

Set the maximum (allowed) cache size as indicated.

Reimplemented from casa::LatticeBase.

void casa::FITSQualityImage::setup ( ) [private]

Setup the object (used by constructors).

virtual IPosition casa::FITSQualityImage::shape ( ) const [virtual]

Return the shape of the FITSImage.

Implements casa::LatticeBase.

virtual void casa::FITSQualityImage::showCacheStatistics ( ostream &  os) const [virtual]

Report on cache success.

Reimplemented from casa::LatticeBase.

virtual void casa::FITSQualityImage::tempClose ( ) [virtual]

Temporarily close the image.

Reimplemented from casa::LatticeBase.

virtual void casa::FITSQualityImage::tempCloseData ( ) [virtual]
virtual void casa::FITSQualityImage::tempCloseError ( ) [virtual]

Return the data HDU number.

Definition at line 206 of file FITSQualityImage.h.

References whichDataHDU_p.

Return the error HDU number.

Definition at line 210 of file FITSQualityImage.h.

References whichErrorHDU_p.


Member Data Documentation

Definition at line 249 of file FITSQualityImage.h.

Definition at line 242 of file FITSQualityImage.h.

Referenced by fitsData().

Definition at line 243 of file FITSQualityImage.h.

Referenced by fitsError().

Definition at line 241 of file FITSQualityImage.h.

Definition at line 250 of file FITSQualityImage.h.

Definition at line 251 of file FITSQualityImage.h.

Definition at line 252 of file FITSQualityImage.h.

Definition at line 240 of file FITSQualityImage.h.

Definition at line 244 of file FITSQualityImage.h.

Definition at line 245 of file FITSQualityImage.h.

Definition at line 246 of file FITSQualityImage.h.

Referenced by whichDataHDU().

Definition at line 247 of file FITSQualityImage.h.

Referenced by whichErrorHDU().

Definition at line 248 of file FITSQualityImage.h.


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