本文整理汇总了C++中GFits::image方法的典型用法代码示例。如果您正苦于以下问题:C++ GFits::image方法的具体用法?C++ GFits::image怎么用?C++ GFits::image使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GFits
的用法示例。
在下文中一共展示了GFits::image方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: read
/***********************************************************************//**
* @brief Read LAT event cube from FITS file.
*
* @param[in] fits FITS file.
*
* It is assumed that the counts map resides in the primary extension of the
* FITS file, the energy boundaries reside in the EBOUNDS extension and the
* Good Time Intervals reside in the GTI extension. The method clears the
* object before loading, thus any events residing in the object before
* loading will be lost.
***************************************************************************/
void GLATEventCube::read(const GFits& fits)
{
// Clear object
clear();
// Get HDUs
const GFitsImage& hdu_cntmap = *fits.image("Primary");
const GFitsTable& hdu_ebounds = *fits.table("EBOUNDS");
const GFitsTable& hdu_gti = *fits.table("GTI");
// Load counts map
read_cntmap(hdu_cntmap);
// Load energy boundaries
read_ebds(hdu_ebounds);
// Load GTIs
read_gti(hdu_gti);
// Load additional source maps
for (int i = 1; i < fits.size(); ++i) {
if (fits.at(i)->exttype() == GFitsHDU::HT_IMAGE) {
const GFitsImage& hdu_srcmap = *fits.image(i);
read_srcmap(hdu_srcmap);
}
}
// Return
return;
}
示例2: read
/***********************************************************************//**
* @brief Read exposure cube from FITS object
*
* @param[in] fits FITS object.
*
* Read the exposure cube from a FITS object.
***************************************************************************/
void GCTACubeExposure::read(const GFits& fits)
{
// Clear object
clear();
// Get HDUs
const GFitsImage& hdu_expcube = *fits.image("Primary");
const GFitsTable& hdu_ebounds = *fits.table("EBOUNDS");
const GFitsTable& hdu_gti = *fits.table("GTI");
// Read cube
m_cube.read(hdu_expcube);
// Read cube attributes
read_attributes(hdu_expcube);
// Read energy boundaries
m_ebounds.read(hdu_ebounds);
// Read GTIs
m_gti.read(hdu_gti);
// Set energy node array
set_eng_axis();
// Return
return;
}
示例3: read
/***********************************************************************//**
* @brief Read CTA event cube from FITS file
*
* @param[in] file FITS file.
*
* It is assumed that the counts map resides in the primary extension of the
* FITS file, the energy boundaries reside in the EBOUNDS extension and the
* Good Time Intervals reside in the GTI extension. The method clears the
* object before loading, thus any events residing in the object before
* loading will be lost.
***************************************************************************/
void GCTAEventCube::read(const GFits& file)
{
// Clear object
clear();
// Get HDUs
GFitsImage* hdu_cntmap = file.image("Primary");
GFitsTable* hdu_ebounds = file.table("EBOUNDS");
GFitsTable* hdu_gti = file.table("GTI");
// Load counts map
read_cntmap(hdu_cntmap);
// Load energy boundaries
read_ebds(hdu_ebounds);
// Load GTIs
read_gti(hdu_gti);
// Return
return;
}