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