The SKIRT project
advanced radiative transfer for astrophysics
ReadFitsGeometry Class Reference

#include <ReadFitsGeometry.hpp>

Inheritance diagram for ReadFitsGeometry:

Public Member Functions

double centerX () const
double centerY () const
double density (Position bfr) const override
string filename () const
Position generatePosition () const override
double inclination () const
int numPixelsX () const
int numPixelsY () const
double pixelScale () const
double positionAngle () const
double scaleHeight () const
double SigmaX () const override
double SigmaY () const override
double SigmaZ () const override
Public Member Functions inherited from GenGeometry
int dimension () 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

 ReadFitsGeometry ()
void setupSelfBefore () override
Protected Member Functions inherited from GenGeometry
 GenGeometry ()
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 Member Functions

void deproject (double &x) const
void derotate (double &x, double &y) const
void project (double &x) const
void rotate (double &x, double &y) const

Private Attributes

double _C1x
double _C1y
double _C2x
double _C2y
double _C3x
double _C3y
double _C4x
double _C4y
double _centerX
double _centerY
double _cosi
double _cospa
double _deltax
string _filename
Array _image
double _inclination
int _numPixelsX
int _numPixelsY
int _nx
int _ny
int _nz
double _pixelScale
double _positionAngle
double _scaleHeight
double _sini
double _sinpa
double _xmax
double _xmin
Array _Xv
double _ymax
double _ymin

Friends

class ItemRegistry

Detailed Description

The ReadFitsGeometry class is a subclass of the GenGeometry class, and describes a geometry characterized by observations. A 2D observed image FITS file is read into SKIRT, and deprojected assuming a certain position angle and inclination. The density is assumed to follow a exponential profile in the vertical directions,

\[ \rho(z) = \rho_0\, \exp\left(-\frac{|z|}{h_z}\right). \]

By running a SKIRT simulation with inclination of 0 degrees and position angle of the simulated galaxy, the SKIRT model images can be compared with the observations. The model geometry is set by nine parameters: the input filename, the pixel scale \(pix\), the position angle \(pa\), the inclination \(incl\), the number of pixels in x and y direction \(n_x\) and \(n_y\), the center of galaxy in (x,y) image coordinates \(x_c\) and \(y_c\) and the vertical scale height \(h_z\).

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

◆ ReadFitsGeometry()

ReadFitsGeometry::ReadFitsGeometry ( )
inlineprotected

Default constructor for concrete Item subclass ReadFitsGeometry: "a geometry read from a 2D FITS file".

Member Function Documentation

◆ centerX()

double ReadFitsGeometry::centerX ( ) const
inline

This function returns the value of the discoverable double property centerX: "x coordinate of the center (in pixels)".

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

◆ centerY()

double ReadFitsGeometry::centerY ( ) const
inline

This function returns the value of the discoverable double property centerY: "y coordinate of the center (in pixels)".

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

◆ density()

double ReadFitsGeometry::density ( Position bfr) const
overridevirtual

This function returns the density \(\rho(x,y,z)\) at the position (x,y,z).

Implements Geometry.

◆ deproject()

void ReadFitsGeometry::deproject ( double & x) const
private

This function deprojects the x coordinate of a point in the inclined plane into the x coordinate of that point in the world coordinate system. The following operation is applied:

\[x=\frac{x'}{\cos{\theta}}\]

where \(\theta\) is the inclination.

◆ derotate()

void ReadFitsGeometry::derotate ( double & x,
double & y ) const
private

This function transforms a set of x and y coordinates in the plane of the image into the x and y coordinates in the (derotated) inclined plane. The transformation matrix is the inverse of the matrix used for the rotate function.

◆ filename()

string ReadFitsGeometry::filename ( ) const
inline

This function returns the value of the discoverable string property filename: "the name of the input image file".

◆ generatePosition()

Position ReadFitsGeometry::generatePosition ( ) const
overridevirtual

This function generates a random position \((x,y,z)\) from the geometry, by drawing a random point from the appropriate probability density distribution function. The \((x,y)\) coordinates are derived from the normalized cumulative luminosity vector of the observed 2D projection. The z coordinate is derived from the vertical exponential probability distribution function.

Implements Geometry.

◆ inclination()

double ReadFitsGeometry::inclination ( ) const
inline

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

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

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

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

The default value for this property is given by the conditional value expression "0 deg".

◆ numPixelsX()

int ReadFitsGeometry::numPixelsX ( ) const
inline

This function returns the value of the discoverable integer property numPixelsX: "number of pixels in the x direction".

The minimum value for this property is "1".

◆ numPixelsY()

int ReadFitsGeometry::numPixelsY ( ) const
inline

This function returns the value of the discoverable integer property numPixelsY: "number of pixels in the y direction".

The minimum value for this property is "1".

◆ pixelScale()

double ReadFitsGeometry::pixelScale ( ) const
inline

This function returns the value of the discoverable double property pixelScale: "the physical scale of the image (length per pixel)".

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

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

◆ positionAngle()

double ReadFitsGeometry::positionAngle ( ) const
inline

This function returns the value of the discoverable double property positionAngle: "the position angle ω of the system".

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

The minimum value for this property is "-360 deg".

The maximum value for this property is "360 deg".

The default value for this property is given by the conditional value expression "0 deg".

◆ project()

void ReadFitsGeometry::project ( double & x) const
private

This function projects the x coordinate of a point in the world coordinate system into the x coordinate of that point in the inclined plane. The following operation is applied:

\[x'=x\cdot \cos{\theta}\]

where \(\theta\) is the inclination.

◆ rotate()

void ReadFitsGeometry::rotate ( double & x,
double & y ) const
private

This function transform a set of x and y coordinates in the inclined plane into the x and y coordinates in the (rotated) plane of the image. The transformation matrix \(\bf{T}\) is given by:

\[{\bf{T}} = \begin{pmatrix} \cos\omega & -\sin\omega & 0 \\ \sin\omega & \cos\omega & 0 \\ 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} 0 & 1 & 0 \\ -1 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix} \]

where \(\omega\) is the position angle.

◆ scaleHeight()

double ReadFitsGeometry::scaleHeight ( ) const
inline

This function returns the value of the discoverable double property scaleHeight: "the scale height".

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

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

◆ setupSelfBefore()

void ReadFitsGeometry::setupSelfBefore ( )
overrideprotectedvirtual

This function verifies the validity of the pixel scale, the inclination angle, the number of pixels in the x and y direction, the center of the image in x and y coordinates and the vertical scale height \(h_z\). A vector of normalized cumulative pixel luminosities is computed, satisfying the condition that the total mass equals 1.

Reimplemented from Geometry.

◆ SigmaX()

double ReadFitsGeometry::SigmaX ( ) const
overridevirtual

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

\[ \Sigma_X = \int_{-\infty}^\infty \rho(x,0,0) \, \text{d} x \]

Implements Geometry.

◆ SigmaY()

double ReadFitsGeometry::SigmaY ( ) const
overridevirtual

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

\[ \Sigma_Y = \int_{-\infty}^\infty \rho(0,y,0) \, \text{d} y \]

Implements Geometry.

◆ SigmaZ()

double ReadFitsGeometry::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 \]

Implements Geometry.


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