cpl_error_code gravi_pca_refine_mean(gravi_pca_result *self, const cpl_matrix *residual)
Override the mean component calculated from the PCA decomposition. In conjunction with the fit_mean_s...
cpl_matrix * gravi_pca_get_data_residual(const gravi_pca_result *self) CPL_ATTR_ALLOC
Get residual (data - model).
cpl_error_code gravi_pca_set_component_signs(gravi_pca_result *self, const cpl_array *wave, int num_components)
Impose sign convention on PCA components.
cpl_matrix * gravi_pca_get_data_fit(const gravi_pca_result *self) CPL_ATTR_ALLOC
Get noise-free model.
void gravi_pca_result_delete(gravi_pca_result *self)
Deallocate a gravi_pca_result object.
cpl_error_code gravi_pca_fit_components_polynomial(gravi_pca_model *self, const cpl_array *wave, int degree, int num_components)
Fit polynomial model to each of a set of median-averaged PCA components.
cpl_vector * gravi_pca_get_component(const gravi_pca_result *self, int component) CPL_ATTR_ALLOC
Get components from PCA decomposition.
cpl_error_code gravi_pca_fit_components_bspline(gravi_pca_model *self, const cpl_array *wave, int degree, int num_components)
Fit B-spline model to each of a set of median-averaged PCA components.
gravi_pca_model * gravi_pca_create_model(const gravi_pca_result **results, int num_results, int num_components) CPL_ATTR_ALLOC
Compute median values of PCA components over a set of decomposition results.
cpl_vector * gravi_pca_get_component_fit(const gravi_pca_model *self, int component) CPL_ATTR_ALLOC
Get fit to components from PCA decomposition.
gravi_pca_model * gravi_pca_load_model(const cpl_matrix *components) CPL_ATTR_ALLOC
Create PCA model from existing set of components.
cpl_error_code gravi_pca_decomp_matrix_svd(gravi_pca_result *self)
Perform PCA decomposition by calculating singular value decomposition.
void gravi_pca_model_delete(gravi_pca_model *self)
Deallocate a gravi_pca_model object.
gravi_pca_result * gravi_pca_create_result(const cpl_matrix *data, const cpl_matrix *mask) CPL_ATTR_ALLOC
Construct a new gravi_pca_result object from a matrix of visphi data.
cpl_vector * gravi_pca_get_component_median(const gravi_pca_model *self, int component) CPL_ATTR_ALLOC
Get median-averaged component from a set of PCA decompositions.
cpl_error_code gravi_pca_fit_model(gravi_pca_result *self, const gravi_pca_model *model, cpl_boolean fit_mean_subtracted, cpl_boolean verbose)
Fit model formed from linear combination of PCA components to data.
Type to hold average (median) components obtained from a set of PCA decompositions and/or best-fit mo...
Type to hold results of a PCA decomposition.