The SKIRT project
advanced radiative transfer for astrophysics
DistantInstrument Class Reference

#include <DistantInstrument.hpp>

Inheritance diagram for DistantInstrument:

Public Member Functions

double azimuth () const
Direction bfkobs (const Position &bfr) const override
Direction bfky (const Position &bfr) const override
void determineSameObserverAsPreceding (const Instrument *precedingInstrument) override
double distance () const
double inclination () const
double roll () const
Public Member Functions inherited from Instrument
virtual void detect (PhotonPacket *pp)=0
void flush ()
string instrumentName () const
const WavelengthGridinstrumentWavelengthGrid () const
bool isSameObserverAsPreceding () const
string itemName () const override
int numScatteringLevels () const
bool recordComponents () const
bool recordPolarization () const
bool recordStatistics () const
WavelengthGridwavelengthGrid () const
void write ()
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
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

 DistantInstrument ()
void setupSelfBefore () override
Protected Member Functions inherited from Instrument
 Instrument ()
 ~Instrument ()
FluxRecorderinstrumentFluxRecorder ()
void setSameObserverAsPreceding ()
void setupSelfAfter () override
void setupSelfBefore () override
Protected Member Functions inherited from SimulationItem
 SimulationItem ()
virtual bool offersInterface (const std::type_info &interfaceTypeInfo) const
Protected Member Functions inherited from Item
 Item ()

Private Types

using BaseType
using ItemType

Private Attributes

double _azimuth
Direction _bfkobs
Direction _bfky
double _distance
double _inclination
double _roll

Friends

class ItemRegistry

Detailed Description

DistantInstrument is an abstract class for representing instruments positioned at a sufficiently large distance from the system, so that the observable sky is a plane perpendicular to the line of sight rather than a part of a sphere. Consequently parallel projection is used and the distance is only important for flux calibration.

Viewing direction

The direction \({\boldsymbol{k}}_{\text{obs}} = (\theta,\varphi)\) towards the instrument is specified through the inclination angle \(\theta\) and the azimuth angle \(\varphi\). Finally, the instrument can be rotated about the line of sight by specifying its roll angle \(\omega\). The table below lists some typical values for these angles, in degrees.

View\(\theta\)\(\varphi\)\(\omega\)
XY-plane0090
XZ-plane90-900
YZ-plane9000
first octant45450

Nonzero redshift

If the model redshift is non-zero (see the Cosmology class description for more information), a distant instrument can be placed in either the rest-frame of the model or an observer frame corresponding to the model's redshift. To allow this selection, the distance property of distant instruments can have a zero value. Specifically,

  • If distance is non-zero, the instrument is placed in the rest-frame of the model at the given (non-relativistic) distance. Wavelengths are not shifted and fluxes are calibrated using the given distance.
  • If distance is zero, the instrument is placed in an observer frame corresponding to the redshift specified for the model. The wavelength of each detected photon packet is shifted accordingly before the packet's contribution is recorded in the instrument, and flux calibration takes into account the relevant relativistic effects including the luminosity distance.
  • If distance is zero and the model redshift is zero as well, a fatal error is issued during setup.

This approach allows the on-the-fly convolution for an instrument with a broadband-based wavelength grid to occur in either the rest-frame or the observer frame depending on the instrument's settings. A configuration might even include both type of instruments at the same time.

Constructor & Destructor Documentation

◆ DistantInstrument()

DistantInstrument::DistantInstrument ( )
inlineprotected

Default constructor for abstract Item subclass DistantInstrument: "a distant instrument".

Member Function Documentation

◆ azimuth()

double DistantInstrument::azimuth ( ) const
inline

This function returns the value of the discoverable double property azimuth: "the azimuth angle φ of the detector".

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".

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

◆ bfkobs()

Direction DistantInstrument::bfkobs ( const Position & bfr) const
overridevirtual

Returns the direction towards the observer, expressed in model coordinates. The provided photon packet's launching position is not used; it is considered to be very close to the coordinate origin from the observer's standpoint, since the distance is sufficiently large.

Implements Instrument.

◆ bfky()

Direction DistantInstrument::bfky ( const Position & bfr) const
overridevirtual

Returns the direction along the positive y-axis of the instrument frame, expressed in model coordinates. The function applies the inverse instrument transformation to the pixel frame's y-axis. The provided photon packet's launching position is not used because the orientation of the instrument frame does not depend on it.

Implements Instrument.

◆ determineSameObserverAsPreceding()

void DistantInstrument::determineSameObserverAsPreceding ( const Instrument * precedingInstrument)
overridevirtual

This function determines whether the specified instrument has the same observer type, position and viewing direction as the receiving instrument, and if so, calls the setSameObserverAsPreceding() function to remember the fact.

Implements Instrument.

◆ distance()

double DistantInstrument::distance ( ) const
inline

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

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

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

◆ inclination()

double DistantInstrument::inclination ( ) const
inline

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

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 "180 deg".

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

This property is displayed only if the Boolean expression "Dimension2|Dimension3" evaluates to true after replacing the names by true or false depending on their presence.

◆ roll()

double DistantInstrument::roll ( ) const
inline

This function returns the value of the discoverable double property roll: "the roll angle ω of the detector".

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".

This property is displayed only if the Boolean expression "Level2&(Dimension2|Dimension3)" evaluates to true after replacing the names by true or false depending on their presence.

◆ setupSelfBefore()

void DistantInstrument::setupSelfBefore ( )
overrideprotectedvirtual

This function pre-calculates the directions that need to be returned by the instrument.

Reimplemented from SimulationItem.

Reimplemented in FrameInstrument, FullInstrument, LightCurveInstrument, SEDInstrument, SpectralTimeMapInstrument, and TimeInstrument.


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