waterfall  0.2dev
 All Classes Files Functions Variables Enumerations Enumerator Pages
Public Member Functions | List of all members
FITSWriter Class Reference

Thin wrapper around some of FITSIO's FITS file writing functions. More...

#include <FITSWriter.h>

Public Member Functions

 FITSWriter ()
 Constructor. More...
 
virtual ~FITSWriter ()
 Destructor.
 
FITSStatus getStatus () const
 Returns the status code of the last CFITSIO call.
 
bool open (string fileName)
 Creates a new FITS file with specified file name. More...
 
void close ()
 
void createImage (long width, long height, int type=FLOAT_IMG)
 
void writeHeader (const char *keyword, int type, void *value, const char *comment)
 
void writeHeader (const char *keyword, const char *value, const char *comment)
 
void writeHeader (const char *keyword, float value, const char *comment)
 
void writeHeader (const char *keyword, int value, const char *comment)
 
void comment (const char *value)
 
void date ()
 
void write (long x, long y, long count, void *data, int type)
 Write FITS pixel data to the current HDU. More...
 
void write (long y, long count, float *data)
 
void write (long y, long count, int16_t *data)
 
void checkStatus (const char *errorMsg)
 

Detailed Description

Thin wrapper around some of FITSIO's FITS file writing functions.

See http://heasarc.gsfc.nasa.gov/fitsio/ for more information on FITSIO library. See http://heasarc.gsfc.nasa.gov/fitsio/c/c_user/ for FITSIO API reference.

Constructor & Destructor Documentation

FITSWriter::FITSWriter ( )

Constructor.

The constructor doesn't open any files. To open a file, call FITSWriter::open().

Member Function Documentation

bool FITSWriter::open ( string  fileName)

Creates a new FITS file with specified file name.

Parameters
fileNamefile name of the created file
void FITSWriter::write ( long  x,
long  y,
long  count,
void *  data,
int  type 
)

Write FITS pixel data to the current HDU.

Note
Unlike FITSIO API, this method uses zero-based indexing of the pixel position.
Parameters
xPosition of the first pixel in data in the first dimension.
yPosition of the first pixel in data in the second dimension.
countNumber of pixels to write.
dataPointer to the data to write.
typeDomain data type of the data (for example, TFLOAT for float).

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