GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GSkyMap.cpp File Reference

Sky map class implementation. More...

#include "GException.hpp"
#include "GMath.hpp"
#include "GTools.hpp"
#include "GFft.hpp"
#include "GFits.hpp"
#include "GFitsTable.hpp"
#include "GFitsBinTable.hpp"
#include "GFitsImage.hpp"
#include "GFitsImageDouble.hpp"
#include "GFitsTableDoubleCol.hpp"
#include "GSkyDirs.hpp"
#include "GSkyMap.hpp"
#include "GHealpix.hpp"
#include "GWcsRegistry.hpp"
#include "GWcs.hpp"
#include "GMatrix.hpp"
#include "GVector.hpp"
#include "GVOClient.hpp"
#include "GSkyRegion.hpp"
#include "GSkyRegionCircle.hpp"
#include "GSkyRegions.hpp"

Go to the source code of this file.

Macros

#define G_CONSTRUCT_HPX
 
#define G_CONSTRUCT_MAP
 
#define G_NMAPS   "GSkyMap::nmaps(int&)"
 
#define G_SHAPE   "GSkyMap::shape(std::vector<int>&)"
 
#define G_OP_UNARY_ADD   "GSkyMap::operator+=(GSkyMap&)"
 
#define G_OP_UNARY_SUB   "GSkyMap::operator-=(GSkyMap&)"
 
#define G_OP_UNARY_MUL   "GSkyMap::operator-=(GSkyMap&)"
 
#define G_OP_UNARY_DIV   "GSkyMap::operator/=(GSkyMap&)"
 
#define G_OP_UNARY_DIV2   "GSkyMap::operator/=(double&)"
 
#define G_OP_ACCESS_1D   "GSkyMap::operator(int&, int&)"
 
#define G_OP_ACCESS_2D   "GSkyMap::operator(GSkyPixel&, int&)"
 
#define G_OP_VALUE   "GSkyMap::operator(GSkyDir&, int&)"
 
#define G_INX2DIR   "GSkyMap::inx2dir(int&)"
 
#define G_PIX2DIR   "GSkyMap::pix2dir(GSkyPixel&)"
 
#define G_DIR2INX   "GSkyMap::dir2inx(GSkyDir&)"
 
#define G_DIR2PIX   "GSkyMap::dir2pix(GSkyDir&)"
 
#define G_FLUX1   "GSkyMap::flux(int&)"
 
#define G_FLUX2   "GSkyMap::flux(GSkyPixel&)"
 
#define G_FLUX3   "GSkyMap::flux(GSkyRegion&, int&)"
 
#define G_FLUX4   "GSkyMap::flux(GSkyRegions&, int&)"
 
#define G_SOLIDANGLE1   "GSkyMap::solidangle(int&)"
 
#define G_SOLIDANGLE2   "GSkyMap::solidangle(GSkyPixel&)"
 
#define G_OVERLAPS   "GSkyMap::overlaps(GSkyRegion&)"
 
#define G_EXTRACT   "GSkyMap::extract(int&, int&)"
 
#define G_EXTRACT_INT   "GSkyMap::extract(int&, int&, int&, int&)"
 
#define G_EXTRACT_REG   "GSkyMap::extract(GSkyRegions&)"
 
#define G_READ   "GSkyMap::read(GFitsHDU&)"
 
#define G_SET_WCS
 
#define G_READ_HEALPIX   "GSkyMap::read_healpix(GFitsTable*)"
 
#define G_READ_WCS   "GSkyMap::read_wcs(GFitsImage*)"
 
#define G_ALLOC_WCS   "GSkyMap::alloc_wcs(GFitsImage*)"
 
#define G_SQRT   "GSkyMap sqrt(GSkyMap&)"
 
#define G_LOG   "GSkyMap log(GSkyMap&)"
 
#define G_LOG10   "GSkyMap log10(GSkyMap&)"
 
#define G_CONVOLUTION_KERNEL
 

Functions

GSkyMap sqrt (const GSkyMap &map)
 Computes square root of sky map elements. More...
 
GSkyMap log (const GSkyMap &map)
 Computes the natural logarithm of sky map elements. More...
 
GSkyMap log10 (const GSkyMap &map)
 Computes the base 10 logarithm of sky map elements. More...
 
GSkyMap abs (const GSkyMap &map)
 Computes the absolute value of sky map elements. More...
 
GSkyMap sign (const GSkyMap &map)
 Computes the sign value of sky map elements. More...
 
GSkyMap clip (const GSkyMap &map, const double &thresh)
 Clips map at given value. More...
 

