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 | xsh_frame_set_shiftifu_ref (cpl_propertylist *header, cpl_frame *shift_frame) |
static void | xsh_rec_list_rectify (xsh_rec_list *rec_list, int iorder, int irec, xsh_pre *sci_pre, cpl_image *var_img, double fx, double fy, double radius, cpl_vector *profile, cpl_vector *profile2, double mult) |
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, cpl_frame *slit_shiftab_frame) |
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_frameset *shiftifu_frameset, cpl_frame *model_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, cpl_frame *spectralformat_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, cpl_frame *slitshift_tab) |
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. | |
static void | xsh_get_shift_ref (cpl_frameset *set, double *down, double *cen, double *up) |
void | xsh_compute_slitlet_limits (cpl_frameset *shift_set, double sdown, double sldown, double slup, double sup, double slit_bin, double *slitmin_tab, int *nslit_tab, double *slitcen_tab) |
cpl_frameset * | xsh_rectify_orders_ifu (cpl_frame *sci_frame, xsh_order_list *orderlist, cpl_frameset *wavesol_frameset, cpl_frameset *shift_frameset, cpl_frame *model_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, cpl_frame *spectralformat_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) |
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 |
static cpl_vector * | err_profile = NULL |
Function ...
#define SLIT_FRAC_STEP 50 |
Definition at line 77 of file xsh_rectify.c.
static void adjust_lambdas | ( | xsh_spectralformat_list * | spec_list, | |
xsh_rectify_param * | rectify_par | |||
) | [static] |
Definition at line 724 of file xsh_rectify.c.
References xsh_spectralformat::lambda_max, xsh_spectralformat::lambda_min, xsh_spectralformat_list::list, xsh_rectify_param::rectif_bin_lambda, xsh_spectralformat_list::size, step, and xsh_msg_dbg_high.
Referenced by xsh_rectify_orders().
static double compute_shift_with_kw | ( | cpl_propertylist * | header, | |
xsh_rectify_param * | rectify_par, | |||
double ** | ref_ra, | |||
double ** | ref_dec, | |||
int | flag | |||
) | [static] |
Definition at line 1810 of file xsh_rectify.c.
References check, M_PI, XSH_ASSURE_NOT_NULL, XSH_MALLOC, xsh_msg, xsh_msg_dbg_high, xsh_pfits_get_b_dec_cumoffset(), xsh_pfits_get_b_dec_reloffset(), xsh_pfits_get_b_ra_cumoffset(), xsh_pfits_get_b_ra_reloffset(), xsh_pfits_get_dec_cumoffset(), xsh_pfits_get_posang(), and xsh_pfits_get_ra_cumoffset().
Referenced by shift_with_kw().
static double compute_shift_with_localization | ( | cpl_frame * | loc_frame, | |
cpl_frame * | loc0_frame | |||
) | [static] |
This function creates a structure containing for each order the shift to be applied.
loc_frame | Localization of the current rectified frame | |
loc0_frame | Localization of the reference frame (first A frame) |
Definition at line 1632 of file xsh_rectify.c.
References xsh_localization::cenpoly, check, XSH_ASSURE_NOT_NULL, xsh_localization_free(), xsh_localization_load(), xsh_msg, and xsh_msg_dbg_medium.
Referenced by xsh_rectify_and_shift().
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, | |||
cpl_frame * | slit_shiftab_frame | |||
) | [static] |
Fill the rectified structure for one order with the corresponding flux, using the wavelength solution.
[in] | pre_sci | Science Frame (in PRE format) |
[in] | rec_list | Rectified structure pointer (to fill) |
[in] | idx | Index in the rec_list |
[in] | wavesol | Wave Solution structure pointer |
[in] | model_config | model configuration structure |
[in] | instrument | instrument arm structure |
[in] | disp_list | dispersion structure |
[in] | slit_min | min slit value |
[in] | slit_max | max slit value |
[in] | lambda_min | min lambda value |
[in] | skip_low | amount of points to skip on low slice |
[in] | skip_up | amount of points to skip on up slice |
[in] | rectify_par | rectify parameter |
[in] | slit_shift | shift nod position on slit |
Definition at line 307 of file xsh_rectify.c.
References assure, xsh_instrument::binx, xsh_instrument::biny, check, convert_data_to_bin(), err_profile, xsh_rectify_param::kernel_type, xsh_rec::lambda, xsh_dispersol::lambda_poly, xsh_dispersol_list::list, xsh_rec_list::list, order, rec_profile, xsh_rectify_param::rectif_bin_lambda, xsh_rectify_param::rectif_bin_space, xsh_rectify_param::rectif_radius, xsh_rec::slit, xsh_dispersol::slit_poly, XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_data_interpolate(), xsh_debug_level_get(), XSH_DEBUG_LEVEL_MEDIUM, XSH_FREE, xsh_free_image(), xsh_free_polynomial(), xsh_free_vector(), xsh_model_get_xy(), xsh_msg_dbg_low, xsh_pre_get_errs(), xsh_rec_list_get_lambda(), xsh_rec_list_get_nlambda(), xsh_rec_list_get_nslit(), xsh_rec_list_get_order(), xsh_rec_list_get_slit(), xsh_rec_list_rectify(), XSH_SHIFTIFU_COLNAME_SHIFTSLIT, XSH_SHIFTIFU_COLNAME_WAVELENGTH, XSH_TABLE_FREE, XSH_TABLE_LOAD, xsh_wavesol_eval_polx(), and xsh_wavesol_eval_poly().
Referenced by xsh_rectify_orders().
static float get_step_slit | ( | float * | slit, | |
int | nslit | |||
) | [static] |
Definition at line 752 of file xsh_rectify.c.
References xsh_msg.
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.
[in] | rec_frame | Science Frame. The kwywords are taken from the header. |
[in] | instrument | Instrument structure |
[in] | rectify_par | Rectification parameters |
[in] | fname | filename |
[out] | res_frame_ext | resampled frame in ESO format |
[out] | ref_ra | RA of reference frame |
[out] | ref_dec | DEG of reference frame |
[in] | flag | flag |
Definition at line 1897 of file xsh_rectify.c.
References check, compute_shift_with_kw(), XSH_ASSURE_NOT_NULL, xsh_free_frame(), xsh_free_propertylist(), xsh_msg, xsh_pfits_get_rectify_bin_space(), xsh_round_double(), and xsh_shift().
Referenced by main(), xsh_nod_rectify_and_shift_with_key(), and xsh_shift_rectified().
void xsh_compute_slitlet_limits | ( | cpl_frameset * | shift_set, | |
double | sdown, | |||
double | sldown, | |||
double | slup, | |||
double | sup, | |||
double | slit_bin, | |||
double * | slitmin_tab, | |||
int * | nslit_tab, | |||
double * | slitcen_tab | |||
) |
Computes with the OFFSET_TAB frameset the slitlet limits in order to build the IFU cube
[in] | shift_set | The OFFSET_TAB frameset |
[in] | sdown | Limit down of the slit |
[in] | sldown | Limit down of the central slitlet |
[in] | slup | Limit up of then central slitlet |
[in] | sup | Limit up of the slit |
[in] | slit_bin | the slit binning use in rectify process |
[in,out] | slitmin_tab | The compute position of the lower limit of each slitlet |
[in,out] | nslit_tab | The number of bins of each slitlet |
[in,out] | slitcen_tab | The center of each slitlet |
Definition at line 1296 of file xsh_rectify.c.
References check, XSH_ASSURE_NOT_NULL, xsh_get_shift_ref(), xsh_msg, and xsh_msg_dbg_medium.
Referenced by xsh_rectify_orders_ifu().
static void xsh_frame_set_shiftifu_ref | ( | cpl_propertylist * | header, | |
cpl_frame * | shift_frame | |||
) | [static] |
Definition at line 1256 of file xsh_rectify.c.
References check, XSH_ASSURE_NOT_NULL, xsh_free_propertylist(), xsh_pfits_get_shiftifu_lambdaref(), xsh_pfits_get_shiftifu_slitref(), xsh_pfits_set_shiftifu_lambdaref(), and xsh_pfits_set_shiftifu_slitref().
Referenced by xsh_rectify_orders().
static void xsh_get_shift_ref | ( | cpl_frameset * | set, | |
double * | down, | |||
double * | cen, | |||
double * | up | |||
) | [static] |
Definition at line 1215 of file xsh_rectify.c.
References check, XSH_ASSURE_NOT_NULL, xsh_free_propertylist(), and xsh_pfits_get_shiftifu_slitref().
Referenced by xsh_compute_slitlet_limits().
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.
[in] | slitmap_frame | slit map frame |
[in] | sdown | down SLIT trace estimate |
[in] | sup | upp SLIT trace estimate |
[in] | sldown | down IFU slice estimate |
[in] | slup | down IFU slice estimate |
[in] | instrument | instrument arm setting |
Definition at line 607 of file xsh_rectify.c.
References check, MAX_SLIT, MIN_SLIT, SLITLET_CEN_CENTER, XSH_ASSURE_NOT_NULL, xsh_error_reset, xsh_free_propertylist(), xsh_instrument_get_mode(), XSH_MODE_IFU, xsh_msg, xsh_msg_warning, xsh_pfits_get_slitmap_median_edglo(), xsh_pfits_get_slitmap_median_edgup(), xsh_pfits_get_slitmap_median_sliclo(), and xsh_pfits_get_slitmap_median_slicup().
Referenced by main(), xsh_compute_slice_dist(), xsh_follow_arclines_ifu(), xsh_opt_extract_orders(), and xsh_rectify_orders_ifu().
static void xsh_rec_list_rectify | ( | xsh_rec_list * | rec_list, | |
int | iorder, | |||
int | irec, | |||
xsh_pre * | sci_pre, | |||
cpl_image * | var_img, | |||
double | fx, | |||
double | fy, | |||
double | radius, | |||
cpl_vector * | profile, | |||
cpl_vector * | profile2, | |||
double | mult | |||
) | [static] |
Definition at line 164 of file xsh_rectify.c.
References check, nx, ny, QFLAG_MISSING_DATA, QFLAG_OUTSIDE_DATA_RANGE, XSH_ASSURE_NOT_NULL, xsh_msg_dbg_high, xsh_pre_get_data(), xsh_pre_get_errs(), xsh_pre_get_nx(), xsh_pre_get_ny(), xsh_pre_get_qual(), xsh_rec_list_get_data1(), xsh_rec_list_get_errs1(), and xsh_rec_list_get_qual1().
Referenced by fill_rectified().
void xsh_rec_slit_size | ( | xsh_rectify_param * | rectify_par, | |
double * | slit_min, | |||
int * | nslit, | |||
XSH_MODE | mode | |||
) |
rectify frame
[in] | rectify_par | parameters structure to control rectification |
[out] | slit_min | min slit value |
[out] | nslit | number of slit sampling points |
[in] | mode | mode to control if we are in slit mode |
Definition at line 694 of file xsh_rectify.c.
References MAX_SLIT, MIN_SLIT, xsh_rectify_param::rectif_bin_space, xsh_rectify_param::rectify_full_slit, slit_step, XSH_ASSURE_NOT_NULL, XSH_MODE_SLIT, xsh_msg, and xsh_msg_warning.
Referenced by main(), xsh_rectify(), and xsh_rectify_and_shift().
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.
sci_frame | The input Science frame after sky subtaraction | |
orderlist_frame | The input Order Table Frame | |
wavesol_frame | The input Wavesolution frame | |
model_frame | The input model frame | |
instrument | Pointer to instrument description structure | |
rectify_par | Parameters for rectification | |
spectralformat_frame | The frame for the spectral format | |
disp_tab_frame | The dispersion table frame (for flux conservation) | |
res_name | The file name of the resampled frame | |
res_frame_ext | The resampled frame in ESO format | |
res_frame_tab | A table associated to the resampled frame | |
rec_prefix | The recipe prefix (to build proper products PRO.CATG) |
Definition at line 802 of file xsh_rectify.c.
References check, XSH_ASSURE_NOT_NULL, XSH_GET_TAG_FROM_ARM, XSH_MODE_SLIT, XSH_ORDER2D, xsh_order_list_free(), xsh_order_list_load(), xsh_rec_slit_size(), and xsh_rectify_orders().
Referenced by xsh_absorp(), xsh_nod_rectify_and_shift_with_key(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), xsh_scired_slit_nod_accurate(), xsh_scired_slit_offset(), xsh_scired_slit_stare(), and xsh_slit_stare_correct_crh_and_sky().
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 | |||
) |
This function rectify AND shift the input frame. The shift is calculated for each order and later used in the fill_rectify function.
sci_frame | Science Frame (PRE format) | |
orderlist_frame | Order table | |
wavesol_frame | Wave table (can be NULL) | |
model_frame | Model Frame (can be NULL) | |
instrument | Instrument structure | |
rectify_par | Rectify parameters | |
spectralformat_frame | Spectral format table frame | |
loc_frame | Localization of this frame | |
loc0_frame | Localization of the reference frame (first A frame) | |
throw_shift | shift in nod throw | |
disp_tab_frame | Dispersion table | |
res_name | Result frame name | |
res_frame_ext | Ext result frame | |
res_frame_tab | Ext result frame table |
Definition at line 863 of file xsh_rectify.c.
References check, compute_shift_with_localization(), xsh_rectify_param::rectif_bin_space, XSH_ASSURE_NOT_NULL, xsh_free_frame(), xsh_free_propertylist(), XSH_GET_TAG_FROM_ARM, XSH_MODE_SLIT, xsh_msg, XSH_ORDER2D, xsh_order_list_free(), xsh_order_list_load(), xsh_rec_slit_size(), xsh_rectify_orders(), xsh_round_double(), and xsh_shift().
Referenced by xsh_scired_slit_nod_accurate().
cpl_frameset* xsh_rectify_ifu | ( | cpl_frame * | sci_frame, | |
cpl_frame * | orderlist_frame, | |||
cpl_frameset * | wavesol_frameset, | |||
cpl_frameset * | shiftifu_frameset, | |||
cpl_frame * | model_frame, | |||
xsh_instrument * | instrument, | |||
xsh_rectify_param * | rectify_par, | |||
cpl_frame * | spectralformat_frame, | |||
cpl_frame * | slitmap_frame, | |||
cpl_frameset ** | rec_frameset_ext, | |||
cpl_frameset ** | rec_frameset_tab, | |||
const char * | rec_prefix | |||
) |
Definition at line 949 of file xsh_rectify.c.
References check, XSH_ASSURE_NOT_NULL, xsh_order_list_free(), xsh_order_list_load(), xsh_rectify_orders_ifu(), and XSH_REGDEBUG.
Referenced by xsh_geom_ifu().
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, | |||
cpl_frame * | slitshift_tab | |||
) |
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.
sci_frame | The input Science frame after sky subtaraction | |
orderlist | The input Order Table Frame | |
wavesol_frame | The input Wavesolution frame | |
model_frame | The input model frame | |
instrument | Pointer to instrument description structure | |
rectify_par | Parameters for rectification | |
spectralformat_frame | spectral format table | |
disp_tab_frame | disp tab frame | |
res_name | resampled frame filename | |
tag | resampled frame tag | |
res_frame_ext | resampled frame in ESO format | |
res_frame_tab | resampled frame in ESO format table | |
min_index | min index | |
max_index | max index | |
slit_min | slit min | |
nslit | number of slit sampling points | |
slit_shift | shift of nod position on slit |
Definition at line 1014 of file xsh_rectify.c.
References xsh_spectralformat::absorder, adjust_lambdas(), assure, check, xsh_rectify_param::conserve_flux, xsh_pre::data_header, fill_rectified(), xsh_rec_list::header, xsh_spectralformat::lambda_max, xsh_spectralformat::lambda_min, xsh_rec_list::list, xsh_spectralformat_list::list, n, xsh_rec::nlambda, xsh_rec::nslit, xsh_rec_list::nslit, order, xsh_rectify_param::rectif_bin_lambda, xsh_rectify_param::rectif_bin_space, xsh_rectify_param::rectif_kernel, xsh_rectify_param::rectif_radius, xsh_rec_list::size, size, xsh_rec::slit, xsh_rec_list::slit_max, xsh_rec_list::slit_min, xsh_add_temporary_file(), XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, xsh_baryvel(), xsh_dispersol_list_free(), xsh_dispersol_list_load(), xsh_error_msg, xsh_frame_set_shiftifu_ref(), xsh_instrument_arm_tostring(), xsh_model_config_load_best(), xsh_model_temperature_update_frame(), xsh_msg, xsh_msg_dbg_high, xsh_msg_dbg_medium, xsh_pre_free(), xsh_pre_load(), XSH_QC_VRAD_BARYCOR, XSH_QC_VRAD_BARYCOR_C, XSH_QC_VRAD_HELICOR, XSH_QC_VRAD_HELICOR_C, xsh_rec_list_create(), xsh_rec_list_free(), xsh_rec_list_save(), xsh_rec_list_save2(), xsh_rec_list_save_table(), xsh_rec_list_set_data_size(), xsh_rec_list_update_header(), XSH_RECTIFY_TYPE_MODEL, XSH_RECTIFY_TYPE_POLY, xsh_round_double(), xsh_spectralformat_list_free(), xsh_spectralformat_list_load(), xsh_wavesol_free(), and xsh_wavesol_load().
Referenced by main(), xsh_rectify(), xsh_rectify_and_shift(), and xsh_rectify_orders_ifu().
cpl_frameset* xsh_rectify_orders_ifu | ( | cpl_frame * | sci_frame, | |
xsh_order_list * | orderlist, | |||
cpl_frameset * | wavesol_frameset, | |||
cpl_frameset * | shift_frameset, | |||
cpl_frame * | model_frame, | |||
xsh_instrument * | instrument, | |||
xsh_rectify_param * | rectify_par, | |||
cpl_frame * | spectralformat_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 | |||
) |
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.
[in] | sci_frame | Science frame after sky subtaraction |
[in] | orderlist | Order traces structure |
[in] | wavesol_frameset | Input Wavesolution frameset (containing the 3 slitlet wave solution: DOWN, CEN, UP) |
[in] | model_frame | physical model cfg table frame |
[in] | instrument | Pointer to instrument description structure |
[in] | rectify_par | Parameters for rectification |
[in] | spectralformat_frame | The frame for the spectral format |
[in] | sliceoffset_frame | frame with measured offsets of each IFU slices |
[in] | slitmap_frame | The SLIT MAP Image Frame |
[out] | res_frameset_ext | resampled frame in ESO format |
[out] | res_frameset_tab | resampled frame in ESO format (tab) |
[in] | min_index | min index |
[in] | max_index | max index |
[in] | rec_prefix | recipe prefix (for proper PRO.CATG values) |
Definition at line 1438 of file xsh_rectify.c.
References CENTER_IFU_SLITLET, check, LOWER_IFU_SLITLET, xsh_rectify_param::rectif_bin_space, UPPER_IFU_SLITLET, XSH_ASSURE_NOT_NULL, XSH_CMP_INT, xsh_compute_slitlet_limits(), xsh_get_slit_edges(), XSH_GET_TAG_FROM_ARM, xsh_msg, and xsh_rectify_orders().
Referenced by main(), and xsh_rectify_ifu().
static cpl_frame * xsh_shift | ( | cpl_frame * | rec_frame, | |
xsh_instrument * | instrument, | |||
const char * | fname, | |||
double | slit_shift, | |||
cpl_frame ** | res_frame_ext | |||
) | [static] |
Definition at line 1950 of file xsh_rectify.c.
References check, xsh_rec_list::header, order, xsh_rec_list::size, xsh_rec_list::slit_max, xsh_rec_list::slit_min, xsh_add_temporary_file(), XSH_ASSURE_NOT_NULL, XSH_FREE, xsh_free_frame(), xsh_pfits_set_rectify_space_max(), xsh_pfits_set_rectify_space_min(), xsh_rec_list_free(), xsh_rec_list_get_nslit(), xsh_rec_list_get_slit(), xsh_rec_list_load(), xsh_rec_list_save(), xsh_rec_list_save2(), and xsh_stringcat_any().
Referenced by shift_with_kw(), and xsh_rectify_and_shift().
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 | |||
) |
This function is used to shift a rectified frame to the position of the first frame (nodding observation). The shift is calculated either by using the localization table of the current and the first frame, or by using the NODTHROW, RELOFFSET and CUMOFFSET Keywords available in the header of the rectified frame.
[in] | rec_frame | Input rectified frame to be shifted |
[in] | loc_frame | Localization frame used (or not) for shifting |
[in] | loc0_frame | Localization of reference frame used (or not) for shifting |
[in] | combine_nod_param | Parameters |
[in] | rectif_par | rectify parameters |
[in] | instrument | Instrument structure |
[out] | res_frame_ext | resampled frame in ESO format |
Definition at line 2030 of file xsh_rectify.c.
References check, shift_with_kw(), XSH_ASSURE_NOT_NULL, and xsh_msg.
cpl_vector* err_profile = NULL [static] |
Definition at line 80 of file xsh_rectify.c.
Referenced by fill_rectified().
cpl_vector* rec_profile = NULL [static] |
Definition at line 79 of file xsh_rectify.c.
Referenced by fill_rectified(), xsh_efficiency_compute(), xsh_util_efficiency(), and xsh_util_efficiency2d().