casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::MSSummary Class Reference

Provides and lists information about the header of an image. More...

#include <MSSummary.h>

Public Member Functions

 MSSummary (const MeasurementSet &ms, Float maxCacheMB=50.0)
 Constructor. More...
 
 MSSummary (const MeasurementSet *ms, Float maxCacheMB=50.0)
 
 MSSummary (const MeasurementSet *ms, const String msname, Float maxCacheMB=50.0)
 
 MSSummary (std::shared_ptr< MSMetaData > msmd)
 construct the object using an MSMetaDataObject More...
 
 ~MSSummary ()
 Destructor. More...
 
Int nrow () const
 Retrieve number of rows. More...
 
String name () const
 Retrieve image name. More...
 
Bool setMS (const MeasurementSet &ms, Float maxCacheMB=-1)
 Set a new MS. More...
 
void list (LogIO &os, Bool verbose=False, Bool oneBased=True) const
 List all header information. More...
 
void list (LogIO &os, Record &outRec, Bool verbose=False, Bool fillRecord=True, Bool oneBased=True) const
 Return some useful info in a record too along with os. More...
 
void listTitle (LogIO &os) const
 List a title for the Summary. More...
 
void listWhere (LogIO &os, Bool verbose=False) const
 List convenient groupings of tables: list where MS obtained (Observation and Array tables) More...
 
void listWhat (LogIO &os, Bool verbose=False) const
 List what was observed (Field and Main tables) More...
 
void listWhat (LogIO &os, Record &outRec, Bool verbose=False, Bool fillRecord=True) const
 
void listHow (LogIO &os, Bool verbose=False, Bool oneBased=True) const
 List how data were obtained (SpectralWindow, Feed, and Antenna tables) More...
 
void listMain (LogIO &os, Bool verbose=False) const
 List main table. More...
 
void listMain (LogIO &os, Record &outRec, Bool verbose=False, Bool fillRecord=True) const
 Return some useful info in a record too along with os. More...
 
void getScanSummary (Record &outRec) const
 Return a Record with information derived from the main table. More...
 
void listAntenna (LogIO &os, Bool verbose=False) const
 List subtables. More...
 
void listFeed (LogIO &os, Bool verbose=False, Bool oneBased=True) const
 
void listField (LogIO &os, Bool verbose=False) const
 
void listField (LogIO &os, Record &outRec, Bool verbose=False, Bool fillRecord=True) const
 
void listObservation (LogIO &os, Bool verbose=False) const
 
void listHistory (LogIO &os) const
 
void listPolarization (LogIO &os, Bool verbose=False) const
 
void listSource (LogIO &os, Bool verbose=False) const
 
void listSpectralWindow (LogIO &os, Bool verbose=False) const
 
void getSpectralWindowInfo (Record &outRec) const
 
void listSpectralAndPolInfo (LogIO &os, Bool verbose=False, Bool oneBased=True) const
 
void listSysCal (LogIO &os, Bool verbose=False) const
 
void listWeather (LogIO &os, Bool verbose=False) const
 
void listTables (LogIO &os, Bool verbose=False) const
 List table size summary. More...
 
void setListUnflaggedRowCount (Bool v)
 
void setMetaDataCacheSizeInMB (Float)
 OBSOLETE. More...
 

Private Member Functions

void clearFlags (LogIO &os) const
 Clear formatting flags. More...
 

Private Attributes

const MeasurementSetpMS
 Pointer to MS. More...
 
std::shared_ptr< MSMetaData_msmd
 
const String dashlin1
 Formatting strings. More...
 
const String dashlin2
 
Vector< IntnVisPerField_
 For keeping track of the number of vis per field. More...
 
String msname_p
 Name of the MS used in the constructor. More...
 
Bool _listUnflaggedRowCount
 
Float _cacheSizeMB
 

Detailed Description

Provides and lists information about the header of an image.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

This class lists the ancilliary or header information from a MeasurementSet in a Summary format.

Synopsis

MSs consist of pixels and descriptive information stored in what is loosely termed the header. This is information describing the coordinate system, the image units etc. This class enables you to retrieve the descriptive header information and/or list it.

Example

PagedMS<Float> inMS(fileName);
MSSummary<Float> header(inMS);
LogOrigin or("myClass", "myFunction(...)", WHERE);
LogIO os(or);
header.list(os);

A PagedMS object is constructed and then logged to the supplied LogIO object.


Caution: Note that if the PagedMS goes out of scope, this class will retrieve rubbish as it just maintains a pointer to the image;

Motivation

The viewing of the image header is a basic capability that is commonly required.

Definition at line 95 of file MSSummary.h.

Constructor & Destructor Documentation

casacore::MSSummary::MSSummary ( const MeasurementSet ms,
Float  maxCacheMB = 50.0 
)

Constructor.

maxCacheMB is the maximum cache size in MB to use for the created MSMetaData object.

casacore::MSSummary::MSSummary ( const MeasurementSet ms,
Float  maxCacheMB = 50.0 
)
casacore::MSSummary::MSSummary ( const MeasurementSet ms,
const String  msname,
Float  maxCacheMB = 50.0 
)
casacore::MSSummary::MSSummary ( std::shared_ptr< MSMetaData msmd)

construct the object using an MSMetaDataObject

casacore::MSSummary::~MSSummary ( )

Destructor.

Member Function Documentation

void casacore::MSSummary::clearFlags ( LogIO os) const
private

Clear formatting flags.

void casacore::MSSummary::getScanSummary ( Record outRec) const

Return a Record with information derived from the main table.

void casacore::MSSummary::getSpectralWindowInfo ( Record outRec) const
void casacore::MSSummary::list ( LogIO os,
Bool  verbose = False,
Bool  oneBased = True 
) const

List all header information.

void casacore::MSSummary::list ( LogIO os,
Record outRec,
Bool  verbose = False,
Bool  fillRecord = True,
Bool  oneBased = True 
) const

Return some useful info in a record too along with os.

void casacore::MSSummary::listAntenna ( LogIO os,
Bool  verbose = False 
) const

List subtables.

void casacore::MSSummary::listFeed ( LogIO os,
Bool  verbose = False,
Bool  oneBased = True 
) const
void casacore::MSSummary::listField ( LogIO os,
Bool  verbose = False 
) const
void casacore::MSSummary::listField ( LogIO os,
Record outRec,
Bool  verbose = False,
Bool  fillRecord = True 
) const
void casacore::MSSummary::listHistory ( LogIO os) const
void casacore::MSSummary::listHow ( LogIO os,
Bool  verbose = False,
Bool  oneBased = True 
) const

List how data were obtained (SpectralWindow, Feed, and Antenna tables)

void casacore::MSSummary::listMain ( LogIO os,
Bool  verbose = False 
) const

List main table.

void casacore::MSSummary::listMain ( LogIO os,
Record outRec,
Bool  verbose = False,
Bool  fillRecord = True 
) const

Return some useful info in a record too along with os.

void casacore::MSSummary::listObservation ( LogIO os,
Bool  verbose = False 
) const
void casacore::MSSummary::listPolarization ( LogIO os,
Bool  verbose = False 
) const
void casacore::MSSummary::listSource ( LogIO os,
Bool  verbose = False 
) const
void casacore::MSSummary::listSpectralAndPolInfo ( LogIO os,
Bool  verbose = False,
Bool  oneBased = True 
) const
void casacore::MSSummary::listSpectralWindow ( LogIO os,
Bool  verbose = False 
) const
void casacore::MSSummary::listSysCal ( LogIO os,
Bool  verbose = False 
) const
void casacore::MSSummary::listTables ( LogIO os,
Bool  verbose = False 
) const

List table size summary.

void casacore::MSSummary::listTitle ( LogIO os) const

List a title for the Summary.

void casacore::MSSummary::listWeather ( LogIO os,
Bool  verbose = False 
) const
void casacore::MSSummary::listWhat ( LogIO os,
Bool  verbose = False 
) const

List what was observed (Field and Main tables)

void casacore::MSSummary::listWhat ( LogIO os,
Record outRec,
Bool  verbose = False,
Bool  fillRecord = True 
) const
void casacore::MSSummary::listWhere ( LogIO os,
Bool  verbose = False 
) const

List convenient groupings of tables: list where MS obtained (Observation and Array tables)

String casacore::MSSummary::name ( ) const

Retrieve image name.

Int casacore::MSSummary::nrow ( ) const

Retrieve number of rows.

void casacore::MSSummary::setListUnflaggedRowCount ( Bool  v)
inline

Definition at line 173 of file MSSummary.h.

References _listUnflaggedRowCount.

void casacore::MSSummary::setMetaDataCacheSizeInMB ( Float  )
inline

OBSOLETE.

No longer does anything, kept for compilation backward compatibility.

Definition at line 176 of file MSSummary.h.

Bool casacore::MSSummary::setMS ( const MeasurementSet ms,
Float  maxCacheMB = -1 
)

Set a new MS.

maxCacheMB is the maximum cache size of the created MSMetaData tool. If negative, the cache size used when this object was created is used.

Member Data Documentation

Float casacore::MSSummary::_cacheSizeMB
private

Definition at line 197 of file MSSummary.h.

Bool casacore::MSSummary::_listUnflaggedRowCount
private

Definition at line 195 of file MSSummary.h.

Referenced by setListUnflaggedRowCount().

std::shared_ptr<MSMetaData> casacore::MSSummary::_msmd
private

Definition at line 181 of file MSSummary.h.

const String casacore::MSSummary::dashlin1
private

Formatting strings.

Definition at line 184 of file MSSummary.h.

const String casacore::MSSummary::dashlin2
private

Definition at line 184 of file MSSummary.h.

String casacore::MSSummary::msname_p
private

Name of the MS used in the constructor.

Definition at line 193 of file MSSummary.h.

Vector<Int> casacore::MSSummary::nVisPerField_
mutableprivate

For keeping track of the number of vis per field.

Definition at line 190 of file MSSummary.h.

const MeasurementSet* casacore::MSSummary::pMS
private

Pointer to MS.

Definition at line 180 of file MSSummary.h.


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