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

#include <AllSkyInstrument.hpp>

Inheritance diagram for AllSkyInstrument:
Inheritance graph
[legend]

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
 
int numPixelsY () const
 
double observerX () const
 
double observerY () const
 
double observerZ () const
 
AllSkyProjectionprojection () const
 
double radius () const
 
double upX () const
 
double upY () const
 
double upZ () 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

 AllSkyInstrument ()
 
void detect (PhotonPacket *pp) override
 
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 = AllSkyInstrument
 

Private Attributes

double _crossX
 
double _crossY
 
double _crossZ
 
const double & _Cx
 
const double & _Cy
 
const double & _Cz
 
int _numPixelsY
 
int _Nx
 
int _Ny
 
double _observerX
 
double _observerY
 
double _observerZ
 
const double & _Ox
 
const double & _Oy
 
const double & _Oz
 
AllSkyProjection_projection
 
double _radius
 
HomogeneousTransform _transform
 
double _upX
 
double _upY
 
double _upZ
 
const double & _Ux
 
const double & _Uy
 
const double & _Uz
 

Friends

class ItemRegistry
 

Detailed Description

The AllSkyInstrument class implements an all-sky view of the simulated model, with arbitrary placement of the observer outside or inside the model. The instrument's sky is transformed to a rectangular image (for each wavelength) using one of the available all-sky projections. (See the HEALPixSkyInstrument class for an instrument that does not perform such a projection).

An all-sky instrument consists of a sphere with a given radius, centered at the location of the instrument. Only photon packets originating outside of this sphere are detected. When a photon packet arrives, the spherical coordinates of its originating position relative to the instrument coordinate system are determined. The two resulting angular coordinates are transformed to pixel coordinates in the image frame using the selected all-sky projection. The radial coordinate (i.e. the distance from the photon packet's origin to the instrument location) is used for adjusting the photon packet's luminosity contribution to the surface brightness in its target pixel. More details on the flux calibration for this "local" instrument are provided in the header of the FluxRecorder class.

This instrument does not support recording of spatially integrated flux densities.

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

◆ AllSkyInstrument()

AllSkyInstrument::AllSkyInstrument ( )
inlineprotected

Default constructor for concrete Item subclass AllSkyInstrument : "an all-sky instrument (for observing inside a model)" .

Member Function Documentation

◆ bfkobs()

Direction AllSkyInstrument::bfkobs ( const Position bfr) const
overridevirtual

Returns the direction towards the observer from the given photon packet launching position, expressed in model coordinates.

Implements Instrument.

◆ bfky()

Direction AllSkyInstrument::bfky ( const Position bfr) const
overridevirtual

Returns the direction along the positive y-axis in a plane normal to the vector towards the observer from the given photon packet launching position, expressed in model coordinates.

Implements Instrument.

◆ crossX()

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

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

◆ crossY()

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

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

◆ crossZ()

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

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

◆ detect()

void AllSkyInstrument::detect ( PhotonPacket pp)
overrideprotectedvirtual

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

Implements Instrument.

◆ determineSameObserverAsPreceding()

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

◆ numPixelsY()

AllSkyInstrument::numPixelsY ( ) const
inline

This function returns the value of the discoverable integer property numPixelsY : "the number of image pixels in the vertical (shortest) 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" .

◆ observerX()

AllSkyInstrument::observerX ( ) const
inline

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

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

◆ observerY()

AllSkyInstrument::observerY ( ) const
inline

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

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

◆ observerZ()

AllSkyInstrument::observerZ ( ) const
inline

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

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

◆ projection()

AllSkyInstrument::projection ( ) const
inline

This function returns the value of the discoverable item property projection : "the projection used for mapping the sky to a rectangle" .

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

◆ radius()

AllSkyInstrument::radius ( ) const
inline

This function returns the value of the discoverable double property radius : "the radius of the observer's all-sky sphere" .

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

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

◆ setupSelfBefore()

void AllSkyInstrument::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 an appropriate transformation given the instrument position and configuration.

Reimplemented from SimulationItem.

◆ upX()

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

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

◆ upY()

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

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

◆ upZ()

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

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


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