#include <WavelengthGrid.hpp>
Public Member Functions | |
virtual int | bin (double lambda) const =0 |
virtual vector< int > | bins (double lambda) const =0 |
virtual double | effectiveWidth (int ell) const =0 |
virtual double | leftBorder (int ell) const =0 |
virtual int | numBins () const =0 |
virtual double | rightBorder (int ell) const =0 |
virtual double | transmission (int ell, double lambda) const =0 |
virtual double | wavelength (int ell) const =0 |
Range | wavelengthRange () const |
![]() | |
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 |
![]() | |
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 Item * | getItemProperty (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) |
Item & | operator= (const Item &)=delete |
Item * | parent () 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 | |
WavelengthGrid () | |
![]() | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
![]() | |
Item () | |
Private Types | |
using | BaseType = SimulationItem |
using | ItemType = WavelengthGrid |
Friends | |
class | ItemRegistry |
WavelengthGrid is an abstract class that defines the interface for wavelength grids that can be used, for example, to specify the wavelength bins used for detetecting photon packets in instruments.
A wavelength grid consists of
Key properties of a wavelength bin include its left and right borders, defining a wavelength interval within which the transmission may be nonzero, and its characteristic wavelength, which will be used by instruments to convert mean specific luminosities in the band between wavelength and frequency representations. The WavelengthGrid class requires that the characteristic wavelength of a bin falls inside the bin, i.e.
The public interface also includes functions to obtain the relative transmission for a given bin as a function of wavelength, defined as the transmission at that wavelength divided by the maximum transmission, and to obtain a bin's effective width, 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.
Finally, and most importantly, the public interface offers a function to determine the (indices of) the bin(s) that may have a nonzero transmission at a given wavelength.
|
inlineprotected |
Default constructor for abstract Item subclass WavelengthGrid : "a wavelength grid" .
|
pure virtual |
This function returns the index
Implemented in BandWavelengthGrid, and DisjointWavelengthGrid.
|
pure virtual |
This function returns a list of indices
Implemented in BandWavelengthGrid, and DisjointWavelengthGrid.
|
pure virtual |
This function returns the effective width of the wavelength bin corresponding to the index
Implemented in BandWavelengthGrid, and DisjointWavelengthGrid.
|
pure virtual |
This function returns the left border of the wavelength bin corresponding to the index
Implemented in BandWavelengthGrid, and DisjointWavelengthGrid.
|
pure virtual |
This function returns the number of bins
Implemented in BandWavelengthGrid, and DisjointWavelengthGrid.
|
pure virtual |
This function returns the right border of the wavelength bin corresponding to the index
Implemented in BandWavelengthGrid, and DisjointWavelengthGrid.
|
pure virtual |
This function returns the relative transmission for the wavelength bin corresponding to the index
Implemented in BandWavelengthGrid, and DisjointWavelengthGrid.
|
pure virtual |
This function returns the characteristic wavelength
Implemented in BandWavelengthGrid, and DisjointWavelengthGrid.
Range WavelengthGrid::wavelengthRange | ( | ) | const |
This function returns the wavelength range covered by the wavelength grid, which is defined as the range from the left border of the leftmost bin to the right border of the rightmost bin. This range includes all wavelengths possibly covered by the wavelength grid except in the rare case of overlapping bins where an inner bin is so wide that it outer limit extends beyond the outer bin.