本文整理汇总了C++中GFits::remove方法的典型用法代码示例。如果您正苦于以下问题:C++ GFits::remove方法的具体用法?C++ GFits::remove怎么用?C++ GFits::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GFits
的用法示例。
在下文中一共展示了GFits::remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write
/***********************************************************************//**
* @brief Write CTA event cube into FITS file.
*
* @param[in] fits FITS file.
*
* Writes CTA event cube into a FITS file. The following HDUs will be written
*
* COUNTS - Counts cube
* WEIGHTS - Weights for each counts cube bin
* EBOUNDS - Energy boundaries
* GTI - Good Time Intervals
*
* The counts cube will be written as a double precision sky map. The
* weighing cube contains the weight for each counts cube, computed as the
* fraction of the event bin that has been selected in filling the counts
* cube. This allows to account for proper stacking of observations with
* different energy thresholds, or different regions of interest. The energy
* boundaries for all counts cube layers are also written, as well as the
* Good Time Intervals that have been used in generating the counts cube.
***************************************************************************/
void GCTAEventCube::write(GFits& fits) const
{
// Remove HDUs if they exist already
if (fits.contains("GTI")) {
fits.remove("GTI");
}
if (fits.contains("EBOUNDS")) {
fits.remove("EBOUNDS");
}
if (fits.contains("WEIGHTS")) {
fits.remove("WEIGHTS");
}
if (fits.contains("COUNTS")) {
fits.remove("COUNTS");
}
if (fits.contains("Primary")) {
fits.remove("Primary");
}
// Write counts cube
m_map.write(fits, "COUNTS");
// Write cube weighting
m_weights.write(fits, "WEIGHTS");
// Write energy boundaries
ebounds().write(fits);
// Write Good Time intervals
gti().write(fits);
// Return
return;
}