BIE::CMDModelCache Class Reference

Simple test galaxy model with a quadrupole. More...

#include <CMDModelCache.h>

Inheritance diagram for BIE::CMDModelCache:
Collaboration diagram for BIE::CMDModelCache:

List of all members.

Public Member Functions

 CMDModelCache (int ndim, SampleDistribution *dist, CMD *cmd)
 Constructor.
 ~CMDModelCache ()
 Destructor.
void SetKnots (int num)
 Reset number of integration points.
void SetDataDir (string datadir)
 Set DataDir global variable (for ancillary data and parameter files).
void ResetCache ()
 Reset model cache.
virtual double NormEval (double x, double y, SampleDistribution *d)
 Compute normalization of tiles.
virtual vector< double > Evaluate (double x, double y, SampleDistribution *d)
 Main method returning source density.
string ParameterDescription (int i)
 Label parameters.
int DataDimension ()
 Dimension of data attributes.
void PrintCache ()
 Print cache entries (for debugging).
void SetExtinctionFactor (double efac)
 Change the default extinction value by constant factor.
void Initialize (State &)
 Initialize state dependent part of calculation.
void Initialize (vector< double > &w, vector< double > *&p)
 From component weights and component parameter vectors.

Static Public Attributes

static double CUTOFF
 Cutoff power law index.
static string DataDir
 File defining stellar classes.
static double zerotol
 Minimum value for ratio of min to max in cache.
static double minval
 Minimum absolute value for item in cache.
Global parameters
static int NUM
 Number of integration knots for Jacobi quadrature (default 200).
static double METAL
 Metallicity (default: 0.019).
static double ALPHA
 Jacobi quadrature parameters (default: 0, 0).
static double BETA
static double R0
 Observers position (kpc) (default 8.0).
static double Z0
 Vertical position of sun (pc) (default 15.0).
static double EFAC
 Multiplicative extinction factor (default 1.0).
static bool RLOG
 Use logarithmic scaling (default: false).
static double RMIN
 Minimum radius (kpc) (default: 0.010).
static double RMAX
 Maximum radius (kpc) (default: 20.0).
static double AMIN
 Limits for model parameters.
static double AMAX
 The maximum value for the scale length.
static double HMIN
 The minimum value for the scale height.
static double HMAX
 The maximum value for the scale height.
static double QMIN
 The minimum value for the quadratic amplitude.
static double QMAX
 The maximum value for the quadratic amplitude.

Protected Member Functions

void NormalizePopWeights (vector< double > *&p)
 Enforce normalization in population weights (vector input).
void NormalizePopWeights (State &s)
 Enforce normalization in population weights (state input).
virtual CMDCachegenerate (const coordPair &P, SampleDistribution *d)
 Generate the line-of-sight quantities.
virtual CMDCachecompute_bins (const coordPair &P, SampleDistribution *d)
 Compute the predicted bin values.
void check_bounds ()
 Check the bounds and set the flag.

Protected Attributes

CMDcmd
 Color model.
SFDS * sfd
 Extinction model.
int Nflux
 Number of data dimensions.
JacoQuad * intgr
 Stellar components.
int Ndim
 Number of model dimensions.
vector< double > pt
 Storage for passed parameter values.
vector< double > work
 Work vector for bin computation.
bool good_bounds
 Flag for in-bounds parameter vector.
mmapCMD cache
 Cache for line of sight elements (hash map).
coordPair lastP
 Save the last coordinate pair (key).
CMDCachelastC
 Save the last coordinate pair (value).
vector< ivector > marge
 Maginalization indicator vector.
EvalType type
 Type of evalution.
int nbins
 Histogram components.
vector< dvector > lowb
 Low values of each dim in the historam.
vector< dvector > highb
 High values of each dim in the historam.

Static Protected Attributes

static double Log10
 Constants.
static double onedeg
 Number of radians per degree.

Friends

class boost::serialization::access


Detailed Description

Simple test galaxy model with a quadrupole.

The galaxy density takes the follow form:

\[ \rho = \left\{ e^{-R/p_0}\hbox{sech}(1000z/p_1)^2 \times { \left[{x^2-y^2\over r^2}\cos 2p_4 + {2xy\over r^2}\sin2p_4\right] \over 1+(R/p_3)^\alpha } \right\}/(p_0^2 p_1) \]

where

  • $p_0$ is the exponential scale length
  • $p_1$ is the scale height
  • $p_2$ is the quadrupole strength
  • $p_3$ is the quadrupole scale length
  • $p_4$ is the postition angle
  • $q\equiv (r/p_3)^5$.
The second term is a pure spherical l=m=2 quadrupole. Its smallest value is -1 at q=2/3. The range for $p_2$ must be chosen accordingly.

Member Function Documentation

void BIE::CMDModelCache::Initialize ( State  )  [virtual]

Initialize state dependent part of calculation.

From a state vector

Implements BIE::Model.


Member Data Documentation

double BIE::CMDModelCache::AMIN [static]

Limits for model parameters.

The minimum value for the scale length

double BIE::CMDModelCache::Log10 [static, protected]

Constants.

Value of ln(10)

int BIE::CMDModelCache::nbins [protected]

Histogram components.

Number of bins

JacoQuad* BIE::CMDModelCache::intgr [protected]

Stellar components.

Integrator


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

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