|
Mantid
|
This class is used to store information about parameters in XML instrument definition files and instrument parameter files, so that such parameters can be added to a workspace when appropriate. More...
#include <XMLInstrumentParameter.h>
Public Member Functions | |
| double | createParamValue (const Mantid::Kernel::TimeSeriesProperty< double > *logData, const Kernel::TimeROI *) const |
| Returns parameter value as generated using possibly equation expression etc. | |
| XMLInstrumentParameter (std::string logfileID, std::string value, std::shared_ptr< Kernel::Interpolation > interpolation, std::string formula, std::string formulaUnit, std::string resultUnit, std::string paramName, std::string type, std::string tie, std::vector< std::string > constraint, std::string &penaltyFactor, std::string fitFunc, std::string extractSingleValueAs, std::string eq, const Geometry::IComponent *comp, double angleConvertConst, const std::string &description, std::string visible) | |
| Default constructor. | |
Public Attributes | |
| double | m_angleConvertConst |
| when this const equals 1 it means that angle=degree (default) is set in IDF otherwise if this const equals 180/pi it means that angle=radian is set in IDF | |
| const Geometry::IComponent * | m_component |
| value from the log value | |
| const std::vector< std::string > | m_constraint |
| specific to fitting | |
| const std::string | m_description |
| if present, contains help string, describing the parameter | |
| const std::string | m_eq |
| single value from the log file(
average, first number, etc) | |
| const std::string | m_extractSingleValueAs |
| describes the way to extract a | |
| const std::string | m_fittingFunction |
| specific to fitting parameter | |
| const std::string | m_formula |
| specify fitting function | |
| const std::string | m_formulaUnit |
| formula to use for setting this parameter | |
| std::shared_ptr< Kernel::Interpolation > | m_interpolation |
| evaluating the formula | |
| const std::string | m_logfileID |
| logfile id | |
| const std::string | m_paramName |
| specify a value directly | |
| std::string | m_penaltyFactor |
| parameter specify lower and upper bound in that order | |
| const std::string | m_resultUnit |
| expected result (output) unit from | |
| const std::string | m_tie |
| specific to fitting parameter specify any tie | |
| const std::string | m_type |
| type of the data, e.g. int, double or string | |
| const std::string | m_value |
| rather then extracting value from logfile, | |
| const std::string | m_visible |
| if present, describes whether the parameter shall be visible in InstrumentViewer | |
This class is used to store information about parameters in XML instrument definition files and instrument parameter files, so that such parameters can be added to a workspace when appropriate.
For example log file parameters make reference to log file entry values in raw data, and such parameters needs raw data to be loaded first.
Definition at line 41 of file XMLInstrumentParameter.h.
| Mantid::Geometry::XMLInstrumentParameter::XMLInstrumentParameter | ( | std::string | logfileID, |
| std::string | value, | ||
| std::shared_ptr< Kernel::Interpolation > | interpolation, | ||
| std::string | formula, | ||
| std::string | formulaUnit, | ||
| std::string | resultUnit, | ||
| std::string | paramName, | ||
| std::string | type, | ||
| std::string | tie, | ||
| std::vector< std::string > | constraint, | ||
| std::string & | penaltyFactor, | ||
| std::string | fitFunc, | ||
| std::string | extractSingleValueAs, | ||
| std::string | eq, | ||
| const Geometry::IComponent * | comp, | ||
| double | angleConvertConst, | ||
| const std::string & | description, | ||
| std::string | visible | ||
| ) |
Default constructor.
Constructor.
| logfileID | :: The logfile id – the part of the file name which identifies the log |
| value | :: Rather then extracting value from logfile, specify a value directly |
| paramName | :: The name of the parameter which will be created based on the log values |
| type | :: The type |
| extractSingleValueAs | :: Describes the way to extract a single value from the log file( average, first number, etc) |
| eq | :: muParser equation to calculate the parameter value from the log value |
| comp | :: The pointer to the instrument component |
| interpolation | :: The pointer to the interpolation class |
| formula | :: The string formula to apply |
| formulaUnit | :: The unit that the formula requires the input value in |
| resultUnit | :: The unit of the result of the formula |
| tie | :: What to tie the value to |
| constraint | :: The constraint associated with this parameter |
| penaltyFactor | :: The level of penalty associated with the constraint |
| fitFunc | :: What fit function this applies to |
| angleConvertConst | :: angle conversion constant????? |
| description | :: text description of the parameter |
| visible | :: whether the parameter should be visible in InstrumentViewer |
Definition at line 57 of file XMLInstrumentParameter.cpp.
References m_description.
| double Mantid::Geometry::XMLInstrumentParameter::createParamValue | ( | const Mantid::Kernel::TimeSeriesProperty< double > * | logData, |
| const Kernel::TimeROI * | roi | ||
| ) | const |
Returns parameter value as generated using possibly equation expression etc.
Returns the parameter value.
This interprets the XML parameter specification in order to do one of these things:
| logData | :: Data in logfile |
| roi | :: TimeROI object to get active time |
| InstrumentDefinitionError | Thrown if issues with the content of XML instrument definition file |
Definition at line 94 of file XMLInstrumentParameter.cpp.
References Mantid::Kernel::Logger::error(), Mantid::Kernel::TimeSeriesProperty< TYPE >::extractStatistic(), Mantid::Kernel::Math::FirstValue, Mantid::Geometry::g_log, Mantid::Kernel::Math::LastValue, m_eq, m_extractSingleValueAs, m_formula, m_interpolation, m_logfileID, m_paramName, m_type, m_value, Mantid::Kernel::Math::Maximum, Mantid::Kernel::Math::Median, Mantid::Kernel::Math::Minimum, Mantid::Kernel::TimeSeriesProperty< TYPE >::nthValue(), position, and Mantid::Kernel::timeMean().
| double Mantid::Geometry::XMLInstrumentParameter::m_angleConvertConst |
when this const equals 1 it means that angle=degree (default) is set in IDF otherwise if this const equals 180/pi it means that angle=radian is set in IDF
Definition at line 85 of file XMLInstrumentParameter.h.
| const Geometry::IComponent* Mantid::Geometry::XMLInstrumentParameter::m_component |
value from the log value
the component address
Definition at line 75 of file XMLInstrumentParameter.h.
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().
| const std::vector<std::string> Mantid::Geometry::XMLInstrumentParameter::m_constraint |
specific to fitting
Definition at line 58 of file XMLInstrumentParameter.h.
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().
| const std::string Mantid::Geometry::XMLInstrumentParameter::m_description |
if present, contains help string, describing the parameter
Definition at line 87 of file XMLInstrumentParameter.h.
Referenced by Mantid::API::ExperimentInfo::populateWithParameter(), and XMLInstrumentParameter().
| const std::string Mantid::Geometry::XMLInstrumentParameter::m_eq |
single value from the log file( average, first number, etc)
muParser equation to calculate the parameter
Definition at line 73 of file XMLInstrumentParameter.h.
Referenced by createParamValue().
| const std::string Mantid::Geometry::XMLInstrumentParameter::m_extractSingleValueAs |
describes the way to extract a
Definition at line 70 of file XMLInstrumentParameter.h.
Referenced by createParamValue().
| const std::string Mantid::Geometry::XMLInstrumentParameter::m_fittingFunction |
specific to fitting parameter
Definition at line 62 of file XMLInstrumentParameter.h.
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().
| const std::string Mantid::Geometry::XMLInstrumentParameter::m_formula |
specify fitting function
specific to fitting parameter. Specify
Definition at line 64 of file XMLInstrumentParameter.h.
Referenced by createParamValue(), and Mantid::API::ExperimentInfo::populateWithParameter().
| const std::string Mantid::Geometry::XMLInstrumentParameter::m_formulaUnit |
formula to use for setting this parameter
unit for formula (i.e. for Centre in formula)
Definition at line 66 of file XMLInstrumentParameter.h.
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().
| std::shared_ptr<Kernel::Interpolation> Mantid::Geometry::XMLInstrumentParameter::m_interpolation |
evaluating the formula
specific to fitting parameter
Definition at line 69 of file XMLInstrumentParameter.h.
Referenced by createParamValue(), and Mantid::API::ExperimentInfo::populateWithParameter().
| const std::string Mantid::Geometry::XMLInstrumentParameter::m_logfileID |
logfile id
Definition at line 52 of file XMLInstrumentParameter.h.
Referenced by createParamValue().
| const std::string Mantid::Geometry::XMLInstrumentParameter::m_paramName |
specify a value directly
parameter name
Definition at line 55 of file XMLInstrumentParameter.h.
Referenced by createParamValue().
| std::string Mantid::Geometry::XMLInstrumentParameter::m_penaltyFactor |
parameter specify lower and upper bound in that order
specific to fitting parameter specify penalty factor
Definition at line 61 of file XMLInstrumentParameter.h.
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().
| const std::string Mantid::Geometry::XMLInstrumentParameter::m_resultUnit |
expected result (output) unit from
Definition at line 67 of file XMLInstrumentParameter.h.
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().
| const std::string Mantid::Geometry::XMLInstrumentParameter::m_tie |
specific to fitting parameter specify any tie
Definition at line 57 of file XMLInstrumentParameter.h.
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().
| const std::string Mantid::Geometry::XMLInstrumentParameter::m_type |
type of the data, e.g. int, double or string
Definition at line 56 of file XMLInstrumentParameter.h.
Referenced by createParamValue(), and Mantid::API::ExperimentInfo::populateWithParameter().
| const std::string Mantid::Geometry::XMLInstrumentParameter::m_value |
rather then extracting value from logfile,
Definition at line 53 of file XMLInstrumentParameter.h.
Referenced by createParamValue(), and Mantid::API::ExperimentInfo::populateWithParameter().
| const std::string Mantid::Geometry::XMLInstrumentParameter::m_visible |
if present, describes whether the parameter shall be visible in InstrumentViewer
Definition at line 89 of file XMLInstrumentParameter.h.
Referenced by Mantid::API::ExperimentInfo::populateWithParameter().