BIE::Model Class Reference

Abstract: determines partial distribution of source density for given cell. More...

#include <Model.h>

Inheritance diagram for BIE::Model:
Collaboration diagram for BIE::Model:

List of all members.

Public Types

enum  EvalType { binned, point }
 Enum for distribution types.

Public Member Functions

RecordTypegetParameterType ()
 Returns a record type describing the parameters of the model.
void setNormKnots (int nx, int ny)
 Change the default Gauss-Legendre knot numbers for the point-type normalization integral.
void setQuadTreeParams (double dx0, double dy0, double dx1, double dy1, double eps, int mlev)
 Change the default QuadTree parameters.
virtual void Initialize (State &)=0
 Initialize for particular state.
virtual void ResetCache ()
 Hook for implementation dependent caching.
virtual double NormEval (double xmin, double xmax, double ymin, double ymax, bool serial)
 Integrated norm (e.g. for point likelihood).
virtual double NormEval (double x, double y, SampleDistribution *d)=0
 Contribution to norm at this line of sight.
virtual double NormEval (double X, double Y)
 Integrated norm (e.g.
virtual double NormEvalMeasure (double X, double Y)
 Integration measure.
virtual vector< double > Evaluate (double x, double y, SampleDistribution *d)
 Main method for returning source density.
virtual string ParameterDescription (int i)=0
 Label parameters. Scheduled for removal.
virtual int DataDimension ()=0
 Number of dimensions in data attributes. Scheduled for removal.
virtual vector< double > EvaluateBinned (double x, double y, BinnedDistribution *d)
 Specific evaulate functions to be supplied by derived classes Either Evaluate or should be overloaded by the derived class or the following two classes need to be overloaded.
virtual vector< double > EvaluatePoint (double x, double y, PointDistribution *d)
 Contribution to each point from this line of sight.

Static Public Attributes

static bool quadtree
 Use quadtree integrator for point norm in serial mode (default: true).
static int maxlevels
 Maximum number of recursion levels for quadtree (default: 16).
static double qeps
 Tolerance for quadtree (default: 0.0001).
static double dX0
 Maximum x grid size for quadtree (default: 0.5).
static double dY0
 Maximum y grid size for quadtree (default: 0.1).
static double dX1
 Minimum x grid size for quadtree (default: 0.005).
static double dY1
 Minimum y grid size for quadtree (default: 0.001).
static int numX
 Number of x-direction integration points for point norm (default: 20).
static int numY
 Number of y-direction integration points for point norm (default: 20).

Protected Member Functions

 Model ()
 Constructor called implicitly by subclasses - makes sure the record type is 0, so that destructor knows not to delete the type if construction of the subclass fails before typoe creation .
RecordTypecreateMixParameterType (const char **paramnames, int numparams, int mixturedim)
 Create a record type for a mixture model from a list of parameters.

Protected Attributes

LegeQuad * iX
 Quadrature for point tessellation norm.
LegeQuad * iY
RecordTypeparametertype
 Record type of a model's parameters.

Friends

class boost::serialization::access


Detailed Description

Abstract: determines partial distribution of source density for given cell.

The ListIterator interface allows the model to cache configuration information.

For each likelihood evaluation, the model is called first to get compute the overall normalizaton and then to compute the likelihood for each datum.

For tiled distributions, the measure is set by the tile and the tessellation itself is used to perform the normalization integral. The intermediate values of the model prediction for each (x, y) may be cached during the normalization computation and reused by the likelihood computation for efficiency.

For point distributions, there is no natural measure and the normalization must be performed with an independent quadrature. Since this is done multiple times, the implementor may consider creating two caches, one for the normalization and one for likelihood evaluations. Two quadrature schemes are currently available: two-dimensional Gauss-Legendre integration and a recursive, adaptive cubature scheme with error control.

See also:
QuadTreeIntegrator for more details on the cubature scheme

Member Function Documentation

void BIE::Model::setQuadTreeParams ( double  dx0,
double  dy0,
double  dx1,
double  dy1,
double  eps,
int  mlev 
)

Change the default QuadTree parameters.

Parameters:
dX0 is the maximum allowed grid space in the x direction
dY0 is the maximum allowed grid space in the x direction
dX1 is the minimum allowed grid space in the x direction
dY1 is the minimum allowed grid space in the x direction
Qeps is the desired tolerance
maxlevels is the limit on recursive bisection of each dimension

virtual double BIE::Model::NormEval ( double  X,
double  Y 
) [inline, virtual]

Integrated norm (e.g.

for point likelihood). This should be overridden by the inheriting class or never called (e.g. if the normalization integral is overridden above). Send a message to the programmer this is overlooked. This could be made pure virtual to enforce this behavior at compile time, but this approach saves the inheriting class from defining a dummy implementation that will never be used.

Reimplemented in BIE::GalaxyModelND, BIE::GalaxyModelOneD, BIE::GalaxyModelTwoD, and BIE::SimpleGalaxyModel.

virtual vector<double> BIE::Model::EvaluateBinned ( double  x,
double  y,
BinnedDistribution d 
) [inline, virtual]

Specific evaulate functions to be supplied by derived classes Either Evaluate or should be overloaded by the derived class or the following two classes need to be overloaded.

Contribution to each bin from this line of sight

Reimplemented in BIE::SimpleGalaxyModel, BIE::SplatModel, BIE::SplatModel1d, BIE::SplatModel3, BIE::SplatModel3dv, and BIE::SplatModelNdv.


The documentation for this class was generated from the following file:
  • /home/weinberg/src/BIE/include/Model.h

Send suggestions, questions, and feedback to WEINBERG at ASTRO dot UMASS dot EDU.
Documentation generated at Fri Mar 26 00:35:12 2010 by doxygen