CCfits::GroupTable Class Reference

Class representing a hierarchical association of Header Data Units (HDUs). More...

`#include <GroupTable.h>`

Inheritance diagram for CCfits::GroupTable:

## Public Member Functions

HDU * | addMember (HDU &newMember)
| Add a new member to the group table. Adds GRPIDn/GRPLCn keywords to the member HDU. More...
HDU * | addMember (int memberPosition)
| Add a new member to the group table. Adds GRPIDn/GRPLCn keywords to the member HDU. The member must be in the same file as the group table. More...
void | listMembers () const
| List group members.
Public Member Functions inherited from CCfits::BinTable
virtual void | addColumn (ValueType type, const String &columnName, long repeatWidth, const String &colUnit=String(""), long decimals=0, size_t columnNumber=0)
| add a new column to an existing table HDU. More...
virtual BinTable * | clone (FITS *p) const
| virtual copy constructor
virtual void | readData (bool readFlag=false, const std::vector< String > &keys=std::vector< String >())
| read columns and keys specified in the input array. More...
Public Member Functions inherited from CCfits::Table
| Table (const Table &right)
| copy constructor
virtual | ~Table ()
| destructor
virtual Column & | column (const String &colName, bool caseSensitive=true) const
| return a reference to a Table column specified by name. More...
virtual Column & | column (int colIndex) const
| return a reference to the column identified by colIndex More...
virtual const ColMap & | column () const
| return a reference to the multimap containing the columns. More...
virtual ColMap & | column ()
| return a reference to the multimap containing the columns. More...
virtual void | copyColumn (const Column &inColumn, int colIndx, bool insertNewCol=true)
| copy a column (from different or same HDU and file) into an existing table HDU. More...
virtual void | deleteColumn (const String &columnName)
| delete a column in a Table extension by name. More...
void | deleteRows (long first, long number=1)
| delete a range of rows in a table. More...
void | deleteRows (const std::vector< long > &rowList)
| delete a set of rows in the table specified by an input array. More...
virtual long | getRowsize () const
| return the optimal number of rows to read or write at a time More...
void | insertRows (long first, long number=1)
| insert empty rows into the table More...
virtual int | numCols () const
| return the number of Columns in the Table (the TFIELDS keyword).
virtual long | rows () const
| return the number of rows in the table (NAXIS2).
void | rows (long numRows)
| set the number of rows in the Table.
void | updateRows ()
| update the number of rows in the table More...
Public Member Functions inherited from CCfits::ExtHDU
| ExtHDU (const ExtHDU &right)
| copy constructor
virtual | ~ExtHDU ()
| destructor
bool | isCompressed () const
| return true if image is stored using compression. More...
virtual void | makeThisCurrent () const
| move the fitsfile pointer to this current HDU. More...
const String & | name () const
| return the name of the extension.
template<typename S >
void | read (std::valarray< S > &image)
| Read image data into container. More...
template<typename S >
void | read (std::valarray< S > &image, long first, long nElements, S *nullValue)
| read part of an image array, processing null values. More...
template<typename S >
void | read (std::valarray< S > &image, const std::vector< long > &first, long nElements, S *nullValue)
| read part of an image array, processing null values. More...
template<typename S >
void | read (std::valarray< S > &image, const std::vector< long > &firstVertex, const std::vector< long > &lastVertex, const std::vector< long > &stride)
| read an image subset
template<typename S >
void | read (std::valarray< S > &image, long first, long nElements)
| read an image section starting at a specified pixel
template<typename S >
void | read (std::valarray< S > &image, const std::vector< long > &first, long nElements)
| read an image section starting at a location specified by an n-tuple
template<typename S >
void | read (std::valarray< S > &image, const std::vector< long > &firstVertex, const std::vector< long > &lastVertex, const std::vector< long > &stride, S *nullValue)
| read an image subset into valarray image, processing null values More...
int | version () const
| return the extension version number.
void | version (int value)
| set the extension version number
template<typename S >
void | write (const std::vector< long > &first, long nElements, const std::valarray< S > &data, S *nullValue)
| Write a set of pixels to an image extension with the first pixel specified by an n-tuple, processing undefined data. More...
template<typename S >
void | write (long first, long nElements, const std::valarray< S > &data, S *nullValue)
| write array to image starting with a specified pixel and allowing undefined data to be processed More...
template<typename S >
void | write (const std::vector< long > &first, long nElements, const std::valarray< S > &data)
| write array starting from specified n-tuple, without undefined data processing
template<typename S >
void | write (long first, long nElements, const std::valarray< S > &data)
| write array starting from specified pixel number, without undefined data processing
template<typename S >
void | write (const std::vector< long > &firstVertex, const std::vector< long > &lastVertex, const std::valarray< S > &data)
| write a subset (generalize slice) of data to the image More...
Public Member Functions inherited from CCfits::HDU
| HDU (const HDU &right)
| copy constructor
template<typename T >
Keyword & | addKey (const String &name, T val, const String &comment, bool isLongStr=false)
| create a new keyword in the HDU with specified value and comment fields More...
Keyword * | addKey (const Keyword *inKeyword)
| create a copy of an existing Keyword and add to HDU More...
long | axes () const
| return the number of axes in the HDU data section (always 2 for tables).
long | axis (size_t index) const
| return the size of axis numbered index [zero based]. More...
long | bitpix () const
| return the data type keyword. More...
const string & | comment () const
| return the comment string previously read by getComment()
void | copyAllKeys (const HDU *inHdu, const std::vector< int > &keyCategories=std::vector< int >())
| copy all keys from another header More...
void | deleteKey (const String &doomed)
| delete a keyword from the header More...
fitsfile * | fitsPointer () const
| return the fitsfile pointer for the FITS object containing the HDU
std::pair< unsigned long, unsigned long > | getChecksum () const
| compute and return the checksum values for the HDU without creating or modifying the CHECKSUM/DATASUM keywords. More...
const String & | getComments ()
| read the comments from the HDU and add it to the FITS object. More...
const String & | getHistory ()
| read the history information from the HDU and add it to the FITS object. More...
const string & | history () const
| return the history string previously read by getHistory()
void | index (int value)
| set the HDU number
int | index () const
| return the HDU number
std::map< String, Keyword * > & | keyWord ()
| return the associative array containing the HDU keywords so far read.
Keyword & | keyWord (const String &keyName)
| return a (previously read) keyword from the HDU object.
const std::map< string, Keyword * > & | keyWord () const
| return the associative array containing the HDU Keywords that have been read so far.
const Keyword & | keyWord (const string &keyname) const
| return a (previously read) keyword from the HDU object. const version
bool | operator!= (const HDU &right) const
| inequality operator
bool | operator== (const HDU &right) const
| equality operator
FITS * | parent () const
| return reference to the pointer representing the FITS object containing the HDU
void | readAllKeys (const std::vector< int > &keyCategories=std::vector< int >())
| read all of the keys in the header More...
template<typename T >
void | readKey (const String &keyName, T &val)
| read a keyword of specified type from the header of a disk FITS file and return its value. More...
template<typename T >
void | readKeys (std::vector< String > &keyNames, std::vector< T > &vals)
| read a set of specified keywords of the same data type from the header of a disk FITS file and return their values More...
Keyword & | readNextKey (const std::vector< String > &incList, const std::vector< String > &excList, bool searchFromBeginning=false)
| Read the next key in the HDU which matches a string in incList, and does not match string in excList. More...
virtual void | resetImageRead ()
| force next image reading operation to read from file instead of object cache. More...
virtual double | scale () const
| return the BSCALE keyword value
virtual void | scale (double value)
| set the BSCALE keyword value for images (see warning for images of int type) More...
virtual void | suppressScaling (bool toggle=true)
| turn off image scaling regardless of the BSCALE and BZERO keyword values More...
void | updateChecksum ()
| update the CHECKSUM keyword value, assuming DATASUM exists and is correct More...
std::pair< int, int > | verifyChecksum () const
| verify the HDU by computing the checksums and comparing them with the CHECKSUM/DATASUM keywords More...
void | writeChecksum ()
| compute and write the DATASUM and CHECKSUM keyword values More...
void | writeComment (const String &comment="Generic Comment")
| write a comment string. More...
void | writeDate ()
| write a date string to *this.
void | writeHistory (const String &history="Generic History String")
| write a history string. More...
virtual double | zero () const
| return the BZERO keyword value
virtual void | zero (double value)
| set the BZERO keyword value for images (see warning for images of int type) More...

