Functions | |
xsh_resid_tab * | xsh_resid_tab_create (int size, double *lambda, double *order, double *slit, double *sn, int *slit_index, double *thpre_x, double *thpre_y, double *corr_x, double *corr_y, double *gaussian_norm, double *gaussian_fit_x, double *gaussian_fit_y, double *gaussian_sigma_x, double *gaussian_sigma_y, double *gaussian_fwhm_x, double *gaussian_fwhm_y, int *flag, xsh_wavesol *wavesol, int wavesol_type) |
Create a residual tab structure. | |
xsh_resid_tab * | xsh_resid_tab_create_not_flagged (int size, double *lambda, double *order, double *slit, double *sn, int *slit_index, double *thpre_x, double *thpre_y, double *corr_x, double *corr_y, double *gaussian_norm, double *gaussian_fit_x, double *gaussian_fit_y, double *gaussian_sigma_x, double *gaussian_sigma_y, double *gaussian_fwhm_x, double *gaussian_fwhm_y, int *flag, xsh_wavesol *wavesol, int wavesol_type) |
cpl_frame * | xsh_resid_tab_erase_flagged (cpl_frame *resid, const char *name) |
xsh_resid_tab * | xsh_resid_tab_load (cpl_frame *resid_tab_frame) |
Load a residual tab from a frame. | |
void | xsh_resid_tab_free (xsh_resid_tab **resid) |
Free memory associated to a resid_tab. | |
void | xsh_resid_tab_log (xsh_resid_tab *resid, const char *filename) |
Log the residual tab in a ASCII file. | |
cpl_frame * | xsh_resid_tab_save (xsh_resid_tab *resid, const char *filename, xsh_instrument *instr, const char *tag) |
Save a residual tab to a frame. | |
double * | xsh_resid_tab_get_lambda_data (xsh_resid_tab *resid) |
Get the size of the residual tab. | |
double * | xsh_resid_tab_get_order_data (xsh_resid_tab *resid) |
Get the Orders array of the residual tab. | |
double * | xsh_resid_tab_get_slitpos_data (xsh_resid_tab *resid) |
Get the slit_pos array of the residual tab. | |
double * | xsh_resid_tab_get_thpre_x_data (xsh_resid_tab *resid) |
Get the slit_index array of the residual tab. | |
double * | xsh_resid_tab_get_thpre_y_data (xsh_resid_tab *resid) |
Get the thpre_y array of the residual tab. | |
double * | xsh_resid_tab_get_xgauss_data (xsh_resid_tab *resid) |
Get the xgauss array of the residual tab. | |
double * | xsh_resid_tab_get_ygauss_data (xsh_resid_tab *resid) |
Get the ygauss array of the residual tab. | |
cpl_error_code | xsh_frame_table_resid_merge (cpl_frame *self, cpl_frame *right, const int solution_type) |
cpl_error_code xsh_frame_table_resid_merge | ( | cpl_frame * | self, | |
cpl_frame * | right, | |||
const int | solution_type | |||
) |
Definition at line 1160 of file xsh_data_resid_tab.c.
References check, XSH_DETECT_ARCLINES_TYPE_MODEL, xsh_free_propertylist(), xsh_free_table(), XSH_RESID_TAB_TABLE_COLNAME_FLAG, XSH_RESID_TAB_TABLE_COLNAME_ORDER, XSH_RESID_TAB_TABLE_COLNAME_RESIDXMODEL, XSH_RESID_TAB_TABLE_COLNAME_RESIDXPOLY, XSH_RESID_TAB_TABLE_COLNAME_RESIDYMODEL, XSH_RESID_TAB_TABLE_COLNAME_RESIDYPOLY, XSH_RESID_TAB_TABLE_COLNAME_SLITINDEX, XSH_RESID_TAB_TABLE_COLNAME_WAVELENGTH, XSH_RESID_TAB_TABLE_COLNAME_XPOLY, XSH_RESID_TAB_TABLE_COLNAME_XTHANNEAL, XSH_RESID_TAB_TABLE_COLNAME_YPOLY, and XSH_RESID_TAB_TABLE_COLNAME_YTHANNEAL.
Referenced by xsh_2dmap(), and xsh_predict().
xsh_resid_tab* xsh_resid_tab_create | ( | int | size, | |
double * | lambda, | |||
double * | order, | |||
double * | slit, | |||
double * | sn, | |||
int * | slit_index, | |||
double * | thpre_x, | |||
double * | thpre_y, | |||
double * | corr_x, | |||
double * | corr_y, | |||
double * | gaussian_norm, | |||
double * | gaussian_fit_x, | |||
double * | gaussian_fit_y, | |||
double * | gaussian_sigma_x, | |||
double * | gaussian_sigma_y, | |||
double * | gaussian_fwhm_x, | |||
double * | gaussian_fwhm_y, | |||
int * | flag, | |||
xsh_wavesol * | wavesol, | |||
int | wavesol_type | |||
) |
Create a residual tab structure.
[in] | size | The numbers of lines in residual tab |
[in] | lambda | The wavelength of the size lines |
[in] | order | order array |
[in] | slit | slit array |
[in] | slit_index | slit_index array (for each pinhole) |
[in] | thpre_x | THE X position |
[in] | thpre_y | THE Y position |
[in] | corr_x | corrective x factor |
[in] | corr_y | corrective y factor |
[in] | gaussian_fit_x | x position after Gaussian fit |
[in] | gaussian_fit_y | y position after Gaussian fit |
[in] | gaussian_sigma_x | x sigma after Gaussian fit |
[in] | gaussian_sigma_y | y sigma after Gaussian fit |
[in] | wavesol | wavelength solution |
[in] | wavesol_type | wavelength solution type |
Definition at line 85 of file xsh_data_resid_tab.c.
References check, xsh_resid_tab::flag, xsh_resid_tab::fwhm_xgauss, xsh_resid_tab::fwhm_ygauss, xsh_resid_tab::header, xsh_resid_tab::lambda, xsh_resid_tab::norm_gauss, xsh_resid_tab::order, xsh_resid_tab::sig_xgauss, xsh_resid_tab::sig_ygauss, xsh_resid_tab::size, xsh_resid_tab::slit, xsh_resid_tab::slit_index, xsh_resid_tab::sn, xsh_resid_tab::solution_type, xsh_resid_tab::thcor_x, xsh_resid_tab::thcor_y, xsh_resid_tab::thpre_x, xsh_resid_tab::thpre_y, xsh_resid_tab::xgauss, xsh_resid_tab::xpoly, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_resid_tab_free(), XSH_WAVESOL_2D, xsh_wavesol_eval_polx(), xsh_wavesol_eval_poly(), xsh_wavesol_get_type(), XSH_WAVESOL_GUESS, XSH_WAVESOL_UNDEFINED, xsh_resid_tab::ygauss, and xsh_resid_tab::ypoly.
Referenced by xsh_detect_arclines(), and xsh_detect_arclines_dan().
xsh_resid_tab* xsh_resid_tab_create_not_flagged | ( | int | size, | |
double * | lambda, | |||
double * | order, | |||
double * | slit, | |||
double * | sn, | |||
int * | slit_index, | |||
double * | thpre_x, | |||
double * | thpre_y, | |||
double * | corr_x, | |||
double * | corr_y, | |||
double * | gaussian_norm, | |||
double * | gaussian_fit_x, | |||
double * | gaussian_fit_y, | |||
double * | gaussian_sigma_x, | |||
double * | gaussian_sigma_y, | |||
double * | gaussian_fwhm_x, | |||
double * | gaussian_fwhm_y, | |||
int * | flag, | |||
xsh_wavesol * | wavesol, | |||
int | wavesol_type | |||
) |
Definition at line 217 of file xsh_data_resid_tab.c.
References check, xsh_resid_tab::flag, xsh_resid_tab::fwhm_xgauss, xsh_resid_tab::fwhm_ygauss, xsh_resid_tab::header, xsh_resid_tab::lambda, xsh_resid_tab::norm_gauss, xsh_resid_tab::order, xsh_resid_tab::sig_xgauss, xsh_resid_tab::sig_ygauss, xsh_resid_tab::size, xsh_resid_tab::slit, xsh_resid_tab::slit_index, xsh_resid_tab::sn, xsh_resid_tab::solution_type, xsh_resid_tab::thcor_x, xsh_resid_tab::thcor_y, xsh_resid_tab::thpre_x, xsh_resid_tab::thpre_y, xsh_resid_tab::xgauss, xsh_resid_tab::xpoly, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_resid_tab_free(), XSH_WAVESOL_2D, xsh_wavesol_eval_polx(), xsh_wavesol_eval_poly(), xsh_wavesol_get_type(), XSH_WAVESOL_GUESS, XSH_WAVESOL_UNDEFINED, xsh_resid_tab::ygauss, and xsh_resid_tab::ypoly.
Referenced by xsh_detect_arclines_dan().
cpl_frame* xsh_resid_tab_erase_flagged | ( | cpl_frame * | resid, | |
const char * | name | |||
) |
Definition at line 349 of file xsh_data_resid_tab.c.
References check, xsh_free_propertylist(), xsh_free_table(), and XSH_RESID_TAB_TABLE_COLNAME_FLAG.
void xsh_resid_tab_free | ( | xsh_resid_tab ** | resid | ) |
Free memory associated to a resid_tab.
[in,out] | resid | The resid_tab to free |
Definition at line 627 of file xsh_data_resid_tab.c.
References XSH_FREE, and xsh_free_propertylist().
Referenced by main(), xsh_create_order_table(), xsh_detect_arclines(), xsh_detect_arclines_dan(), xsh_flexcor(), xsh_model_pipe_anneal(), xsh_resid_tab_create(), xsh_resid_tab_create_not_flagged(), and xsh_resid_tab_load().
double* xsh_resid_tab_get_lambda_data | ( | xsh_resid_tab * | resid | ) |
Get the size of the residual tab.
resid | The resid_tab structure |
resid | The resid_tab structure |
Definition at line 1022 of file xsh_data_resid_tab.c.
References XSH_ASSURE_NOT_NULL.
Referenced by xsh_create_order_table(), and xsh_model_pipe_anneal().
double* xsh_resid_tab_get_order_data | ( | xsh_resid_tab * | resid | ) |
Get the Orders array of the residual tab.
resid | The resid_tab structure |
Definition at line 1041 of file xsh_data_resid_tab.c.
References xsh_resid_tab::order, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_create_order_table(), and xsh_model_pipe_anneal().
double* xsh_resid_tab_get_slitpos_data | ( | xsh_resid_tab * | resid | ) |
Get the slit_pos array of the residual tab.
resid | The resid_tab structure |
Definition at line 1060 of file xsh_data_resid_tab.c.
References xsh_resid_tab::slit, and XSH_ASSURE_NOT_NULL.
double* xsh_resid_tab_get_thpre_x_data | ( | xsh_resid_tab * | resid | ) |
Get the slit_index array of the residual tab.
resid | The resid_tab structure |
resid | The resid_tab structure |
Definition at line 1089 of file xsh_data_resid_tab.c.
References XSH_ASSURE_NOT_NULL.
Referenced by xsh_model_pipe_anneal().
double* xsh_resid_tab_get_thpre_y_data | ( | xsh_resid_tab * | resid | ) |
Get the thpre_y array of the residual tab.
resid | The resid_tab structure |
Definition at line 1108 of file xsh_data_resid_tab.c.
References xsh_resid_tab::thpre_y, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_model_pipe_anneal().
double* xsh_resid_tab_get_xgauss_data | ( | xsh_resid_tab * | resid | ) |
Get the xgauss array of the residual tab.
resid | The resid_tab structure |
Definition at line 1127 of file xsh_data_resid_tab.c.
References xsh_resid_tab::xgauss, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_create_order_table(), and xsh_model_pipe_anneal().
double* xsh_resid_tab_get_ygauss_data | ( | xsh_resid_tab * | resid | ) |
Get the ygauss array of the residual tab.
resid | The resid_tab structure |
Definition at line 1146 of file xsh_data_resid_tab.c.
References XSH_ASSURE_NOT_NULL, and xsh_resid_tab::ygauss.
Referenced by xsh_create_order_table(), and xsh_model_pipe_anneal().
xsh_resid_tab* xsh_resid_tab_load | ( | cpl_frame * | resid_tab_frame | ) |
Load a residual tab from a frame.
[in] | resid_tab_frame | The residual tab to load |
Definition at line 389 of file xsh_data_resid_tab.c.
References check, xsh_resid_tab::flag, xsh_resid_tab::fwhm_xgauss, xsh_resid_tab::fwhm_ygauss, xsh_resid_tab::header, xsh_resid_tab::lambda, xsh_resid_tab::norm_gauss, xsh_resid_tab::order, order, xsh_resid_tab::sig_xgauss, xsh_resid_tab::sig_ygauss, xsh_resid_tab::size, size, xsh_resid_tab::slit, xsh_resid_tab::slit_index, xsh_resid_tab::solution_type, xsh_resid_tab::thanneal_x, xsh_resid_tab::thanneal_y, xsh_resid_tab::thcor_x, xsh_resid_tab::thcor_y, xsh_resid_tab::thpre_x, xsh_resid_tab::thpre_y, xsh_resid_tab::xgauss, xsh_resid_tab::xpoly, XSH_ASSURE_NOT_NULL, XSH_CALLOC, XSH_DETECT_ARCLINES_TYPE_MODEL, XSH_DETECT_ARCLINES_TYPE_POLY, xsh_error_msg, xsh_get_table_value(), xsh_msg, xsh_pfits_get_wavesoltype(), xsh_resid_tab_free(), XSH_RESID_TAB_TABLE_COLNAME_FLAG, XSH_RESID_TAB_TABLE_COLNAME_FWHMXGAUSS, XSH_RESID_TAB_TABLE_COLNAME_FWHMYGAUSS, XSH_RESID_TAB_TABLE_COLNAME_NORMGAUSS, XSH_RESID_TAB_TABLE_COLNAME_ORDER, XSH_RESID_TAB_TABLE_COLNAME_SIGMAXGAUSS, XSH_RESID_TAB_TABLE_COLNAME_SIGMAYGAUSS, XSH_RESID_TAB_TABLE_COLNAME_SLITINDEX, XSH_RESID_TAB_TABLE_COLNAME_SLITPOSITION, XSH_RESID_TAB_TABLE_COLNAME_WAVELENGTH, XSH_RESID_TAB_TABLE_COLNAME_XGAUSS, XSH_RESID_TAB_TABLE_COLNAME_XPOLY, XSH_RESID_TAB_TABLE_COLNAME_XTHANNEAL, XSH_RESID_TAB_TABLE_COLNAME_XTHPRE, XSH_RESID_TAB_TABLE_COLNAME_YGAUSS, XSH_RESID_TAB_TABLE_COLNAME_YPOLY, XSH_RESID_TAB_TABLE_COLNAME_YTHANNEAL, XSH_RESID_TAB_TABLE_COLNAME_YTHPRE, XSH_TABLE_FREE, XSH_TABLE_LOAD, XSH_WAVESOLTYPE, XSH_WAVESOLTYPE_MODEL, xsh_resid_tab::ygauss, and xsh_resid_tab::ypoly.
Referenced by main(), xsh_create_order_table(), xsh_flexcor(), and xsh_model_pipe_anneal().
void xsh_resid_tab_log | ( | xsh_resid_tab * | resid, | |
const char * | filename | |||
) |
Log the residual tab in a ASCII file.
[in] | resid | The resid_tab to log in |
[in] | filename | The name of the log file |
Definition at line 668 of file xsh_data_resid_tab.c.
References xsh_resid_tab::lambda, xsh_resid_tab::order, order, xsh_resid_tab::size, xsh_resid_tab::slit, xsh_resid_tab::solution_type, xsh_resid_tab::thanneal_x, xsh_resid_tab::thanneal_y, xsh_resid_tab::thpre_x, xsh_resid_tab::thpre_y, xsh_resid_tab::xgauss, xsh_resid_tab::xpoly, XSH_ASSURE_NOT_NULL, XSH_DETECT_ARCLINES_TYPE_POLY, xsh_resid_tab::ygauss, and xsh_resid_tab::ypoly.
Referenced by main().
cpl_frame* xsh_resid_tab_save | ( | xsh_resid_tab * | resid, | |
const char * | filename, | |||
xsh_instrument * | instr, | |||
const char * | tag | |||
) |
Save a residual tab to a frame.
resid | The resid_tab structure to save | |
[in] | filename | The name of the save file on disk |
Definition at line 731 of file xsh_data_resid_tab.c.
References check, xsh_resid_tab::flag, xsh_resid_tab::fwhm_xgauss, xsh_resid_tab::fwhm_ygauss, xsh_resid_tab::header, xsh_resid_tab::lambda, xsh_resid_tab::mean_diff_poly_fit_x, xsh_resid_tab::mean_diff_poly_fit_y, xsh_resid_tab::median_diff_poly_fit_x, xsh_resid_tab::median_diff_poly_fit_y, xsh_resid_tab::norm_gauss, xsh_resid_tab::order, order, xsh_resid_tab::sig_xgauss, xsh_resid_tab::sig_ygauss, size, xsh_resid_tab::size, xsh_resid_tab::slit, xsh_resid_tab::slit_index, xsh_resid_tab::sn, xsh_resid_tab::solution_type, xsh_resid_tab::stdev_diff_poly_fit_x, xsh_resid_tab::stdev_diff_poly_fit_y, xsh_resid_tab::thpre_x, xsh_resid_tab::thpre_y, xsh_resid_tab::xgauss, xsh_resid_tab::xpoly, XSH_ASSURE_NOT_NULL, XSH_DETECT_ARCLINES_TYPE_POLY, xsh_frame_product(), xsh_free_frame(), xsh_pfits_set_pcatg(), xsh_pfits_set_qc(), xsh_pfits_set_wavesoltype(), XSH_QC_FMTCHK_POLY_DIFFXAVG, XSH_QC_FMTCHK_POLY_DIFFXMED, XSH_QC_FMTCHK_POLY_DIFFXSTD, XSH_QC_FMTCHK_POLY_DIFFYAVG, XSH_QC_FMTCHK_POLY_DIFFYMED, XSH_QC_FMTCHK_POLY_DIFFYSTD, XSH_REGDEBUG, XSH_RESID_TAB_TABLE_COLNAME_FLAG, XSH_RESID_TAB_TABLE_COLNAME_FWHMXGAUSS, XSH_RESID_TAB_TABLE_COLNAME_FWHMYGAUSS, XSH_RESID_TAB_TABLE_COLNAME_NORMGAUSS, XSH_RESID_TAB_TABLE_COLNAME_ORDER, XSH_RESID_TAB_TABLE_COLNAME_RESIDXMODEL, XSH_RESID_TAB_TABLE_COLNAME_RESIDXPOLY, XSH_RESID_TAB_TABLE_COLNAME_RESIDYMODEL, XSH_RESID_TAB_TABLE_COLNAME_RESIDYPOLY, XSH_RESID_TAB_TABLE_COLNAME_SIGMAXGAUSS, XSH_RESID_TAB_TABLE_COLNAME_SIGMAYGAUSS, XSH_RESID_TAB_TABLE_COLNAME_SLITINDEX, XSH_RESID_TAB_TABLE_COLNAME_SLITPOSITION, XSH_RESID_TAB_TABLE_COLNAME_SN, XSH_RESID_TAB_TABLE_COLNAME_WAVELENGTH, XSH_RESID_TAB_TABLE_COLNAME_XGAUSS, XSH_RESID_TAB_TABLE_COLNAME_XPOLY, XSH_RESID_TAB_TABLE_COLNAME_XTHANNEAL, XSH_RESID_TAB_TABLE_COLNAME_XTHPRE, XSH_RESID_TAB_TABLE_COLNAME_YGAUSS, XSH_RESID_TAB_TABLE_COLNAME_YPOLY, XSH_RESID_TAB_TABLE_COLNAME_YTHANNEAL, XSH_RESID_TAB_TABLE_COLNAME_YTHPRE, XSH_RESID_TAB_TABLE_NB_COL, XSH_RESID_TAB_TABLE_UNIT_FLAG, XSH_RESID_TAB_TABLE_UNIT_NORMGAUSS, XSH_RESID_TAB_TABLE_UNIT_ORDER, XSH_RESID_TAB_TABLE_UNIT_RESIDXMODEL, XSH_RESID_TAB_TABLE_UNIT_RESIDXPOLY, XSH_RESID_TAB_TABLE_UNIT_RESIDYMODEL, XSH_RESID_TAB_TABLE_UNIT_RESIDYPOLY, XSH_RESID_TAB_TABLE_UNIT_SIGMAXGAUSS, XSH_RESID_TAB_TABLE_UNIT_SIGMAYGAUSS, XSH_RESID_TAB_TABLE_UNIT_SLITINDEX, XSH_RESID_TAB_TABLE_UNIT_SLITPOSITION, XSH_RESID_TAB_TABLE_UNIT_SN, XSH_RESID_TAB_TABLE_UNIT_WAVELENGTH, XSH_RESID_TAB_TABLE_UNIT_XGAUSS, XSH_RESID_TAB_TABLE_UNIT_XPOLY, XSH_RESID_TAB_TABLE_UNIT_XTHANNEAL, XSH_RESID_TAB_TABLE_UNIT_XTHPRE, XSH_RESID_TAB_TABLE_UNIT_YGAUSS, XSH_RESID_TAB_TABLE_UNIT_YPOLY, XSH_RESID_TAB_TABLE_UNIT_YTHANNEAL, XSH_RESID_TAB_TABLE_UNIT_YTHPRE, XSH_TABLE_FREE, XSH_TABLE_NEW_COL, XSH_WAVESOLTYPE_MODEL, XSH_WAVESOLTYPE_POLYNOMIAL, xsh_resid_tab::ygauss, and xsh_resid_tab::ypoly.
Referenced by xsh_detect_arclines(), and xsh_detect_arclines_dan().