Class FilterTabulated
Defined in File FilterTabulated.hpp
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public phot::Filter(Class Filter)
Class Documentation
-
class FilterTabulated : public phot::Filter
A photometric filter whose response is tabulated as a function of wavelength.
Public Functions
-
inline FilterTabulated(std::string name, const std::vector<double> &wl, const std::vector<double> &response, double wlPivot)
Construct a FilterTabulated directly from a tabulated response.
A FilterTabulated always returns an energy flux (photCount() is always false); slug’s photCount concept – used for filter-like objects that report photon counts rather than energy fluxes, e.g. hydrogen-ionizing photon counters – is unrelated to SVO’s own “photon counter” vs. “energy counter” detector-type distinction, and is not exposed here.
- Parameters:
name – Name of this filter, for output purposes
wl – Wavelengths at which the response is tabulated, in Angstrom
response – Filter response at each wavelength in wl
wlPivot – This filter’s pivot wavelength, in Angstrom (see Filter::wlPivot()); mandatory here since, unlike the registry-based constructor, there is no registry entry to read one from
-
explicit FilterTabulated(const std::string &facility, const std::string &instrument, const std::string &filter, const std::string ®istryName = defaultRegistry)
Construct a FilterTabulated from an entry in a filter registry.
Follows the facility/instrument/filter hierarchy used by data/tools/filters/fetch_filter_vo.py to fetch filter data and by the filters.h5 file it writes to store it. name() is set to “facility.instrument.filter”.
- Parameters:
facility – Facility that operates the instrument the filter belongs to (e.g. “HST”)
instrument – Instrument the filter belongs to (e.g. “ACS_WFC”)
filter – Name of the filter (e.g. “F435W”)
registryName – Name of the filter registry file
-
FilterTabulated(const FilterTabulated&) = delete
-
auto operator=(const FilterTabulated&) -> FilterTabulated& = delete
-
FilterTabulated(FilterTabulated&&) = delete
-
auto operator=(FilterTabulated&&) -> FilterTabulated& = delete
-
~FilterTabulated() override = default
-
inline auto norm() const -> double
Get the integral of the filter response with respect to ln(wavelength)
- Returns:
The integral of the filter response with respect to ln(wavelength)
-
inline virtual auto wlPivot() const -> double override
Get this filter’s pivot wavelength.
- Returns:
The pivot wavelength, in Angstrom – either supplied directly (the (wl, response) constructor) or read from the registry entry’s wl_ref field (the registry constructor)
-
inline virtual auto wlSupport() const -> std::pair<double, double> override
Get the wavelength range over which this filter’s response is nonzero.
Zero-response padding at either end of a filter’s table is excluded, so that it does not make the filter look wider than its real passband.
- Returns:
{minimum, maximum} wavelength, in Angstrom: the tabulated points bracketing the first and last nonzero entries of responseData() (since the response is interpolated linearly between tabulated points, it is nonzero right up to those bracketing points), or the full tabulated range if the response has no zero padding at either end
-
virtual auto phot(const std::vector<double> &wl, const std::vector<double> &spec) const -> double override
Compute the photometric response in this filter to a given spectrum.
Evaluates \(\int F_\lambda(\lambda) R(\lambda)\, d\ln\lambda \big/ \int R(\lambda)\, d\ln\lambda\) (the second integral being norm()) – see this class’s own file-level comment in FilterTabulated.cpp for why this form (rather than the photon-counting \(\int [F_\lambda R / \lambda]\, d\lambda \big/ \int [R / \lambda]\, d\lambda\) it is analytically equivalent to) is the one actually evaluated here.
- Parameters:
wl – The wavelength grid, in Angstrom, on which spec is computed
spec – The spectrum to which to compute the photometric response
- Returns:
The photometric response, in erg/s/cm^2/Angstrom
-
inline auto wl() const -> const std::vector<double>&
Get the wavelengths at which the response is tabulated.
- Returns:
A const reference to the wavelength grid, in Angstrom
-
inline auto responseData() const -> const std::vector<double>&
Get the tabulated filter response data.
- Returns:
A const reference to the filter response at each wavelength in wl()
-
inline auto response() const -> const interp::Interpolator1D<1>&
Get the interpolator built from the tabulated response.
- Returns:
A const reference to the Interpolator1D built from ln(wl()) and responseData(), as used internally by phot()
-
inline FilterTabulated(std::string name, const std::vector<double> &wl, const std::vector<double> &response, double wlPivot)