## Protected Member Functions

| GroupTable (FITS *p, int groupID, const String &groupName)
| ctor for creating a new group table More...
Protected Member Functions inherited from CCfits::BinTable
| BinTable (FITS *p, const String &hduName=String(""), bool readFlag=false, const std::vector< String > &keys=std::vector< String >(), int version=1)
| reading constructor. More...
| BinTable (FITS *p, const String &hduName, int rows, const std::vector< String > &columnName=std::vector< String >(), const std::vector< String > &columnFmt=std::vector< String >(), const std::vector< String > &columnUnit=std::vector< String >(), int version=1)
| writing constructor More...
| BinTable (FITS *p, int number)
| read BinTable with HDU number `number` from existing file represented by fitsfile pointer p.
| ~BinTable ()
| destructor.
Protected Member Functions inherited from CCfits::Table
| Table (FITS *p, HduType xtype, const String &hduName, int rows, const std::vector< String > &columnName, const std::vector< String > &columnFmt, const std::vector< String > &columnUnit=std::vector< String >(), int version=1)
| Constructor to be used for creating new HDUs. More...
| Table (FITS *p, int version=1, const String &groupName=String(""))
| Constructor to be called when creating a grouping table. More...
| Table (FITS *p, HduType xtype, const String &hduName=String(""), int version=1)
| Constructor to be called by operations that read Table specified by hduName and version.
| Table (FITS *p, HduType xtype, int number)
| Table constructor for getting Tables by number. More...
void | init (bool readFlag=false, const std::vector< String > &keys=std::vector< String >())
void | numCols (int value)
| set the number of Columns in the Table
Protected Member Functions inherited from CCfits::ExtHDU
| ExtHDU (FITS *p, HduType xtype, const String &hduName, int version)
| default constructor, required as Standard Library Container content.
| ExtHDU (FITS *p, HduType xtype, const String &hduName, int bitpix, int naxis, const std::vector< long > &axes, int version)
| writing constructor. More...
| ExtHDU (FITS *p, HduType xtype, int number)
| ExtHDU constructor for getting ExtHDUs by number. More...
long | gcount () const
| return required gcount keyword value
void | gcount (long value)
| set required gcount keyword value
long | pcount () const
| return required pcount keyword value
void | pcount (long value)
| set required pcount keyword value
HduType | xtension () const
| return the extension type More...
void | xtension (HduType value)
| set the extension type
Protected Member Functions inherited from CCfits::HDU
| HDU (FITS *p=0)
| default constructor, called by HDU subclasses that read from FITS files.
| HDU (FITS *p, int bitpix, int naxis, const std::vector< long > &axes)
| constructor for creating new HDU objects, called by HDU subclasses writing to FITS files.
virtual | ~HDU ()
| destructor
std::vector< long > & | naxes ()
| return the HDU data axis array.