Detailed Description

Sky map class implementation.

Author
Juergen Knoedlseder

Definition in file GSkyMap.cpp.

Macro Definition Documentation

#define G_ALLOC_WCS   "GSkyMap::alloc_wcs(GFitsImage*)"

Definition at line 87 of file GSkyMap.cpp.

Referenced by GSkyMap::alloc_wcs().

#define G_CONSTRUCT_HPX
Value:
"GSkyMap::GSkyMap(std::string&, int&,"\
" std::string&, int&)"

Definition at line 54 of file GSkyMap.cpp.

Referenced by GSkyMap::GSkyMap().

#define G_CONSTRUCT_MAP
Value:
"GSkyMap::GSkyMap(std::string&, std::string&,"\
" double&, double&, double& double&, int&, int&, int&)"

Definition at line 56 of file GSkyMap.cpp.

Referenced by GSkyMap::GSkyMap().

#define G_CONVOLUTION_KERNEL
Value:
"GSkyMap::convolution_kernel(std::string&, "\
"double&, bool&)"

Definition at line 91 of file GSkyMap.cpp.

Referenced by GSkyMap::convolution_kernel().

#define G_DIR2INX   "GSkyMap::dir2inx(GSkyDir&)"

Definition at line 70 of file GSkyMap.cpp.

Referenced by GSkyMap::dir2inx().

#define G_DIR2PIX   "GSkyMap::dir2pix(GSkyDir&)"

Definition at line 71 of file GSkyMap.cpp.

Referenced by GSkyMap::dir2pix().

#define G_EXTRACT   "GSkyMap::extract(int&, int&)"

Definition at line 79 of file GSkyMap.cpp.

Referenced by GSkyMap::extract().

#define G_EXTRACT_INT   "GSkyMap::extract(int&, int&, int&, int&)"

Definition at line 80 of file GSkyMap.cpp.

Referenced by GSkyMap::extract().

#define G_EXTRACT_REG   "GSkyMap::extract(GSkyRegions&)"

Definition at line 81 of file GSkyMap.cpp.

Referenced by GSkyMap::extract().

#define G_FLUX1   "GSkyMap::flux(int&)"

Definition at line 72 of file GSkyMap.cpp.

Referenced by GSkyMap::flux().

#define G_FLUX2   "GSkyMap::flux(GSkyPixel&)"

Definition at line 73 of file GSkyMap.cpp.

Referenced by GSkyMap::flux().

#define G_FLUX3   "GSkyMap::flux(GSkyRegion&, int&)"

Definition at line 74 of file GSkyMap.cpp.

Referenced by GSkyMap::flux().

#define G_FLUX4   "GSkyMap::flux(GSkyRegions&, int&)"

Definition at line 75 of file GSkyMap.cpp.

Referenced by GSkyMap::flux().

#define G_INX2DIR   "GSkyMap::inx2dir(int&)"

Definition at line 68 of file GSkyMap.cpp.

Referenced by GSkyMap::inx2dir().

#define G_LOG   "GSkyMap log(GSkyMap&)"

Definition at line 89 of file GSkyMap.cpp.

Referenced by log().

#define G_LOG10   "GSkyMap log10(GSkyMap&)"

Definition at line 90 of file GSkyMap.cpp.

Referenced by log10().

#define G_NMAPS   "GSkyMap::nmaps(int&)"

Definition at line 58 of file GSkyMap.cpp.

Referenced by GSkyMap::nmaps().

#define G_OP_ACCESS_1D   "GSkyMap::operator(int&, int&)"

Definition at line 65 of file GSkyMap.cpp.

Referenced by GSkyMap::operator()().

#define G_OP_ACCESS_2D   "GSkyMap::operator(GSkyPixel&, int&)"

Definition at line 66 of file GSkyMap.cpp.

Referenced by GSkyMap::operator()().

#define G_OP_UNARY_ADD   "GSkyMap::operator+=(GSkyMap&)"

Definition at line 60 of file GSkyMap.cpp.

Referenced by GSkyMap::operator+=().

#define G_OP_UNARY_DIV   "GSkyMap::operator/=(GSkyMap&)"

Definition at line 63 of file GSkyMap.cpp.

Referenced by GSkyMap::operator/=().

#define G_OP_UNARY_DIV2   "GSkyMap::operator/=(double&)"

Definition at line 64 of file GSkyMap.cpp.

Referenced by GSkyMap::operator/=().

#define G_OP_UNARY_MUL   "GSkyMap::operator-=(GSkyMap&)"

