-
The saveto() method now also checks whether a file with the .gz suffix exists.
-
The coding and design conventions (CDC) document was also updated.
-
Delete statements have been added to the remove() method(s) so that the elements are properly deleted before the pointers are erased.
-
Although GFitsTable does not derived from GContainer, it is basically a container class for FITS columns. Therefore, the check for existence of an element should be done using the contains() method.
-
…" warnings to console). The FITS header card implementation was improved to handle empty header cards and cards with undefined (or NULL) values.
-
GFitsAsciiTable GFitsBinTable The table constructors now take a const reference as argument. GFitsImage All constructors and methods now take const references as arguments. The size(), bitpix(), naxis() and anynul() methods return const references, nulval() returns a const pointer. GFitsImageByte GFitsImageDouble GFitsImageFloat GFitsImageLong GFitsImageLongLong GFitsImageSByte GFitsImageShort GFitsImageULong GFitsImageUShort All constructors now take const references as arguments.
-
The GFitsHDU::card methods now return a reference instead of a pointer. Some more methods have been added to GFitsHDU for header card access and management. The fits_key_not_found exception has been removed, and keyword checks are now done using the hascard() methods. This was needed as the GFitsHeader class does not throw the fits_key_not_found exception anymore if a header card is not found. The FITS utility function gammalib::fits_move_to_hdu has been added to the GFits.hpp/cpp files which provides support for moving to a specific HDU. As this cfitsio function is widely used in the FITS module it was favourable to put it in a specific function with a generic exception message.
-
The GFitsHeader class now derives from GContainer and implements all generic container class methods (at(), size(), isempty(), append(), insert(), remove(), reserve(), extend()). The hascard() methods have been renamed to contains() for compliance with other container classes. The card() methods have been renamed to at(), also for compliance. The card access operators and methods now return the cards by reference. Card access operators[] have been implemented to access header cards without range checking. The cards are now stored using a std::vector structure.
-
The GFits class allows for flexible HDU manipulation using the container methods set(), append(), insert(), remove() and extend(). So far the code was unable to save correctly a manipulated FITS file. This has now been corrected for. If for a given extension number the type of a HDU has changed during manipulations (e.g. an image has become a table or vice versa), the old HDU is deleted and a new HDU is inserted in place. Also, exedent HDUs that are not present anymore in the GFits object will be removed from the FITS file upon saving.
-
If a FITS file is created using the open() method and if HDUs have been appended to this FITS file, the GFits::close() method (or the destructor) resulted in an exception due to an invalid filepointer. The result FITS file was empty, with a single "END" statement. Now, the m_created flag is used to signal that a file has been created but not yet saved. Calling the GFits::save() method will set the flag to false. The GFits::free_member() method will delete the FITS file if m_created is still true.
-
The GFits class now derives from GContainer and implements all generic container class methods (at(), size(), isempty(), set(), append(), insert(), remove(), reserve(), extend()). The hashdu() method has been renamed to contains() for compliance with other container classes. The hdu() methods have been renamed to at(), also for compliance. Boolean arguments are now passed as const references, and members are returned as const references. HDU access operators[] have been implemented to access FITS extensions without range checking.
-
The configure option --enable-warnings now sets the definition G_WARNINGS in the config.h file. The function gammalib::warning() has been added to GTools. The function dumps a warning to the console in a standard format if the warning option is enabled. The function is now used in GFitsHeaderCard to dump any warning about invalid header card value types to the screen.
-
A major revision of the GFitsTable class interface has been done, making it more similar to the interface of other container classes. In particular, the column access operator now returns a pointer instead of a reference, preventing code slicing. The set() method has been introduced to set columns in a table. The append_column() and insert_column() methods have been renamed to append() and insert() as they act on columns, and a table is a column container. Some arguments or return values are now also declared as const references. A size() method has been added that return the number of table columns. As the GFitsTable class is widely used throughout GammaLib, a number of classes had to be adapted to this new interface.
-
…ement elements() method for defining variable-length column. A variable-length column is now constructued by passing a negative column vector length. The size of a row is specified using the elements() method that makes use of the resize_data() method implemented by the derived classes. The only column type that is not yet implemented is the Bit column. Also the string columns do not yet work properly for variable-length columns.
-
… a variable-length column. The generic GFitsTableCol::elements() method has been implemented that makes use of the virtual data_resize() method that should be implemented by all derived classes. This method has so far been implemented and tested for the GFitsTableShortCol class. A unit test has also been added for this class that uses the elements() method for setup of the variable-length column.
-
… the header file as inline methods. During the rework, a bug occured in the string column class that prevented from correct saving to the file. The bug was due to the fact that the wrong pointer was specified by the ptr_data() method, and then, also the GFitsTableCol::isloaded() method that worked on ptr_data() was not corrected. The ptr_data() method has been corrected for the string column class and the isloaded() method has been defined as pure virtual in GFitsTableCol, and now is implemented in the derived classes. We thus have full control over the definition of the loading state. To conform to the actual coding standards, all methods that are implemented by the table column classes in the header file are now declared inline.
-
…at and remove binary_format() method. Instead of handling the column format in the derived classes, the column format for binary tables is now handled in the base class. The format codes for variable-length columns are now also supported.
-
The GFitsTableCol has been extended to support reading of variable-length columns. A specific load method has been implemented for variable-length columns that determines for each row the number of elements and stores the information in a vector of row start indices. The GFitsTableCol::offset method has been modified to allow accessing elements in the variable-length storage. GFitsTable has been adapted to support allocating variable-length columns. Variable-length columns are recognised by a negative typecode.
-
…asing properly memory in GFitsHDU::free_members(). Now, simply call delete hdu which should lead to a proper release of memory.
-
The C++ functions new and delete cannot be used properly for this purpose as they only handle non-void types.
-
Add GChatter argument to print() method. The print() method now takes an argument of type GChatter to control the chattiness of the output in a homogenous manner. Pass NORMAL chatter level in __str__ method. Add chatter argument to print() methods. Use GLog::chatter() method to control the chattiness of the log stream operator. Add chatter() methods and provide member access through const references. Add chatter() methods, provide member access through const references, and declare one liners as inline methods. The chatter() methods control the new m_chatter attribute that is used to control the chattiness of the object's print() methods. name() and version() methods return const references. logFileOpen() method now sets the chattiness from the applications's chatter parameter, and name() and version() methods now return a const reference.
-
As the cfitsio routines perform automatic scaling of data, an image that is stored as long may need a floating point array to correctly hold the resulting values. The memory needs are correctly reflected by using the ffgiet routine from cfitsio, which returns the equivalent data type. This routine is now used. This means however that a scaled integer image that is read from disk will be written back as floating point image. See feature #610 for an action to modify the GFitsImage class.
-
In principle, a clone could be NULL (although this would be an implementation error). To catch this problem, the clone is only appended if it's valid.
-
The save() method now throws an error if it is used on an unopened FITS file. For unopened FITS files, the saveto() method should be invoked.
-
All classes our now derived from GBase. For this we had to define and to implement the clear() method for all classes. ostream and GLog friends have also been removed, as they are no implemented at the GBase level.