#include <math.h>
#include <xsh_drl.h>
#include <xsh_baryvel.h>
#include <xsh_badpixelmap.h>
#include <xsh_data_rec.h>
#include <xsh_data_localization.h>
#include <xsh_data_pre.h>
#include <xsh_data_order.h>
#include <xsh_data_wavesol.h>
#include <xsh_data_spectralformat.h>
#include <xsh_dfs.h>
#include <xsh_pfits.h>
#include <xsh_error.h>
#include <xsh_msg.h>
#include <xsh_fit.h>
#include <xsh_model_io.h>
#include <xsh_model_kernel.h>
#include <xsh_ifu_defs.h>
#include <xsh_data_dispersol.h>
#include <xsh_data_slice_offset.h>
#include <cpl.h>
#include <xsh_utils.h>
#include <xsh_rectify.h>
#include <xsh_model_utils.h>
Go to the source code of this file.
Defines | |
#define | SLIT_FRAC_STEP 50 |
Functions | |
static double | compute_shift_with_localization (cpl_frame *loc_frame, cpl_frame *loc0_frame) |
static double | compute_shift_with_kw (cpl_propertylist *header, xsh_rectify_param *rectify_par, double **ref_ra, double **ref_dec, int flag) |
static cpl_frame * | xsh_shift (cpl_frame *rec_frame, xsh_instrument *instrument, const char *fname, double slit_shift, cpl_frame **res_frame_ext) |
static void | get_errors (float *err, int ix, int iy, int nx, int ny, double radius, float *err_val, int *qual_val) |
static void | xsh_rec_list_rectify (xsh_rec_list *rec_list, int iorder, int irec, xsh_pre *sci_pre, double fx, double fy, double radius, cpl_vector *profile, double mult, int *good, int *bad, int *out) |
static void | fill_rectified (xsh_pre *pre_sci, xsh_rec_list *rec_list, int idx, xsh_wavesol *wavesol, xsh_xs_3 *model_config, xsh_instrument *instrument, xsh_dispersol_list *disp_list, float slit_min, float slit_max, double lambda_min, int skip_low, int skip_up, xsh_rectify_param *rectify_par, double slit_shift) |
Fill the rectified structure for one order with the corresponding flux, using the wavelength solution. | |
void | xsh_get_slit_edges (cpl_frame *slitmap_frame, double *sdown, double *sup, double *sldown, double *slup, xsh_instrument *instrument) |
Trace slit edges in a master flat. | |
void | xsh_rec_slit_size (xsh_rectify_param *rectify_par, double *slit_min, int *nslit, XSH_MODE mode) |
rectify frame | |
static void | adjust_lambdas (xsh_spectralformat_list *spec_list, xsh_rectify_param *rectify_par) |
static float | get_step_slit (float *slit, int nslit) |
cpl_frame * | xsh_rectify (cpl_frame *sci_frame, cpl_frame *orderlist_frame, cpl_frame *wavesol_frame, cpl_frame *model_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, cpl_frame *spectralformat_frame, cpl_frame *disp_tab_frame, const char *res_name, cpl_frame **res_frame_ext, cpl_frame **res_frame_tab, const char *rec_prefix) |
Create a grid in wavelength with the step in lambda and slit. Steps are defined in the parameters. Lambda min and max are taken from the spectralformat list. Slit min/max are hard coded. | |
cpl_frame * | xsh_rectify_and_shift (cpl_frame *sci_frame, cpl_frame *orderlist_frame, cpl_frame *wavesol_frame, cpl_frame *model_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, cpl_frame *spectralformat_frame, cpl_frame *loc_frame, cpl_frame *loc0_frame, double *throw_shift, cpl_frame *disp_tab_frame, const char *res_name, cpl_frame **res_frame_ext, cpl_frame **res_frame_tab) |
cpl_frameset * | xsh_rectify_ifu (cpl_frame *sci_frame, cpl_frame *orderlist_frame, cpl_frameset *wavesol_frameset, cpl_frame *model_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, cpl_frame *spectralformat_frame, cpl_frame *slice_offset_frame, cpl_frame *slitmap_frame, cpl_frameset **rec_frameset_ext, cpl_frameset **rec_frameset_tab, const char *rec_prefix) |
cpl_frame * | xsh_rectify_orders (cpl_frame *sci_frame, xsh_order_list *orderlist, cpl_frame *wavesol_frame, cpl_frame *model_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, cpl_frame *spectralformat_frame, cpl_frame *disp_tab_frame, const char *res_name, const char *tag, cpl_frame **res_frame_ext, cpl_frame **res_frame_tab, int min_index, int max_index, double slit_min, int nslit, double slit_shift) |
Create a grid in wavelength with the step in lambda and slit. Steps are defined in the parameters. Lambda min and max are taken from the spectralformat list. Slit min/max are hard coded. Range orders arve given. | |
cpl_frameset * | xsh_rectify_orders_ifu (cpl_frame *sci_frame, xsh_order_list *orderlist, cpl_frameset *wavesol_frameset, cpl_frame *model_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, cpl_frame *spectralformat_frame, cpl_frame *sliceoffset_frame, cpl_frame *slitmap_frame, cpl_frameset **res_frameset_ext, cpl_frameset **res_frameset_tab, int min_index, int max_index, const char *rec_prefix) |
static cpl_frame * | shift_with_localization (cpl_frame *rec_frame, cpl_frame *loc_frame, cpl_frame *loc0_frame, xsh_instrument *instrument, const char *fname, cpl_frame **res_frame_ext) |
cpl_frame * | shift_with_kw (cpl_frame *rec_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, const char *fname, cpl_frame **res_frame_ext, double **ref_ra, double **ref_dec, int flag) |
This function creates a structure containing for each order the shift to be applied. | |
cpl_frame * | xsh_shift_rectified (cpl_frame *rec_frame, cpl_frame *loc_frame, cpl_frame *loc0_frame, const char *file_name, xsh_combine_nod_param *combine_nod_param, xsh_rectify_param *rectif_par, xsh_instrument *instrument, cpl_frame **res_frame_ext) |
Variables | |
static cpl_vector * | rec_profile = NULL |