42 #define G_OPEN "GFitsHDU::open(int)"
43 #define G_SAVE "GFitsHDU::save()"
44 #define G_HEADER "GFitsHDU::header()"
45 #define G_DATA "GFitsHDU::data()"
46 #define G_COLUMN "GFitsHDU::column(std::string&)"
47 #define G_CONNECT "GFitsHDU::connect(void*)"
48 #define G_MOVE_TO_HDU "GFitsHDU::move_to_hdu()"
49 #define G_GET_HDU_TYPE "GFitsHDU::get_hdu_type()"
50 #define G_NEW_IMAGE "GFitsHDU::new_image()"
170 "name of this extension"));
226 std::string msg =
"FITS file not opened. Please open the FITS file "
227 "before moving the file pointer to an HDU.";
252 std::string msg =
"FITS file not opened. Please open the FITS file "
253 "before requesting an HDU type.";
289 std::string msg =
"FITS file pointer does not point to an open FITS "
290 "file. Please open the FITS file before opening an "
316 if (
m_name.length() == 0) {
344 std::cout <<
"GFitsHDU::save() -->" << std::endl;
359 std::cout <<
"<-- GFitsHDU::save" << std::endl;
409 result =
"unsigned byte";
412 result =
"signed byte";
421 result =
"unsigned short integer";
424 result =
"short integer";
427 result =
"unsigned long integer";
430 result =
"long integer";
433 result =
"single precision floating point";
436 result =
"long long integer";
439 result =
"double precision floating point";
442 result =
"unsupported format";
std::string print_hdu(const GChatter &chatter=NORMAL) const
Print basic HDU information.
void open(void *vptr, int hdunum)
Open HDU.
Abstract FITS extension base class.
void connect(void *fptr)
Connect HDU to FITS file.
void move_to_hdu(void)
Move FITS file pointer to HDU.
void * m_fitsfile
FITS file pointer pointing on actual HDU.
std::string m_name
HDU name (extname)
FITS file class interface definition.
std::string strip_whitespace(const std::string &arg)
Strip leading and trailing whitespace from string.
GFitsHDU & operator=(const GFitsHDU &hdu)
Assignment operator.
virtual void data_open(void *vptr)=0
Abstract FITS extension base class definition.
void save(void)
Saves HDU.
#define __ffghdt(A, B, C)
CFITSIO interface header.
virtual void data_connect(void *vptr)=0
HDUType get_hdu_type(void) const
Get HDU type from FITS file.
GFitsHeader m_header
HDU header.
virtual void data_save(void)=0
const std::string & extname(void) const
Return extension name.
void init_members(void)
Initialise class members.
std::string typecode(int type) const
Return typecode as string.
GFitsHDU(void)
Void constructor.
Exception handler interface definition.
void copy_members(const GFitsHDU &hdu)
Copy class members.
int fits_move_to_hdu(const std::string &caller, void *vptr, const int &hdunum=0)
Move to FITS extension.
void free_members(void)
Delete class members.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
virtual ~GFitsHDU(void)
Destructor.
int m_hdunum
HDU number (starting from 0)
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.