#include <BandWavelengthGrid.hpp>
Public Member Functions | |
const Band * | band (int ell) const |
int | bin (double lambda) const override |
vector< int > | bins (double lambda) const override |
double | effectiveWidth (int ell) const override |
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 | |
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 |
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 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 | |
BandWavelengthGrid () | |
virtual vector< Band * > | bandList ()=0 |
void | setupSelfAfter () override |
Protected Member Functions inherited from WavelengthGrid | |
WavelengthGrid () | |
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 = WavelengthGrid |
using | ItemType = BandWavelengthGrid |
Private Attributes | |
vector< Band * > | _bands |
Friends | |
class | ItemRegistry |
BandWavelengthGrid is an asbtract class for representing wavelength grids where each bin is defined by a Band object. Each Band object provides the transmission curve and the other (derived) properties for the corresponding bin. Examples include the standard Johnson filters and the broadbands for actual observatories such as GALEX, SDSS or Herschel. See the Band class for more information.
Each subclass must override the bandList() method to return a list of Band objects. The bands are automatically sorted in order of increasing pivot wavelength, even if the list returned by the subclass has them in a different order. The intervals in which the transmission is nonzero is allowed to overlap, but no two bands in the list should have the same pivot wavelength (this restriction essentially disallows specifying the same band twice).
|
inlineprotected |
Default constructor for abstract Item subclass BandWavelengthGrid : "a wavelength grid defined by a list of (broad)bands" .
const Band * BandWavelengthGrid::band | ( | int | ell | ) | const |
This function returns (a pointer to) the Band object defining the transmission curve for the bin with index \(\ell\).
|
protectedpure virtual |
This function must be implemented by each subclass to return a list of Band objects in arbitrary order (the bands will be sorted in order of increasing pivot wavelength by this class).
Implemented in ConfigurableBandWavelengthGrid, and PredefinedBandWavelengthGrid.
|
overridevirtual |
This function returns the index \(\ell\) of a band that may have a nonzero transmission at the specified wavelength \(\lambda\), i.e. for which \(\lambda^\mathrm{left}_\ell \le \lambda \le \lambda^\mathrm{right}_\ell\). If no bands match this condition, the function returns -1. If multiple bands match this condition, the function returns the index for the band with the shortest characteristic wavelength.
Implements WavelengthGrid.
|
overridevirtual |
This function returns a list of indices \(\ell_k\) of the bands that may have a nonzero transmission at the specified wavelength \(\lambda\), i.e. for which \(\lambda^\mathrm{left}_\ell \le \lambda \le \lambda^\mathrm{right}_\ell\). If no bands match this condition, the function returns an empty list.
Implements WavelengthGrid.
|
overridevirtual |
This function returns the effective width of the band corresponding to the index \(\ell\). Refer to the Band class for the relevant formulas.
Implements WavelengthGrid.
|
overridevirtual |
This function returns the left wavelength border of the band corresponding to the index \(\ell\). The transmission for this band is guaranteed to be zero for all wavelengths shorter than the left border.
Implements WavelengthGrid.
|
overridevirtual |
This function returns the number of bands in the grid (or equivalently, the number of bins). Bands are always sorted in order of increasing pivot wavelength.
Implements WavelengthGrid.
|
overridevirtual |
This function returns the right wavelength border of the band corresponding to the index \(\ell\). The transmission for this band is guaranteed to be zero for all wavelengths longer than the right border.
Implements WavelengthGrid.
|
overrideprotectedvirtual |
This function obtains the bands from the subclass and sorts them in order of increasing pivot wavelength.
Reimplemented from SimulationItem.
|
overridevirtual |
This function returns the relative transmission for the band corresponding to the index \(\ell\) at the wavelength \(\lambda\). Refer to the Band class for the relevant formulas.
Implements WavelengthGrid.
|
overridevirtual |
This function returns the pivot wavelength for the band corresponding to the index \(\ell\). Refer to the Band class for the relevant formulas. Bands are always sorted in order of increasing pivot wavelength.
Implements WavelengthGrid.