105 GSkyMap(
const std::string& coords,
107 const std::string& order,
108 const int&
nmaps = 1);
109 GSkyMap(
const std::string& wcs,
110 const std::string& coords,
117 const int&
nmaps = 1);
136 double&
operator()(
const int& index,
const int& map = 0);
137 const double&
operator()(
const int& index,
const int& map = 0)
const;
147 const int&
npix(
void)
const;
148 const int&
nx(
void)
const;
149 const int&
ny(
void)
const;
150 const int&
nmaps(
void)
const;
151 void nmaps(
const int& nmaps);
152 const std::vector<int>&
shape(
void)
const;
153 void shape(
const int& s1);
154 void shape(
const int& s1,
const int& s2);
155 void shape(
const int& s1,
const int& s2,
const int& s3);
156 void shape(
const std::vector<int>& shape);
157 int ndim(
void)
const;
165 double flux(
const int& index,
const int& map = 0)
const;
166 double flux(
const GSkyPixel& pixel,
const int& map = 0)
const;
177 void smooth(
const std::string& kernel,
179 void correlate(
const std::string& kernel,
183 const double*
pixels(
void)
const;
186 const int& starty,
const int& stopy)
const;
192 const bool& clobber =
false)
const;
195 const std::string& extname =
"")
const;
196 void publish(
const std::string& name =
"")
const;
204 void set_wcs(
const std::string& wcs,
const std::string& coords,
205 const double& crval1,
const double& crval2,
206 const double& crpix1,
const double& crpix2,
207 const double& cdelt1,
const double& cdelt2);
221 void convolve(
const std::string& kernel,
223 const bool& normalise);
226 const bool& normalise)
const;
friend GSkyMap log(const GSkyMap &map)
Computes the natural logarithm of sky map elements.
bool is_same(const GSkyMap &map) const
Check if map is the same.
GSkyMap(void)
Void constructor.
void stack_maps(void)
Stack all maps into a single map.
GSkyMap & operator=(const GSkyMap &map)
Assignment operator.
Abstract FITS image base class.
GSkyMap & operator*=(const GSkyMap &map)
Multiplication operator.
const int & ny(void) const
Returns number of pixels in y coordinate.
GSkyPixel inx2pix(const int &index) const
Converts pixel index into sky map pixel.
void correlate(const std::string &kernel, const double &par)
Correlates sky map.
int pix2inx(const GSkyPixel &pixel) const
Converts sky map pixel into pixel index.
const GSkyProjection * projection(void) const
Returns pointer to sky projection.
GNdarray counts(void) const
Returns array with total number of counts for count maps.
GSkyMap * clone(void) const
Clone sky map.
GSkyMap extract(const int &map, const int &nmaps=1) const
Extract maps into a new sky map object.
int m_num_maps
Number of maps (used for pixel allocation)
int m_num_pixels
Number of pixels (used for pixel allocation)
void read_healpix(const GFitsTable &table)
Read Healpix data from FITS table.
friend bool operator!=(const GSkyMap &a, const GSkyMap &b)
Non-equality operator.
GSkyMap operator+(const GSkyMap &map) const
Binary sky map addition.
Sky direction class interface definition.
std::vector< int > m_shape
Shape of the maps.
Abstract FITS extension base class.
bool overlaps(const GSkyRegion ®ion) const
Checks whether a region overlaps with this map.
int m_num_x
Number of pixels in x direction (only 2D)
Definition of interface for all GammaLib classes.
GSkyProjection * m_proj
Pointer to sky projection.
Abstract sky projection base class definition.
int m_num_y
Number of pixels in y direction (only 2D)
GSkyMap & operator+=(const GSkyMap &map)
Map addition operator.
friend GSkyMap abs(const GSkyMap &map)
Computes the absolute value of sky map elements.
void set_wcs(const std::string &wcs, const std::string &coords, const double &crval1, const double &crval2, const double &crpix1, const double &crpix2, const double &cdelt1, const double &cdelt2)
Set World Coordinate System.
GNdarray convolution_kernel(const std::string &kernel, const double &par, const bool &normalise) const
Return convolution kernel.
Interface for the circular sky region class.
friend GSkyMap log10(const GSkyMap &map)
Computes the base 10 logarithm of sky map elements.
friend bool operator==(const GSkyMap &a, const GSkyMap &b)
Equality operator.
void read(const GFitsHDU &hdu)
Read skymap from FITS HDU.
GSkyMap & operator-=(const GSkyMap &map)
Map subtraction operator.
const std::vector< int > & shape(void) const
Returns shape of maps.
bool is_empty(void) const
Signals if sky map is empty.
void publish(const std::string &name="") const
Publish sky map.
bool is_healpix(const GFitsHDU &hdu) const
Check if HDU contains HEALPix data.
std::string print(const GChatter &chatter=NORMAL) const
Print sky map.
friend GSkyMap sign(const GSkyMap &map)
Computes the sign value of sky map elements.
void copy_members(const GSkyMap &map)
Copy class members.
GSkyDir pix2dir(const GSkyPixel &pixel) const
Returns sky direction of pixel.
double & operator()(const int &index, const int &map=0)
Pixel index access operator.
Abstract interface for the sky region class.
const int & nmaps(void) const
Returns number of maps.
GSkyDir inx2dir(const int &index) const
Returns sky direction of pixel.
Double precision FITS image class.
GFitsImageDouble * create_wcs_hdu(void) const
Create FITS HDU containing WCS image.
GFitsHDU * write(GFits &file, const std::string &extname="") const
Write sky map into FITS file.
N-dimensional array class interface definition.
Interface class for all GammaLib classes.
GNdarray m_pixels
Skymap pixels.
Bilinear interpolator class.
friend GSkyMap sqrt(const GSkyMap &map)
Computes square root of sky map elements.
bool m_contained
Sky direction is contained in map.
bool contains(const GSkyDir &dir) const
Checks if sky direction falls in map.
const double * data(void) const
Data access method (const version)
Abstract interface for FITS table.
GSkyMap operator*(const GSkyMap &map) const
Binary sky map multiplication.
void alloc_wcs(const GFitsImage &image)
Allocate WCS class.
friend GSkyMap clip(const GSkyMap &map, const double &thresh)
Clips map at given value.
void clear(void)
Clear instance.
void convolve(const std::string &kernel, const double &par, const bool &normalise)
Convolve sky map.
N-dimensional array class.
GSkyMap operator-(const GSkyMap &map) const
Binary sky map subtraction.
Sky region container class.
GSkyRegionCircle region_circle(void) const
Return sky region circle that encloses the sky map.
void free_members(void)
Delete class members.
bool m_hascache
Cache is valid.
GSkyDir m_last_dir
Last sky direction.
GSkyMap & operator/=(const GSkyMap &map)
Division operator.
GSkyPixel dir2pix(const GSkyDir &dir) const
Returns sky map pixel for a given sky direction.
GBilinear m_interpol
Bilinear interpolator.
GFitsBinTable * create_healpix_hdu(void) const
Create FITS HDU containing Healpix data.
int ndim(void) const
Returns dimension of maps.
bool is_wcs(const GFitsHDU &hdu) const
Check if HDU contains WCS data.
void read_wcs(const GFitsImage &image)
Read WCS image from FITS HDU.
Bilinear interpolator class interface definition.
bool overlaps_circle(const GSkyRegionCircle ®ion) const
Checks whether a circular region overlaps with this map.
const int & nx(void) const
Returns number of pixels in x coordinate.
void save(const GFilename &filename, const bool &clobber=false) const
Save sky map into FITS file.
void smooth(const std::string &kernel, const double &par)
Smooth sky map.
Generic matrix class definition.
double solidangle(const int &index) const
Returns solid angle of pixel.
Abstract sky projection base class.
virtual ~GSkyMap(void)
Destructor.
std::string classname(void) const
Return class name.
void load(const GFilename &filename)
Load skymap from FITS file.
const int & npix(void) const
Returns number of pixels.
Sky map pixel class definition.
void init_members(void)
Initialise class members.
int dir2inx(const GSkyDir &dir) const
Returns pixel index for a given sky direction.
GNdarray flux(void) const
Returns array with total flux for sky maps.
const double * pixels(void) const
Returns pointer to pixel data.
GSkyMap operator/(const GSkyMap &map) const
Binary sky map division.