Many TODO comments in interpolate_polefig.cpp
The file steca/core/data/interpolate_polefig.cpp
contains many TODO
comments. These should be checked at some point.
Just making a note here for not losing this out of the eyes.
For example:
//! Adds data from peak infos within radius from alpha and beta to the peak parameter lists.
void searchPoints(
deg alpha, deg beta, deg radius, const OnePeakAllInfos& infos, std::vector<Mapped>& itfs)
{
// TODO REVIEW Use value trees to improve performance.
for (const Mapped& info : infos.peakInfos()) {
if (inRadius(
info.valueAtKey<deg>("alpha"), info.valueAtKey<deg>("beta"), alpha, beta, radius)) {
if (info.hasKey("intensity")) {
Mapped m;
m.setAtKey("intensity", info.atKey("intensity"));
m.setAtKey("center", info.atKey("center"));
m.setAtKey("fwhm", info.atKey("fwhm"));
itfs.push_back(m);
}
}
}
}
// TODO REVIEW qRound oder qCeil?
int numAlphas = qRound(90. / stepAlpha);
int numBetas = qRound(360. / stepBeta);
/ TODO REVIEW The RAW peak may need different handling.
double offset = 0;
double height = 0;
double fwhm = 0;
for (int i = 0; i < N; ++i) {
const Mapped* m = infos.at(i);
if (!m->hasKey("intensity"))
qFatal("inverseDistanceWeighing: no intensity given (#2)");
double d = inverseDistances.at(i);
offset += double(m->valueAtKey<deg>("center")) * d;
height += m->valueAtKey<double>("intensity") * d;
fwhm += m->valueAtKey<double>("fwhm") * d;
}
and more.
further I found this following comment
// NOTE We expect all infos to have the same gamma range.
This strikes me as something that also should be checked
Edited by Christian Trageser