Definition at line 62 of file GSkyMap.cpp.

Referenced by GSkyMap::operator*=().

#define G_OP_UNARY_SUB   "GSkyMap::operator-=(GSkyMap&)"

Definition at line 61 of file GSkyMap.cpp.

Referenced by GSkyMap::operator-=().

#define G_OP_VALUE   "GSkyMap::operator(GSkyDir&, int&)"

Definition at line 67 of file GSkyMap.cpp.

Referenced by GSkyMap::operator()().

#define G_OVERLAPS   "GSkyMap::overlaps(GSkyRegion&)"

Definition at line 78 of file GSkyMap.cpp.

Referenced by GSkyMap::overlaps().

#define G_PIX2DIR   "GSkyMap::pix2dir(GSkyPixel&)"

Definition at line 69 of file GSkyMap.cpp.

Referenced by GSkyMap::pix2dir().

#define G_READ   "GSkyMap::read(GFitsHDU&)"

Definition at line 82 of file GSkyMap.cpp.

#define G_READ_HEALPIX   "GSkyMap::read_healpix(GFitsTable*)"

Definition at line 85 of file GSkyMap.cpp.

Referenced by GSkyMap::read_healpix().

#define G_READ_WCS   "GSkyMap::read_wcs(GFitsImage*)"

Definition at line 86 of file GSkyMap.cpp.

Referenced by GSkyMap::read_wcs().

#define G_SET_WCS
Value:
"GSkyMap::set_wcs(std::string&, std::string&, double&,"\
" double&, double&, double&, double&, double&)"

Definition at line 83 of file GSkyMap.cpp.

Referenced by GSkyMap::set_wcs().

#define G_SHAPE   "GSkyMap::shape(std::vector<int>&)"

Definition at line 59 of file GSkyMap.cpp.

Referenced by GSkyMap::shape().

#define G_SOLIDANGLE1   "GSkyMap::solidangle(int&)"

Definition at line 76 of file GSkyMap.cpp.

Referenced by GSkyMap::solidangle().

#define G_SOLIDANGLE2   "GSkyMap::solidangle(GSkyPixel&)"

Definition at line 77 of file GSkyMap.cpp.

Referenced by GSkyMap::solidangle().

#define G_SQRT   "GSkyMap sqrt(GSkyMap&)"

Definition at line 88 of file GSkyMap.cpp.

Referenced by sqrt().

Function Documentation

GSkyMap abs ( const GSkyMap map)

Computes the absolute value of sky map elements.

Parameters
[in]mapSky map.
Returns
Sky map containing the absolute value of every element.

Definition at line 4050 of file GSkyMap.cpp.

References abs(), GSkyMap::nmaps(), and GSkyMap::npix().

GSkyMap clip ( const GSkyMap map,
const double &  thresh 
)

Clips map at given value.

Parameters
[in]mapSky map.
[in]threshThreshold value.
Returns
Sky map containing the value in the original map if >= thresh, otherwise thresh

Definition at line 4128 of file GSkyMap.cpp.

References GSkyMap::nmaps(), and GSkyMap::npix().

GSkyMap log ( const GSkyMap map)

Computes the natural logarithm of sky map elements.

Parameters
[in]mapSky map.
Returns
Sky map containing the natural logarithm of every element.

Definition at line 3970 of file GSkyMap.cpp.

References G_LOG, log(), GSkyMap::nmaps(), and GSkyMap::npix().

GSkyMap log10 ( const GSkyMap map)

Computes the base 10 logarithm of sky map elements.

Parameters
[in]mapSky map.
Returns
Sky map containing the base 10 logarithm of every element.

Definition at line 4010 of file GSkyMap.cpp.

References G_LOG10, log10(), GSkyMap::nmaps(), and GSkyMap::npix().

GSkyMap sign ( const GSkyMap map)

Computes the sign value of sky map elements.

Parameters
[in]mapSky map.
Returns
Sky map containing the sign value of every pixel.

This method returns a sky map filled with a value of 1 if the pixel is positive, a value of -1 if the pixel is negative or a value of 0 if the pixel is 0.

Definition at line 4086 of file GSkyMap.cpp.

References GSkyMap::nmaps(), and GSkyMap::npix().

GSkyMap sqrt ( const GSkyMap map)

Computes square root of sky map elements.

Parameters
[in]mapSky map.
Returns
Sky map containing the square root of every element.

Definition at line 3930 of file GSkyMap.cpp.

References G_SQRT, GSkyMap::nmaps(), GSkyMap::npix(), and sqrt().