|
Mantid
|
Class that handles all the calibration constants for a bank of detectors. More...
#include <BankCalibration.h>
Public Member Functions | |
| BankCalibration (const double time_conversion, const std::set< detid_t > &det_in_group, const std::map< detid_t, double > &calibration_map, const std::map< detid_t, double > &scale_at_sample, const std::set< detid_t > &mask) | |
| Calibration of a subset of pixels as requested in the constructor. | |
| bool | empty () const |
| detid_t | idmax () const |
| const detid_t & | idmin () const |
| const double & | value_calibration (const detid_t detid) const |
| This assumes that everything is in range. | |
| double | value_scale_at_sample (const detid_t detid) const |
| This returns a value with no bounds checking. | |
Private Member Functions | |
| bool | detidInRange (const detid_t detid) const |
Private Attributes | |
| std::vector< double > | m_calibration |
| detid_t | m_detid_offset |
| std::vector< double > | m_scale_at_sample |
Class that handles all the calibration constants for a bank of detectors.
Accessing values DOES NO RANGE CHECKING so only request values within the range of detector IDs supplied to the constructor.
Definition at line 25 of file BankCalibration.h.
| Mantid::DataHandling::AlignAndFocusPowderSlim::BankCalibration::BankCalibration | ( | const double | time_conversion, |
| const std::set< detid_t > & | det_in_group, | ||
| const std::map< detid_t, double > & | calibration_map, | ||
| const std::map< detid_t, double > & | scale_at_sample, | ||
| const std::set< detid_t > & | mask | ||
| ) |
Calibration of a subset of pixels as requested in the constructor.
This is used because a vector is faster lookup than a map for dense array of values.
| time_conversion | Value to bundle into the calibration constant to account for converting the time-of-flight into microseconds. Applying it here is effectively the same as applying it to each event time-of-flight. |
| det_in_group | Detector-ids that are to be used in this group |
| calibration_map | Calibration for the entire instrument. |
| scale_at_sample | Scalar factor to multiply the time-of-flight by to get the time-of-flight of the neutron back at the sample position. |
| mask | detector ids that exist in the map should not be included. |
Definition at line 49 of file BankCalibration.cpp.
References Mantid::DataHandling::AlignAndFocusPowderSlim::IGNORE_PIXEL, m_calibration, m_detid_offset, m_scale_at_sample, and value.
|
private |
Definition at line 88 of file BankCalibration.cpp.
References idmax(), and idmin().
Referenced by value_calibration(), and value_scale_at_sample().
| bool Mantid::DataHandling::AlignAndFocusPowderSlim::BankCalibration::empty | ( | ) | const |
Definition at line 113 of file BankCalibration.cpp.
References m_calibration.
Referenced by Mantid::DataHandling::AlignAndFocusPowderSlim::ProcessEventsTask< DetIDsVector, TofVector >::operator()().
| detid_t Mantid::DataHandling::AlignAndFocusPowderSlim::BankCalibration::idmax | ( | ) | const |
Definition at line 111 of file BankCalibration.cpp.
References m_calibration, and m_detid_offset.
Referenced by detidInRange().
| const detid_t & Mantid::DataHandling::AlignAndFocusPowderSlim::BankCalibration::idmin | ( | ) | const |
Definition at line 110 of file BankCalibration.cpp.
References m_detid_offset.
Referenced by detidInRange().
| const double & Mantid::DataHandling::AlignAndFocusPowderSlim::BankCalibration::value_calibration | ( | const detid_t | detid | ) | const |
This assumes that everything is in range.
Values that weren't in the calibration map get set to 1. Values that are to be masked will be set to IGNORE_PIXEL.
Definition at line 96 of file BankCalibration.cpp.
References detidInRange(), Mantid::DataHandling::AlignAndFocusPowderSlim::IGNORE_PIXEL, m_calibration, and m_detid_offset.
Referenced by Mantid::DataHandling::AlignAndFocusPowderSlim::ProcessEventsTask< DetIDsVector, TofVector >::operator()().
| double Mantid::DataHandling::AlignAndFocusPowderSlim::BankCalibration::value_scale_at_sample | ( | const detid_t | detid | ) | const |
This returns a value with no bounds checking.
If scale_at_sample is not provided, this will have undefined behavior. This value should not be used if the detector is masked.
Definition at line 103 of file BankCalibration.cpp.
References detidInRange(), Mantid::DataHandling::AlignAndFocusPowderSlim::IGNORE_PIXEL, m_detid_offset, and m_scale_at_sample.
|
private |
Definition at line 44 of file BankCalibration.h.
Referenced by BankCalibration(), empty(), idmax(), and value_calibration().
|
private |
Definition at line 46 of file BankCalibration.h.
Referenced by BankCalibration(), idmax(), idmin(), value_calibration(), and value_scale_at_sample().
|
private |
Definition at line 45 of file BankCalibration.h.
Referenced by BankCalibration(), and value_scale_at_sample().