## Additional Inherited Members

Static Public Member Functions inherited from CCfits::ExtHDU
static void | readHduName (const fitsfile *fptr, int hduIndex, String &hduName, int &hduVersion)
| read extension name. More...
Static Public Member Functions inherited from CCfits::HDU
static std::vector< int > | keywordCategories ()
| Return the default enumerated keyword categories used by copyAllKeys() More...

## Detailed Description

Class representing a hierarchical association of Header Data Units (HDUs).

Groups of HDUs allow for the hierarchical association of HDUs. Offices may want to group together HDUs in order to organize data files. The associated HDUs need not be in the same FITS file. Group Composites are the holding structure for the group members. Composites may also be members of a group.

The specification for grouping is defined in "A Hierarchical Grouping Convention for FITS" by Jennings, Pence, Folk and Schlesinger at https://fits.gsfc.nasa.gov/registry/grouping/grouping.pdf

## Constructor & Destructor Documentation

CCfits::GroupTable::GroupTable | ( | FITS * | p,
|  | int | groupID,
|  | const String & | groupName
| ) |  |

protected

ctor for creating a new group table

Parameters

  p | The FITS file in which to place the new HDU
  groupID | ID of new group table
  groupName | Name of new group table

## Member Function Documentation

HDU * CCfits::GroupTable::addMember | ( | HDU & | newMember | ) |

Add a new member to the group table. Adds GRPIDn/GRPLCn keywords to the member HDU.

Parameters

  newMember | Member HDU to be added

HDU * CCfits::GroupTable::addMember | ( | int | memberPosition | ) |

Add a new member to the group table. Adds GRPIDn/GRPLCn keywords to the member HDU. The member must be in the same file as the group table.

Parameters

  memberPosition | Position of HDU to add (Primary array == 1)

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

- GroupTable.h
- GroupTable.cxx