The SKIRT project
advanced radiative transfer for astrophysics
PerspectiveInstrument Class Reference

#include <PerspectiveInstrument.hpp>

Inheritance diagram for PerspectiveInstrument:

Public Member Functions

Direction bfkobs (const Position &bfr) const override
Direction bfky (const Position &bfr) const override
double crossX () const
double crossY () const
double crossZ () const
void determineSameObserverAsPreceding (const Instrument *precedingInstrument) override
double focal () const
int numPixelsX () const
int numPixelsY () const
double upX () const
double upY () const
double upZ () const
double viewX () const
double viewY () const
double viewZ () const
double width () const
Public Member Functions inherited from Instrument
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

 PerspectiveInstrument ()
void detect (PhotonPacket *pp) override
void setupSelfBefore () override
Protected Member Functions inherited from Instrument
 Instrument ()
 ~Instrument ()
FluxRecorderinstrumentFluxRecorder ()
void setSameObserverAsPreceding ()
void setupSelfAfter () 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

Direction _bfky
double _crossX
double _crossY
double _crossZ
const double & _Cx
const double & _Cy
const double & _Cz
double _Ex
double _Ey
double _Ez
const double & _Fe
double _focal
int _numPixelsX
int _numPixelsY
const int & _Nx
const int & _Ny
double _s
const double & _Sx
HomogeneousTransform _transform
double _upX
double _upY
double _upZ
const double & _Ux
const double & _Uy
const double & _Uz
double _viewX
double _viewY
double _viewZ
const double & _Vx
const double & _Vy
const double & _Vz
double _width

Friends

class ItemRegistry

Detailed Description

The PerspectiveInstrument class implements a full perspective view of the simulated model, with arbitrary placement of the viewport outside or inside the model. Only photon packets arriving from the front are recorded; light emitted behind the viewport is ignored. For each wavelength the instrument outputs the detected surface brightness in every pixel of a given frame as a data cube in a FITS file. The instrument does not support recording of spatially integrated flux densities.

The perspective instrument is intended mostly for making movies. Each movie frame is generated by a separate perspective instrument with the appropriate parameters.

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

◆ PerspectiveInstrument()

PerspectiveInstrument::PerspectiveInstrument ( )
inlineprotected

Default constructor for concrete Item subclass PerspectiveInstrument: "a perspective instrument (mostly for making movies)".

Member Function Documentation

◆ bfkobs()

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

Returns the direction towards the eye from the given photon packet launching position.

Implements Instrument.

◆ bfky()

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

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

Implements Instrument.

◆ crossX()

double PerspectiveInstrument::crossX ( ) const
inline

This function returns the value of the discoverable double property crossX: "the position of the crosshair, x component".

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

◆ crossY()

double PerspectiveInstrument::crossY ( ) const
inline

This function returns the value of the discoverable double property crossY: "the position of the crosshair, y component".

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

◆ crossZ()

double PerspectiveInstrument::crossZ ( ) const
inline

This function returns the value of the discoverable double property crossZ: "the position of the crosshair, z component".

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

◆ detect()

void PerspectiveInstrument::detect ( PhotonPacket * pp)
overrideprotectedvirtual

This function simulates the detection of a photon packet by the instrument.

Implements Instrument.

◆ determineSameObserverAsPreceding()

void PerspectiveInstrument::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.

◆ focal()

double PerspectiveInstrument::focal ( ) const
inline

This function returns the value of the discoverable double property focal: "the distance from the eye to the viewport origin".

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

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

◆ numPixelsX()

int PerspectiveInstrument::numPixelsX ( ) const
inline

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

The minimum value for this property is "25".

The maximum value for this property is "10000".

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

◆ numPixelsY()

int PerspectiveInstrument::numPixelsY ( ) const
inline

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

The minimum value for this property is "25".

The maximum value for this property is "10000".

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

◆ setupSelfBefore()

void PerspectiveInstrument::setupSelfBefore ( )
overrideprotectedvirtual

This function verifies that all attribute values have been appropriately set and performs setup for the instrument. Its most important task is to determine the appropriate perspective transformation.

Reimplemented from Instrument.

◆ upX()

double PerspectiveInstrument::upX ( ) const
inline

This function returns the value of the discoverable double property upX: "the upwards direction, x component".

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

◆ upY()

double PerspectiveInstrument::upY ( ) const
inline

This function returns the value of the discoverable double property upY: "the upwards direction, y component".

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

◆ upZ()

double PerspectiveInstrument::upZ ( ) const
inline

This function returns the value of the discoverable double property upZ: "the upwards direction, z component".

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

◆ viewX()

double PerspectiveInstrument::viewX ( ) const
inline

This function returns the value of the discoverable double property viewX: "the position of the viewport origin, x component".

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

◆ viewY()

double PerspectiveInstrument::viewY ( ) const
inline

This function returns the value of the discoverable double property viewY: "the position of the viewport origin, y component".

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

◆ viewZ()

double PerspectiveInstrument::viewZ ( ) const
inline

This function returns the value of the discoverable double property viewZ: "the position of the viewport origin, z component".

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

◆ width()

double PerspectiveInstrument::width ( ) const
inline

This function returns the value of the discoverable double property width: "the width of the viewport".

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

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


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