CCfits
2.6
|
It is also possible to apply extended file name syntax (as described in chapter 10 of the cfitsio manual) when reading data. The function below shows a typical example using the basic CCfits::FITS constructor.
The extended syntax is entered as part of the file name string. In this case it specifies an HDU and a row selection criterion dependent upon the values in the column named "Density." Any read operations performed on this HDU will only see rows which meet the "Density > 5.2" condition. Also the current header position in the file is automatically placed at the specified HDU upon construction of the FITS object.
Extended file name syntax can also be used with the FITS constructors which take specific HDU names or indices as arguments. However if the extended syntax specifies an HDU, that HDU must also be among those specified as a FITS constructor argument, otherwise a CCfits::FITS::OperationNotSupported exception is thrown. For example:
(Note - The extended file name feature which allows the opening of a particular image located in the row of a table remains unsupported in CCfits.)