The SKIRT project
advanced radiative transfer for astrophysics
MultiGaussianExpansionGeometry Class Reference

#include <MultiGaussianExpansionGeometry.hpp>

Inheritance diagram for MultiGaussianExpansionGeometry:

Public Member Functions

double density (double R, double z) const override
string filename () const
Position generatePosition () const override
double inclination () const
double pixelscale () const
double SigmaR () const override
double SigmaZ () const override
Public Member Functions inherited from AxGeometry
double density (Position bfr) const override
int dimension () const override
double SigmaX () const override
double SigmaY () const override
Public Member Functions inherited from SimulationItem
template<class T>
T * find (bool setup=true) const
template<class T>
T * interface (int levels=-999999, bool setup=true) const
virtual string itemName () const
void setup ()
string typeAndName () const
Public Member Functions inherited from Item
 Item (const Item &)=delete
virtual ~Item ()
void addChild (Item *child)
const vector< Item * > & children () const
virtual void clearItemListProperty (const PropertyDef *property)
void destroyChild (Item *child)
virtual bool getBoolProperty (const PropertyDef *property) const
virtual vector< double > getDoubleListProperty (const PropertyDef *property) const
virtual double getDoubleProperty (const PropertyDef *property) const
virtual string getEnumProperty (const PropertyDef *property) const
virtual int getIntProperty (const PropertyDef *property) const
virtual vector< Item * > getItemListProperty (const PropertyDef *property) const
virtual ItemgetItemProperty (const PropertyDef *property) const
virtual string getStringProperty (const PropertyDef *property) const
int getUtilityProperty (string name) const
virtual void insertIntoItemListProperty (const PropertyDef *property, int index, Item *item)
Itemoperator= (const Item &)=delete
Itemparent () const
virtual void removeFromItemListProperty (const PropertyDef *property, int index)
virtual void setBoolProperty (const PropertyDef *property, bool value)
virtual void setDoubleListProperty (const PropertyDef *property, vector< double > value)
virtual void setDoubleProperty (const PropertyDef *property, double value)
virtual void setEnumProperty (const PropertyDef *property, string value)
virtual void setIntProperty (const PropertyDef *property, int value)
virtual void setItemProperty (const PropertyDef *property, Item *item)
virtual void setStringProperty (const PropertyDef *property, string value)
void setUtilityProperty (string name, int value)
virtual string type () const

Protected Member Functions

 MultiGaussianExpansionGeometry ()
void setupSelfBefore () override
Protected Member Functions inherited from AxGeometry
 AxGeometry ()
Protected Member Functions inherited from Geometry
 Geometry ()
Randomrandom () const
Protected Member Functions inherited from SimulationItem
 SimulationItem ()
virtual bool offersInterface (const std::type_info &interfaceTypeInfo) const
virtual void setupSelfAfter ()
Protected Member Functions inherited from Item
 Item ()

Private Types

using BaseType
using ItemType

Private Attributes

string _filename
double _inclination
Array _Mcumv
Array _Mv
int _Ncomp
double _pixelscale
Array _qv
Array _sigmav

Friends

class ItemRegistry

Detailed Description

The MultiGaussianExpansionGeometry class is a subclass of the AxGeometry class, and describes axisymmetric geometries characterized by a combination of gaussian distributions in the radial and the vertical direction,

\[ \rho(R,z) = \sum_j\rho_{j,0}\,\exp\left( -\frac{R^2}{2\sigma_j^2} -\frac{z^2}{2q_j^2\sigma_j^2}\right) \]

Using a multi-gaussian expansion (MGE), one can reconstruct a large variety of geometries; see for example Emsellem, Monnet & Bacon (1994, A&A, 285, 723), Emsellem et al. (1994, A&A, 285, 739) and Cappellari (2002, MNRAS, 333, 400).

This item type is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.

Constructor & Destructor Documentation

◆ MultiGaussianExpansionGeometry()

MultiGaussianExpansionGeometry::MultiGaussianExpansionGeometry ( )
inlineprotected

Default constructor for concrete Item subclass MultiGaussianExpansionGeometry: "a multi-gaussian expansion geometry".

Member Function Documentation

◆ density()

double MultiGaussianExpansionGeometry::density ( double R,
double z ) const
overridevirtual

