Commit 485dfc38 authored by Danny Hindson's avatar Danny Hindson
Browse files

Resolve confusing variable names

The difc and difa diffractometer constants were read into variables
called difa and difc respectively. This "mistake" was then corrected
in the formula where the unit conversion occurs but it was a bit
obscure. Wanted to tidy this up before a bigger rework of the
dSpacing unit conversions
parent ce16b445
......@@ -31,7 +31,7 @@ public:
struct CalibrationParams {
CalibrationParams(const double _difa, const double _difc,
CalibrationParams(const double _difc, const double _difa,
const double _tzero);
const double difa;
const double difc;
......@@ -89,8 +89,8 @@ getParamLinesFromGSASFile(const std::string &paramsFilename) {
SaveGDA::CalibrationParams::CalibrationParams(const double _difa,
const double _difc,
SaveGDA::CalibrationParams::CalibrationParams(const double _difc,
const double _difa,
const double _tzero)
: difa(_difa), difc(_difc), tzero(_tzero) {}
......@@ -176,8 +176,8 @@ void SaveGDA::exec() {
std::transform(d.begin(), d.end(), std::back_inserter(tofScaled),
[&bankCalibParams](const double dVal) {
return (dVal * bankCalibParams.difa +
dVal * dVal * bankCalibParams.difc +
return (dVal * bankCalibParams.difc +
dVal * dVal * bankCalibParams.difa +
bankCalibParams.tzero) *
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment