#include <math.h>
#include <xsh_drl.h>
#include <xsh_data_pre.h>
#include <xsh_dfs.h>
#include <xsh_pfits.h>
#include <xsh_error.h>
#include <xsh_msg.h>
#include <xsh_utils_wrappers.h>
#include <xsh_badpixelmap.h>
#include <xsh_data_order.h>
#include <xsh_data_the_map.h>
#include <xsh_data_arclist.h>
#include <xsh_data_wavesol.h>
#include <xsh_data_wavemap.h>
#include <xsh_data_resid_tab.h>
#include <xsh_data_linetilt.h>
#include <xsh_utils.h>
#include <xsh_ifu_defs.h>
#include <xsh_model_io.h>
#include <xsh_model_kernel.h>
#include <xsh_model_utils.h>
#include <xsh_data_spectralformat.h>
#include <xsh_data_shift_tab.h>
#include <xsh_data_dispersol.h>
Go to the source code of this file.
Data Structures | |
struct | CENTROIDS |
Defines | |
#define | XSH_SPECRES_CLIP_KAPPA 3. |
#define | XSH_SPECRES_CLIP_NITER 2 |
#define | XSH_SPECRES_CLIP_FRAC 0.5 |
Enumerations | |
enum | { LAMBDA_FOUND, LAMBDA_TOO_SMALL, LAMBDA_NOT_FOUND } |
enum | { FIND_TILT_UNKNOW_ORDER = 1, FIND_TILT_BAD_EDGES, FIND_TILT_BAD_CENTER, FIND_TILT_CLIPPED, FIND_TILT_BAD_FIT } |
Functions | |
static int | detect_centroid (xsh_pre *pre, float lambda, int ordnum, double xpix, double ypix, xsh_follow_arclines_param *follow_param, int is_center, XSH_GAUSSIAN_FIT *fit_res) |
static cpl_polynomial * | get_slit_ifu_lo_poly (xsh_order *porder, int ifu_flag) |
static cpl_polynomial * | get_slit_ifu_up_poly (xsh_order *porder, int ifu_flag) |
static int | find_tilt (double yp0, double xc, float lambda, int ordnum, xsh_follow_arclines_param *follow_param, xsh_pre *pre, xsh_order_list *orders, xsh_instrument *instrument, double *slope, double *chisq, double *minx, double *maxx, int *nt, int *ng, double *fwhm_center, double *good_center, int ifu_flag) |
static float | linear_interpol (float xa, float ya, float xb, float yb, float x) |
static float | get_lambda (float *data, float x, float y, int nx, int ny) |
static void | compute_specres (cpl_frame *wavemap_frame, cpl_frame *disptab_frame, xsh_instrument *instr, xsh_linetilt_list *tilt_list, int niter, double kappa, double frac, double *specres_med, double *specres_stdev) |
static void | set_qc_parameters (cpl_propertylist *tilt_header, cpl_propertylist *shift_header, double *ypos, double *width, double *intens, xsh_linetilt_list *tilt_list, xsh_instrument *instrument, int nlinecat, int nb_lines, double specres_med, double specres_stdev) |
static void | clean_arclist_data (cpl_frame *wavesol_frame, cpl_frame *arclines_frame, xsh_order_list *orders, cpl_frame *config_model_frame, cpl_frame *pre_frame, cpl_frame *spectralformat_frame, double **lambda, double **n, double **x, double **y, double **xmin, double **xmax, int *size, double slit, double slit_min, double slit_max, xsh_instrument *instrument) |
static void | xsh_follow_arclines (cpl_frame *pre_frame, cpl_frame *arclines_frame, cpl_frame *wavesol_frame, cpl_frame *order_frame, cpl_frame *spectralformat_frame, cpl_frame *config_model_frame, cpl_frame *wavemap_frame, cpl_frame *disptab_frame, xsh_follow_arclines_param *follow_param, double slit, double slit_min, double slit_max, const char *tag_id, int ifu_flag, xsh_instrument *instrument, cpl_frame **tilt_frame, cpl_frame **shift_frame, const int clean_tmp) |
Detect and follow arc lines. Computes center, width and tilt parameters. The position of the center of each line is computed using the wavesol table, with arguments: lambda, order and slit. lambda is taken from the arclines table, order and slit is taken from the theoretical table. | |
void | xsh_follow_arclines_slit (cpl_frame *pre_frame, cpl_frame *arclines_frame, cpl_frame *wavesol_frame, cpl_frame *order_frame, cpl_frame *spectralformat_frame, cpl_frame *config_model_frame, cpl_frame *wavemap_frame, cpl_frame *slitmap_frame, cpl_frame *disptab_frame, xsh_follow_arclines_param *follow_param, xsh_instrument *instrument, cpl_frame **tilt_frame, cpl_frame **shift_frame) |
void | xsh_follow_arclines_ifu (cpl_frame *pre_frame, cpl_frame *arclines_frame, cpl_frame *wavesol_frame, cpl_frame *order_frame, cpl_frame *spectralformat_frame, cpl_frame *config_model_frame, cpl_frame *wavemap_frame, cpl_frame *slitmap_frame, cpl_frame *disptab_frame, xsh_follow_arclines_param *follow_param, xsh_instrument *instrument, cpl_frameset *tilt_set, cpl_frame **shift_frame) |
Detect and follow arc lines. Computes center, width and tilt parameters. The position of the center of each line is computed using the wavesol table, with arguments: lambda, order and slit. lambda is taken from the arclines table, order and slit is taken from the theoretical table. | |
Variables | |
static const char * | fwhm_debug_mode = NULL |