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

#include <Band.hpp>

Inheritance diagram for Band:
Inheritance graph
[legend]

Public Member Functions

double effectiveWidth () const
 
double meanSpecificLuminosity (const Array &lambdav, const Array &pv) const
 
double pivotWavelength () const
 
double transmission (double wavelength) const
 
Range wavelengthRange () const
 
- 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

 Band ()
 
virtual size_t dataSize () const =0
 
void setupSelfAfter () override
 
virtual const double * transmissionData () const =0
 
virtual const double * wavelengthData () const =0
 
- 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 = SimulationItem
 
using ItemType = Band
 

Private Attributes

const double * _lambdav
 
double _pivot
 
size_t _size
 
const double * _transv
 
double _width
 

Friends

class ItemRegistry
 

Detailed Description

An instance of a Band subclass represents the transmission curve of a particular observational filter as a function of wavelength. Examples include the standard Johnson filters and the transmission curves in each broadband for actual observatories such as GALEX, SDSS or Herschel.

This abstract base class implements the key operations offered by all Band objects: obtaining the transmission at a given wavelength, calculating the mean specific luminosity for a given SED after convolving it with the transmission curve, and determining the pivot wavelength. Subclasses are responsible only for acquiring and serving the data points defining the transmission curve for the band.

Refer to the appendix in Camps et al. 2016 (MNRAS 462, 1057-1075) for a brief introduction of the relevant concepts and a derivation of the corresponding formulas. For the purposes of this class, a band is defined through its arbitrarily scaled transmission curve \(T(\lambda)\). The relative transmission at a given wavelength can then be written as

\[ T_\text{rel}(\lambda) = \frac{ T(\lambda) } { \max[ T(\lambda) ] }. \]

Given a spectral energy distribution \(L_\lambda(\lambda)\), the mean specific luminosity over the band \(\left<L_\lambda\right>\) can then be obtained through

\[ \left<L_\lambda\right> = \frac{ \int L_\lambda(\lambda)T(\lambda) \,\mathrm{d}\lambda } { \int T(\lambda) \,\mathrm{d}\lambda }. \]

The pivot wavelength of the band is defined as the wavelength at which the mean specific luminosity can be properly converted between wavelength and frequency representations. It is given by

\[ \lambda_\mathrm{pivot} = \sqrt{ \frac{ \int T(\lambda) \,\mathrm{d}\lambda } { \int T(\lambda) \,\mathrm{d}\lambda/\lambda^2 } }. \]

The effective width of the band is defined as the horizontal size of a rectangle with height equal to the maximum transmission and with the same area as the one covered by the band's transmission curve. It is given by

\[ W_\mathrm{eff} = \frac{ \int T(\lambda) \,\mathrm{d}\lambda } { \max[ T(\lambda) ] }. \]

As set forth by Camps et al. 2016, for energy measuring devices (bolometers) the total system transmission \(T(\lambda)\) is usually given by the instrument designers, and it can be used directly for this class. For photon counters (including all instruments in the UV, optical and near infrared), the total system response \(R(\lambda)\) is usually given instead. The transmission curve needed for this class can be derived from the response curve through

\[ T(\lambda) = \lambda\,R(\lambda). \]

This operation must be performed in a preprocessing step before handing the data to this class.

Also, to further simplify the above formulas, this class requires that the transmission curve provided by a subclass is normalized to unity, i.e.

\[ \int T(\lambda) \,\mathrm{d}\lambda = 1. \]

Constructor & Destructor Documentation

◆ Band()

Band::Band ( )
inlineprotected

Default constructor for abstract Item subclass Band : "a wavelength band (transmission curve)" .

Member Function Documentation

◆ dataSize()

virtual size_t Band::dataSize ( ) const
protectedpure virtual

This function returns the number of elements in the wavelength and transmission data arrays held by a subclass.

Implemented in BroadBand, and TabulatedBand.

◆ effectiveWidth()

double Band::effectiveWidth ( ) const

This function returns the effective width for this band, i.e. the horizontal size of a rectangle with height equal to the maximum transmission and with the same area as the one covered by the band's transmission curve. See the class header for the relevant formulas.

◆ meanSpecificLuminosity()

double Band::meanSpecificLuminosity ( const Array lambdav,
const Array pv 
) const

This function returns the mean specific luminosity \(\left<L_\lambda\right>\) for a given SED after convolving it with the transmission curve for this band. See the class header for the relevant formulas.

◆ pivotWavelength()

double Band::pivotWavelength ( ) const

This function returns the pivot wavelength for this band, i.e. the wavelength at which the mean specific luminosity can be properly converted between wavelength and frequency representations. See the class header for the relevant formulas.

◆ setupSelfAfter()

void Band::setupSelfAfter ( )
overrideprotectedvirtual

This function obtains pointers to the data representing the transmission curve from the subclass and precomputes various values for later use.

Reimplemented from SimulationItem.

◆ transmission()

double Band::transmission ( double  wavelength) const

This function returns the relative transmission \(T_\text{rel}(\lambda)\) for this band at the specified wavelength. See the class header for the relevant formulas.

◆ transmissionData()

virtual const double * Band::transmissionData ( ) const
protectedpure virtual

This function returns a pointer to the first transmission value in the corresponding array held by a subclass. The number of elements in this array can be obtained through the dataSize() function. The transmission values must be normalized as described in the class header.

Implemented in BroadBand, and TabulatedBand.

◆ wavelengthData()

virtual const double * Band::wavelengthData ( ) const
protectedpure virtual

This function returns a pointer to the first wavelength in the corresponding array held by a subclass. The number of elements in this array can be obtained through the dataSize() function.

Implemented in BroadBand, and TabulatedBand.

◆ wavelengthRange()

Range Band::wavelengthRange ( ) const

This function returns the wavelength range in which the transmission for this band may be nonzero.


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