The SKIRT project
advanced radiative transfer for astrophysics
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | Friends | List of all members
DistantInstrument Class Reference

#include <DistantInstrument.hpp>

Inheritance diagram for DistantInstrument:
Inheritance graph
[legend]

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 Direction bfkobs (const Position &bfr) const =0
 
virtual Direction bfky (const Position &bfr) const =0
 
virtual void detect (PhotonPacket *pp)=0
 
virtual void determineSameObserverAsPreceding (const Instrument *precedingInstrument)=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
 
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

 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
 
virtual void setupSelfAfter ()
 
virtual void setupSelfBefore ()
 
- Protected Member Functions inherited from Item
 Item ()
 

Private Types

using BaseType = Instrument
 
using ItemType = DistantInstrument
 

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-plane 0 0 90
XZ-plane 90 -90 0
YZ-plane 90 0 0
first octant 45 45 0

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,

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()

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()

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()

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()

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, and SEDInstrument.


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