This function returns the density \(\rho(R,z)\) at the cylindrical radius \(R\) and height \(z\). It just sums the contribution of the different MGE components.

Implements AxGeometry.

◆ filename()

string MultiGaussianExpansionGeometry::filename ( ) const
inline

This function returns the value of the discoverable string property filename: "the name of the file with the multi-gaussian expansion parameters".

◆ generatePosition()

Position MultiGaussianExpansionGeometry::generatePosition ( ) const
overridevirtual

This pure virtual function generates a random position from the geometry, by drawing a random point from the three-dimensional probability density \(p({\bf{r}})\, {\text{d}}{\bf{r}} = \rho({\bf{r}})\, {\text{d}}{\bf{r}}\). In the case of an MGE geometry, first a random component is chosen according to the discrete probability distribution \(p_j = M_j\). Once this component is selected, a random position \({\bf{r}} = (x,y,z)\) is generated by choosing three random numbers \((X_1,X_2,X_3)\) from a gaussian distribution and setting

\[ \begin{split} x &= \sigma_j\, X_1 \\ y &= \sigma_j \, X_2 \\ z &= q_j\, \sigma_j\, X_3 \end{split} \]

Implements Geometry.

◆ inclination()

double MultiGaussianExpansionGeometry::inclination ( ) const
inline

This function returns the value of the discoverable double property inclination: "the inclination of the system".

This property represents a physical quantity of type "posangle".

The minimum value for this property is "[0".

The maximum value for this property is "90 deg]".

◆ pixelscale()

double MultiGaussianExpansionGeometry::pixelscale ( ) const
inline

This function returns the value of the discoverable double property pixelscale: "the scale of the multi-gaussian-expanded image (length per pixel)".

This property represents a physical quantity of type "length".

The minimum value for this property is "]0".

◆ setupSelfBefore()

void MultiGaussianExpansionGeometry::setupSelfBefore ( )
overrideprotectedvirtual

This function reads a file with the parameters obtained by performing a multi-gaussian expansion of an image on the sky. The file should contain three columns, with the first column the total count \(N_j\) of the \(j\)'th component, the second column the scalelength \(\sigma_j\) in pixel units and the third column the apparent flattening \(q'_j\) on the plane of the sky. Apart from this file, the function needs the physical pixel scale (e.g. in pc/pix) of the images that have been used for the MGE decomposition and the inclination of the system. From these data, the function calculates for each of the components the normalized mass contribution

\[ M_j = \frac{N_j}{\sum_{j'} N_{j'}}, \]

the scalelength \(\sigma_j\) in physical units and the actual flattening \(q_j\) of each of the components. In particular, the actual flattening is calculated from the apparent flattening and inclination of the system using the relation

\[ q_j = \frac{\sqrt{{q'}_j^2-\cos^2i}}{\sin i} \]

Reimplemented from Geometry.

◆ SigmaR()

double MultiGaussianExpansionGeometry::SigmaR ( ) const
overridevirtual

This function returns the radial surface density, i.e. the integration of the density along a line in the equatorial plane starting at the centre of the coordinate system,

\[\Sigma_R = \int_0\infty \rho(R,0)\,{\text{d}}R. \]

For the MGE geometry we find

\[\Sigma_R = \sum_j \rho_{0,j} \int_0^\infty \exp\left(-\frac{R^2}{2\sigma_j^2}\right) {\text{d}}R = \frac{1}{4\pi} \sum_j \frac{M_j}{q_j\,\sigma_j^2}. \]

Implements AxGeometry.

◆ SigmaZ()

double MultiGaussianExpansionGeometry::SigmaZ ( ) const
overridevirtual

This function returns the Z-axis surface density, i.e. the integration of the density along the entire Z-axis,

\[ \Sigma_Z = \int_{-\infty}^\infty \rho(0,0,z)\,{\text{d}}z. \]

For the MGE geometry we find

\[ \Sigma_Z = \sum_j \rho_{0,j} \int_{-\infty}^\infty \exp\left(-\frac{z^2}{2 q_j^2 \sigma_j^2}\right) {\text{d}}z = \frac{1}{2\pi} \sum_j \frac{M_j}{\sigma_j^2}. \]

Implements Geometry.


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