Luiza  v03-01
Public Member Functions | Protected Member Functions | List of all members
gloria::GloriaValueMap Class Reference

Class for constructing parameter/value maps for an image. More...

#include <GloriaValueMap.h>

Inheritance diagram for gloria::GloriaValueMap:
gloria::GloriaAverageMap gloria::GloriaMedianMap

Public Member Functions

 GloriaValueMap ()
 Dummy constructor - does nothing (!)
 
 GloriaValueMap (int Nbx, int Nby, int Nmap=1)
 Constructor. Allocates map tables for given map size. More...
 
 GloriaValueMap (const GloriaFitsImage *fitsImage, int Nbx, int Nby, int Nmap=1)
 Constructor. Allocates map tables for given image and map size. More...
 
 GloriaValueMap (GloriaFitsTable *mapTable)
 Constructor. Allocates map by importing it from fits table. More...
 
virtual ~GloriaValueMap ()
 Destructor.
 
void SetImageSize (const GloriaFitsImage *fitsImage)
 Set size of image.
 
void SetImageSize (int SizeX, int SizeY)
 Set size of image.
 
void AddMap ()
 Add another map to current map set. More...
 
void AddMap (string name)
 Add another map to current map set, giving it a name. More...
 
void SetMapName (int imap, string name)
 Set name for existing map.
 
double GetMapValue (int imap, int ix, int iy, int ipol=1)
 Get value from map imap for pixel (ix,iy) More...
 
double GetMapValue (int imap, long ipix, int ipol=1)
 Get value from map imap for pixel ipix.
 
double GetMapValue (int imap, double x, double y, int ipol=1)
 Get map value for arbitrary position on the image.
 
int Nmap ()
 Get number of maps.
 
int NMapX ()
 Get map binning in X.
 
int NMapY ()
 Get map binning in Y.
 
int ImgSizeX ()
 Get image pixels in X.
 
int ImgSizeY ()
 Get image pixels in Y.
 
double * GetMap (int imap)
 Returns pointer to the map array.
 
string GetMapName (int imap)
 Return image filled with parameter values.
 
double GetMapMean (int imap)
 Returns mean value of map entries.
 
GloriaFitsImageGetMapImage (int imap, int ipol=1)
 Return image filled with parameter values.
 
GloriaFitsTableGetTable ()
 Return table containing all defined maps as columns.
 
bool LoadFromTable (GloriaFitsTable *mapTable)
 Initialize value map structures from the table.
 
void ClearMaps ()
 Clear all defined maps. Clears also map binning and image size information.
 
void InitializeMaps (int Nbx, int Nby, int Nmap)
 Allocate new, empty maps with given binning. All data and image size information are lost.
 

Protected Member Functions

void FillMapImage1 (double *map, GloriaFitsImage *mapImage)
 

Detailed Description

Class for constructing parameter/value maps for an image.

This class can be use to calculate value of parameters for any position on a sky image (object of GloriaFitsImage class). Arbitrary number of parameters can be stored. User has to define size of value grid which is used to set parameter values, and the method can be used to interpolate between these values. This class is also used to build more specialized classes as MedianMap (eg. for background and noise calculation).

Author
A.F.Zarnecki, University of Warsaw, zarne.nosp@m.cki@.nosp@m.fuw.e.nosp@m.du.p.nosp@m.l

Constructor & Destructor Documentation

gloria::GloriaValueMap::GloriaValueMap ( int  Nbx,
int  Nby,
int  Nmap = 1 
)

Constructor. Allocates map tables for given map size.

Only one table is allocated by default (Nmap=1), but user can request allocating many maps at the same time. Note: all maps should correspond to the same image (image size). Image size has to be defined by call to SetImageSize().

gloria::GloriaValueMap::GloriaValueMap ( const GloriaFitsImage fitsImage,
int  Nbx,
int  Nby,
int  Nmap = 1 
)

Constructor. Allocates map tables for given image and map size.

Only one table is allocated by default (Nmap=1), but user can request allocating many maps at the same time.

gloria::GloriaValueMap::GloriaValueMap ( GloriaFitsTable mapTable)

Constructor. Allocates map by importing it from fits table.

Creates maps by reading them from fits table. The table has to created with GetTable() method previously, so all required parameters are stored in header keywords. Otherwise one should declare map first and read table contents with LoadFromTable.

Member Function Documentation

void gloria::GloriaValueMap::AddMap ( )

Add another map to current map set.

Can be used to add map for another parameter to the existing set of maps. Existing maps are not affected.

void gloria::GloriaValueMap::AddMap ( string  name)

Add another map to current map set, giving it a name.

Can be used to add map for another parameter to the existing set of maps. Existing maps are not affected.

void gloria::GloriaValueMap::FillMapImage1 ( double *  map,
GloriaFitsImage mapImage 
)
protected

Does not work for even _binX (!?)

References gloria::GloriaFitsImage::GetFloatImageData().

double gloria::GloriaValueMap::GetMapValue ( int  imap,
int  ix,
int  iy,
int  ipol = 1 
)

Get value from map imap for pixel (ix,iy)

Calculates parameter value in given pixel of the frame by interpolating between map points. ipol parameter defines interpolation order. Currently implemented values are: 0 - no interpolation (take value from the bin center) and 1 - linear interpolation between bin centers (default).

Referenced by gloria::GloriaAverageMap::GetAverage(), gloria::GloriaMedianMap::GetBgLevel(), gloria::GloriaMedianMap::GetMedian(), gloria::GloriaMedianMap::GetNoise(), gloria::GloriaMedianMap::GetSpread(), and gloria::GloriaAverageMap::GetSpread().


The documentation for this class was generated from the following files: