27.01.2015 Views

CCfits - HEASARC - NASA

CCfits - HEASARC - NASA

CCfits - HEASARC - NASA

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

24.14 <strong>CCfits</strong>::FITS Class Reference 90<br />

Exceptions<br />

FitsError thrown on non-zero status code from cfitsio when not overriden by<br />

FitsException error to produce more illuminating message.<br />

24.14.3 Member Function Documentation<br />

24.14.3.1 void <strong>CCfits</strong>::FITS::addImage ( const String & hduName, int bpix, std::vector< long ><br />

& naxes, int version = 1 )<br />

Add an image extension to an existing FITS object. (File with w or rw access).<br />

Does not make primary images, which are built in the constructor for the FITS file. The<br />

image data is not added here: it can be added by a call to one of the ExtHDU::write<br />

functions.<br />

bpix may be one of the following CFITSIO constants: BYTE_IMG, SHORT_IMG,<br />

LONG_IMG, FLOAT_IMG, DOUBLE_IMG, USHORT_IMG, ULONG_IMG. Note<br />

that if you send in a bpix of USHORT_IMG or ULONG_IMG, <strong>CCfits</strong> will set HDU-<br />

::bitpix() to its signed equivalent (SHORT_IMG or LONG_IMG), and then set BZERO<br />

to 2 ∧ 15 or 2 ∧ 31.<br />

Todo Add a function for replacing the primary image<br />

24.14.3.2 Table ∗ <strong>CCfits</strong>::FITS::addTable ( const String & hduName, int rows, const<br />

std::vector< String > & columnName = std::vector(), const<br />

std::vector< String > & columnFmt = std::vector(), const<br />

std::vector< String > & columnUnit = std::vector(), HduType<br />

type = BinaryTbl, int version = 1 )<br />

Add a table extension to an existing FITS object. Add extension to FITS object for file<br />

with w or rw access.<br />

Parameters<br />

rows The number of rows in the table to be created.<br />

column- A vector containing the table column names<br />

Name<br />

columnFmt A vector containing the table column formats<br />

columnUnit (Optional) a vector giving the units of the columns.<br />

type The table type - AsciiTbl or BinaryTbl (defaults to BinaryTbl) the lists<br />

of columns are optional - one can create an empty table extension but<br />

if supplied, colType, columnName and colFmt must have equal dimensions.<br />

Todo the code should one day check that the version keyword is higher than any other<br />

Generated on Tue Dec 6 2011 16:12:51 for <strong>CCfits</strong> by Doxygen

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!