The SKIRT project
advanced radiative transfer for astrophysics
ResolutionBorderWavelengthGrid Class Reference

#include <ResolutionBorderWavelengthGrid.hpp>

Inheritance diagram for ResolutionBorderWavelengthGrid:

Public Member Functions

double maxWavelength () const
double minWavelength () const
double resolution () const
Public Member Functions inherited from DisjointWavelengthGrid
int bin (double lambda) const override
vector< int > bins (double lambda) const override
const Arraydlambdav () const
double effectiveWidth (int ell) const override
Array extdlambdav () const
Array extlambdav () const
const Arraylambdav () const
double leftBorder (int ell) const override
int numBins () const override
double rightBorder (int ell) const override
double transmission (int ell, double lambda) const override
double wavelength (int ell) const override
Public Member Functions inherited from WavelengthGrid
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

 ResolutionBorderWavelengthGrid ()
void setupSelfBefore () override
Protected Member Functions inherited from DisjointWavelengthGrid
 DisjointWavelengthGrid ()
void setupSelfAfter () override
void setWavelengthBins (const Array &lambdav, double relativeHalfWidth, bool constantWidth=false)
void setWavelengthBorders (const Array &borderv, bool logScale)
void setWavelengthRange (const Array &lambdav, bool logScale)
void setWavelengthSegments (const Array &bordcharv)
void setWavelengthSegments (const vector< double > &borderv, const vector< double > &characv)
Protected Member Functions inherited from WavelengthGrid
 WavelengthGrid ()
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 _maxWavelength
double _minWavelength
double _resolution

Friends

class ItemRegistry

Detailed Description

ResolutionBorderWavelengthGrid is a subclass of the DisjointWavelengthGrid class representing logarithmically distributed wavelength grids with given spectral resolution (rather than number of bins) and given outer bin borders (rather than characteristic wavelengths).

The number of bins is determined from the configured spectral resolution \(R=\lambda/\Delta\lambda\) through

\[ N = \mathrm{ceil}\left[ \frac{\log(\lambda_\mathrm{max}/\lambda_\mathrm{min})} {\log(1+1/R)} \right]. \]

The bin widths are equally distributed in log space between the specified minimum and maximum wavelength. The characteristic wavelength for each bin is determined as the geometric average of the bin's left and right borders. The grid always has at least one bin, which then has the specified minimum and maximum wavelength as its left and right border.

Constructor & Destructor Documentation

◆ ResolutionBorderWavelengthGrid()

ResolutionBorderWavelengthGrid::ResolutionBorderWavelengthGrid ( )
inlineprotected

Default constructor for concrete Item subclass ResolutionBorderWavelengthGrid: "a logarithmic wavelength grid with given spectral resolution and outer borders".

Member Function Documentation

◆ maxWavelength()

double ResolutionBorderWavelengthGrid::maxWavelength ( ) const
inline

This function returns the value of the discoverable double property maxWavelength: "the longest wavelength".

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

The minimum value for this property is "1 pm".

The maximum value for this property is "1 m".

◆ minWavelength()

double ResolutionBorderWavelengthGrid::minWavelength ( ) const
inline

This function returns the value of the discoverable double property minWavelength: "the shortest wavelength".

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

The minimum value for this property is "1 pm".

The maximum value for this property is "1 m".

◆ resolution()

double ResolutionBorderWavelengthGrid::resolution ( ) const
inline

This function returns the value of the discoverable double property resolution: "the spectral resolution R of the grid".

The minimum value for this property is "[1e-6".

The maximum value for this property is "1e6]".

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

◆ setupSelfBefore()

void ResolutionBorderWavelengthGrid::setupSelfBefore ( )
overrideprotectedvirtual

This function constructs the list of bin borders distributed logarithmically between \(\lambda_{\text{min}}\) and \(\lambda_{\text{max}}\).

Reimplemented from SimulationItem.


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