当前位置: 首页>>代码示例>>C++>>正文


C++ GFits::remove方法代码示例

本文整理汇总了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;
}
开发者ID:,项目名称:,代码行数:54,代码来源:


注:本文中的GFits::remove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。