Kstars
curvefit.h
18 // solver as provided the Gnu Science Library (GSL). See the comments at the start of curvefit.cpp
22 // For compatibility with existing Ekos functionality a Quadratic option using the exising Ekos linear
23 // least squares solver (again provided by GSL) is supported. The Quadratic and Parabola curves are
24 // the same thing mathematically but Parabola uses the non-linear least squares LM solver whilst Quadratic
27 // Users of CurveFitting operate on focuser position and HFR. Within CurveFitting the curve uses the more
105 // fitCurve takes in the vectors with the position, hfr and weight (e.g. variance in HFR) values
115 // Start and end define the x,y coordinates of a box around the star start is top left corner, end is bottom right
117 void fitCurve3D(const T *imageBuffer, const int imageWidth, const QPair<int, int> start, const QPair<int, int> end,
129 qCDebug(KSTARS_EKOS_FOCUS) << QString("CurveFitting::fitCurve3D imageWidth=%1").arg(imageWidth);
136 qCDebug(KSTARS_EKOS_FOCUS) << QString("CurveFitting::fitCurve3D called with useWeights. Not yet implemented");
145 // The pixel reference x, y refers to the top left corner of the pizel so add 0.5 to x and y to reference the
152 m_dataPoints.push_back(i + 0.5, j + 0.5, imageBuffer[start.first + i + ((start.second + j) * imageWidth)], 1.0);
161 // Something went wrong, log an error and reset state so solver starts from scratch if called again
162 qCDebug(KSTARS_EKOS_FOCUS) << QString("CurveFitting::fitCurve3D called with curveFit=%1").arg(curveFit);
173 bool findMinMax(double expected, double minPosition, double maxPosition, double *position, double *value, CurveFit curveFit,
218 QVector<double> polynomial_fit(const double *const data_x, const double *const data_y, const int n, const int order);
220 QVector<double> hyperbola_fit(FittingGoal goal, const QVector<double> data_x, const QVector<double> data_y,
222 QVector<double> parabola_fit(FittingGoal goal, const QVector<double> data_x, const QVector<double> data_y,
227 bool minimumQuadratic(double expected, double minPosition, double maxPosition, double *position, double *value);
228 bool minMaxHyperbola(double expected, double minPosition, double maxPosition, double *position, double *value,
230 bool minMaxParabola(double expected, double minPosition, double maxPosition, double *position, double *value,
236 void hypSetupParams(FittingGoal goal, gsl_multifit_nlinear_parameters *params, int *numIters, double *xtol, double *gtol,
242 void parSetupParams(FittingGoal goal, gsl_multifit_nlinear_parameters *params, int *numIters, double *xtol, double *gtol,
245 void gauSetupParams(gsl_multifit_nlinear_parameters *params, int *numIters, double *xtol, double *gtol, double *ftol);
250 // Calculation engine for the R-squared which is a measure of how well the curve fits the datapoints
251 double calcR2(const QVector<double> dataPoints, const QVector<double> curvePoints, const QVector<double> scale,
Ekos is an advanced Astrophotography tool for Linux. It is based on a modular extensible framework to...
Definition: align.cpp:69
void push_back(const T &value)
KIOFILEWIDGETS_EXPORT QString dir(const QString &fileClass)
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
const QList< QKeySequence > & end()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 30 2023 04:02:41 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 30 2023 04:02:41 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.