I/O routines

  •  template <class T> T SPreadKey(PHDU& primary, const string Keyname, 
           const T DefValue)
    

    Read a keyword value from the primary header.

  •  template <class T> T SPreadKey(ExtHDU& ext, const string Keyname, 
           const T DefValue)
    

    Read a keyword value from an extension header.

  •  template <class T> T SPreadKey(ExtHDU& ext, const string Keyname, 
           const Integer RowNumber, const T DefValue)
    

    Read a keyword value which may be in a column for type II files.

  •  template <class T> void SPreadCol(ExtHDU& ext, const string ColName, 
           valarray<T>& Data)
    

    Read a column into a valarray.

  •  template <class T> void SPreadCol(ExtHDU& ext, const string ColName, 
           vector<T>& Data)
    

    Read a column into a vector.

  •  template <class T> void SPreadCol(ExtHDU& ext, const string ColName, 
           const Integer RowNumber, valarray<T>& Data)
    

    Read a column from a Type II file into a valarray.

  •  template <class T> void SPreadCol(ExtHDU& ext, const string ColName, 
           const Integer RowNumber, vector<T>& Data)
    

    Read a column from a Type II file into a vector.

  •  template <class T> void SPreadVectorCol(ExtHDU& ext, const string ColName, 
           vector<valarray<T> >& Data)
    

    Read a vector column into a vector of valarrays.

  •  template <class T> void SPreadVectorCol(ExtHDU& ext, const string ColName, 
           vector<vector<T> >& Data)
    

    Read a vector column into a vector of vectors.

  •  template <class T> void SPreadVectorColRow(ExtHDU& ext, const string ColName, 
           const Integer RowNumber, valarray<T>& Data)
    

    Read a single row of a vector column into a valarray.

  •  template <class T> void SPreadVectorColRow(ExtHDU& ext, const string ColName, 
           const Integer RowNumber, vector<T>& Data)
    

    Read a single row of a vector column into a vector.

  •  template <class T> void SPwriteKey(PHDU& primary, const string Keyname, 
           const T KeyValue, const string Comment)
    

    Write a keyword to the primary header. This uses the CONTINUE convention if KeyValue is a string and longer than 68 characters.

  •  template <class T> void SPwriteKey(Table& primary, const string Keyname, 
           const T KeyValue, const string Comment)
    

    Write a keyword to a table extension. This uses the CONTINUE convention if KeyValue is a string and longer than 68 characters.

  •  template <class T> void SPwriteCol(Table& table, const string ColName,
           const valarray<T>& Data, const bool forceCol = false)
    

    Write a column from a valarray. If the data size is 1 or all values are the same then just write a keyword unless the forceCol bool is true.

  •  template <class T> void SPwriteCol(Table& table, const string ColName,
           const vector<T>& Data, const bool forceCol = false)
    

    Write a column from a vector. If the data size is 1 or all values are the same then just write a keyword unless the forceCol bool is true.

  •  template <class T> void SPwriteVectorCol(Table& table, const string ColName,
           const vector<valarray<T> >& Data, const bool forceCol = false)
    

    Write a column from a vector of valarrays. If the data size is 1 or all values are the same then just write a keyword unless the forceCol bool is true. If all values are the same within all valarrays then write a scalar column.

  •  template <class T> void SPwriteVectorCol(Table& table, const string ColName,
           const vector<vector<T> >& Data, const bool forceCol = false)
    

    Write a column from a vector of vectors. If the data size is 1 or all values are the same then just write a keyword unless the forceCol bool is true. If all values are the same within all valarrays then write a scalar column.

  •  template <class T> bool SPneedCol(const T& Data, bool& isvector)
    

    Check whether a column is required and if it needs to be a vector column. Note that T is assumed to be a valarray or vector of a valarray of some type.

  •  template <class T> bool SPneedCol(const T& Data)
    

    Check whether a column is required. For this overloaded version T is assumed to be a valarray or vector of scalar of some type.

  •  vector<string> SPreadAllPrimaryKeywords(const string& filename)
    

    Real all keywords from the primary extension into a vector of strings each of which is of format “KeyName = KeyValue”.

  •  vector<string> SPreadAllKeywords(const string&
      filename, const string& hduName,
           const int& hduNumber)
    

    Real all keywords from an extension into a vector of strings each of which is of format “KeyName = KeyValue”.


HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public

Last modified: Wednesday, 23-Mar-2022 21:09:02 EDT