...
This commit is contained in:
@@ -387,7 +387,7 @@ public:
|
||||
MccCoordPair<typename T::x_t, typename T::y_t>{x + res->pcmX, y + res->pcmY, obs_skycoord.epoch()};
|
||||
}
|
||||
} else { // for B-splines the result is computed directly from inverse B-spline coefficients
|
||||
ret = _computeFuncDeriv(x, y, res);
|
||||
ret = _computeFuncDeriv(x, y, res, true);
|
||||
|
||||
if (!ret) {
|
||||
if constexpr (mcc_coord_pair_c<T>) {
|
||||
|
||||
@@ -355,29 +355,30 @@ protected:
|
||||
std::vector<MccCelestialCoordEpoch> _epoch{};
|
||||
|
||||
|
||||
void computeModelResi(compute_result_t& result)
|
||||
{
|
||||
result.colon_err.resize(numberOfPoints());
|
||||
result.colat_err.resize(numberOfPoints());
|
||||
// void computeModelResi(compute_result_t& result)
|
||||
// {
|
||||
// result.colon_err.resize(numberOfPoints());
|
||||
// result.colat_err.resize(numberOfPoints());
|
||||
|
||||
// for (size_t i = 0; i < numberOfPoints(); ++i) {
|
||||
// result.colon_err[i] = _colonRES[i] - result.model_colonRES[i]; // = target - model
|
||||
// result.colat_err[i] = _colatRES[i] - result.model_colatRES[i]; // = target - model
|
||||
// }
|
||||
|
||||
// #ifdef USE_BSPLINE_PCM
|
||||
// if (result.pcm_type == MccDefaultPCMType::PCM_TYPE_BSPLINE) {
|
||||
// result.inv_colon_err.resize(numberOfPoints());
|
||||
// result.inv_colat_err.resize(numberOfPoints());
|
||||
// for (size_t i = 0; i < numberOfPoints(); ++i) {
|
||||
// result.inv_colon_err[i] = _colonRES[i] - result.inv_model_colonRES[i]; // = hw - model
|
||||
// result.inv_colat_err[i] = _colatRES[i] - result.inv_model_colatRES[i]; // = hw - model
|
||||
// }
|
||||
// }
|
||||
// #endif
|
||||
// }
|
||||
|
||||
for (size_t i = 0; i < numberOfPoints(); ++i) {
|
||||
result.colon_err[i] = _colonRES[i] - result.model_colonRES[i]; // = target - model
|
||||
result.colat_err[i] = _colatRES[i] - result.model_colatRES[i]; // = target - model
|
||||
}
|
||||
|
||||
#ifdef USE_BSPLINE_PCM
|
||||
if (result.pcm_type == MccDefaultPCMType::PCM_TYPE_BSPLINE) {
|
||||
result.inv_colon_err.resize(numberOfPoints());
|
||||
result.inv_colat_err.resize(numberOfPoints());
|
||||
for (size_t i = 0; i < numberOfPoints(); ++i) {
|
||||
result.inv_colon_err[i] = _colonRES[i] - result.inv_model_colonRES[i]; // = hw - model
|
||||
result.inv_colat_err[i] = _colatRES[i] - result.inv_model_colatRES[i]; // = hw - model
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
compute_result_t bsplineFitting(MccDefaultPCM<MOUNT_TYPE>::pcm_data_t& pcm_data)
|
||||
{
|
||||
compute_result_t result{.pcm_type = pcm_data.type, .error = MccPCMFitterErrorCode::ERROR_OK};
|
||||
@@ -534,6 +535,7 @@ protected:
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
compute_result_t robustLinearRegress(MccDefaultPCM<MOUNT_TYPE>::pcm_data_t& pcm_data,
|
||||
|
||||
Reference in New Issue
Block a user