9#include <gsl/gsl_fit.h>
10#include <gsl/gsl_vector.h>
11#include <gsl/gsl_matrix.h>
12#include <gsl/gsl_multifit.h>
18const QString getGuideStatusString(GuideState state,
bool translated)
20 return translated ? guideStates[state].toString() : guideStates[state].untranslatedText();
22const QString getCaptureStatusString(CaptureState state,
bool translated)
24 return translated ? captureStates[state].toString() : captureStates[state].untranslatedText();
26const QString getFocusStatusString(FocusState state,
bool translated)
28 return translated ? focusStates[state].toString() : focusStates[state].untranslatedText();
30const QString getAlignStatusString(AlignState state,
bool translated)
32 return translated ? alignStates[state].toString() : alignStates[state].untranslatedText();
34const QString getFilterStatusString(FilterState state,
bool translated)
36 return translated ? filterStates[state].toString() : filterStates[state].untranslatedText();
40 return translated ? schedulerStates[state].toString() : schedulerStates[state].untranslatedText();
42const QString getExtensionStatusString(ExtensionState state,
bool translated)
44 return translated ? extensionStates[state].toString() : extensionStates[state].untranslatedText();
48std::vector<double> gsl_polynomial_fit(
const double *
const data_x,
const double *
const data_y,
const int n,
49 const int order,
double &chisq)
52 std::vector<double> vc;
55 y = gsl_vector_alloc(n);
56 c = gsl_vector_alloc(order + 1);
57 X = gsl_matrix_alloc(n, order + 1);
58 cov = gsl_matrix_alloc(order + 1, order + 1);
60 for (
int i = 0; i < n; i++)
62 for (
int j = 0; j < order + 1; j++)
64 gsl_matrix_set(X, i, j, pow(data_x[i], j));
66 gsl_vector_set(y, i, data_y[i]);
70 gsl_set_error_handler_off();
72 gsl_multifit_linear_workspace *work = gsl_multifit_linear_alloc(n, order + 1);
73 status = gsl_multifit_linear(X, y, c, cov, &chisq, work);
75 if (status != GSL_SUCCESS)
77 qDebug() << Q_FUNC_INFO <<
"GSL multifit error:" << gsl_strerror(status);
81 gsl_multifit_linear_free(work);
83 for (
int i = 0; i < order + 1; i++)
85 vc.push_back(gsl_vector_get(c, i));
100 argument << static_cast<int>(source);
111 dest =
static_cast<Ekos::CommunicationStatus
>(a);
118 argument << static_cast<int>(source);
136 argument << static_cast<int>(source);
147 dest =
static_cast<Ekos::FocusState
>(a);
154 argument << static_cast<int>(source);
165 dest =
static_cast<Ekos::GuideState
>(a);
172 argument << static_cast<int>(source);
190 argument << static_cast<int>(source);
201 dest =
static_cast<Ekos::SchedulerState
>(a);
208 argument << static_cast<int>(source);
219 dest =
static_cast<Ekos::ExtensionState
>(a);
The SchedulerState class holds all attributes defining the scheduler's state.
Ekos is an advanced Astrophotography tool for Linux.
CaptureState
Capture states.
KCALENDARCORE_EXPORT QDataStream & operator>>(QDataStream &in, const KCalendarCore::Alarm::Ptr &)
QDebug operator<<(QDebug dbg, const DcrawInfoContainer &c)
NETWORKMANAGERQT_EXPORT NetworkManager::Status status()