X-shooter Pipeline Reference Manual 3.8.15
Macros | Functions | Variables
Rectify Image

Macros

#define REGDEBUG_FULL   0
 
#define new_bp   1
 
#define SLIT_FRAC_STEP   50
 

Functions

cpl_frame * xsh_hdrl_remove_crh_single (cpl_frame *frm, xsh_instrument *instrument, xsh_remove_crh_single_param *crh_single_par, const char *ftag)
 
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)
 
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
 

Detailed Description

Function ...

Macro Definition Documentation

◆ new_bp

#define new_bp   1

Definition at line 71 of file xsh_rectify.c.

◆ REGDEBUG_FULL

#define REGDEBUG_FULL   0

Definition at line 48 of file xsh_hdrl_functions.c.

◆ SLIT_FRAC_STEP

#define SLIT_FRAC_STEP   50

Definition at line 78 of file xsh_rectify.c.

Function Documentation

◆ adjust_lambdas()

static void adjust_lambdas ( xsh_spectralformat_list spec_list,
xsh_rectify_param rectify_par 
)
static

◆ compute_shift_with_kw()

static double compute_shift_with_kw ( cpl_propertylist *  header,
xsh_rectify_param rectify_par,
double **  ref_ra,
double **  ref_dec,
int  flag 
)
static

◆ compute_shift_with_localization()

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.

Parameters
loc_frameLocalization of the current rectified frame
loc0_frameLocalization of the reference frame (first A frame)

Definition at line 1708 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().

◆ fill_rectified()

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.

Parameters
[in]pre_sciScience Frame (in PRE format)
[in]rec_listRectified structure pointer (to fill)
[in]idxIndex in the rec_list
[in]wavesolWave Solution structure pointer
[in]model_configmodel configuration structure
[in]instrumentinstrument arm structure
[in]disp_listdispersion structure
[in]slit_minmin slit value
[in]slit_maxmax slit value
[in]lambda_minmin lambda value
[in]skip_lowamount of points to skip on low slice
[in]skip_upamount of points to skip on up slice
[in]rectify_parrectify parameter
[in]slit_shiftshift nod position on slit

Definition at line 371 of file xsh_rectify.c.

References assure, xsh_instrument::binx, xsh_instrument::biny, check, convert_data_to_bin(), err_profile, instrument, 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().

◆ shift_with_kw()

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.

Parameters
[in]rec_frameScience Frame. The kwywords are taken from the header.
[in]instrumentInstrument structure
[in]rectify_parRectification parameters
[in]fnamefilename
[out]res_frame_extresampled frame in ESO format
[out]ref_raRA of reference frame
[out]ref_decDEG of reference frame
[in]flagflag
Returns
resampled frame in DRL frame

Definition at line 1974 of file xsh_rectify.c.

References check, compute_shift_with_kw(), instrument, 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().

◆ xsh_compute_slitlet_limits()

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

Parameters
[in]shift_setThe OFFSET_TAB frameset
[in]sdownLimit down of the slit
[in]sldownLimit down of the central slitlet
[in]slupLimit up of then central slitlet
[in]supLimit up of the slit
[in]slit_binthe slit binning use in rectify process
[in,out]slitmin_tabThe compute position of the lower limit of each slitlet
[in,out]nslit_tabThe number of bins of each slitlet
[in,out]slitcen_tabThe center of each slitlet

Definition at line 1372 of file xsh_rectify.c.

References check, XSH_ASSURE_NOT_NULL, xsh_get_shift_ref(), xsh_msg, and xsh_msg_dbg_medium.

Referenced by main(), and xsh_rectify_orders_ifu().

◆ xsh_frame_set_shiftifu_ref()

static void xsh_frame_set_shiftifu_ref ( cpl_propertylist *  header,
cpl_frame *  shift_frame 
)
static

◆ xsh_get_shift_ref()

static void xsh_get_shift_ref ( cpl_frameset *  set,
double *  down,
double *  cen,
double *  up 
)
static

◆ xsh_get_slit_edges()

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.

Parameters
[in]slitmap_frameslit map frame
[in]sdowndown SLIT trace estimate
[in]supupp SLIT trace estimate
[in]sldowndown IFU slice estimate
[in]slupdown IFU slice estimate
[in]instrumentinstrument arm setting

Definition at line 671 of file xsh_rectify.c.

References check, instrument, 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().

◆ xsh_hdrl_remove_crh_single()

cpl_frame * xsh_hdrl_remove_crh_single ( cpl_frame *  frm,
xsh_instrument instrument,
xsh_remove_crh_single_param crh_single_par,
const char *  ftag 
)

◆ xsh_rec_list_rectify()

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

◆ xsh_rec_slit_size()

void xsh_rec_slit_size ( xsh_rectify_param rectify_par,
double *  slit_min,
int *  nslit,
XSH_MODE  mode 
)

rectify frame

Parameters
[in]rectify_parparameters structure to control rectification
[out]slit_minmin slit value
[out]nslitnumber of slit sampling points
[in]modemode to control if we are in slit mode

Definition at line 758 of file xsh_rectify.c.

References MAX_SLIT, MIN_SLIT, mode, 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().

◆ xsh_rectify()

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.

Parameters
sci_frameThe 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_parParameters for rectification
spectralformat_frameThe frame for the spectral format
disp_tab_frameThe dispersion table frame (for flux conservation)
res_nameThe file name of the resampled frame
res_frame_extThe resampled frame in ESO format
res_frame_tabA table associated to the resampled frame
rec_prefixThe recipe prefix (to build proper products PRO.CATG)
Returns
Rectified frame

Definition at line 867 of file xsh_rectify.c.

References check, instrument, 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().

◆ xsh_rectify_and_shift()

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.

Parameters
sci_frameScience Frame (PRE format)
orderlist_frameOrder table
wavesol_frameWave table (can be NULL)
model_frameModel Frame (can be NULL)
instrumentInstrument structure
rectify_parRectify parameters
spectralformat_frameSpectral format table frame
loc_frameLocalization of this frame
loc0_frameLocalization of the reference frame (first A frame)
throw_shiftshift in nod throw
disp_tab_frameDispersion table
res_nameResult frame name
res_frame_extExt result frame
res_frame_tabExt result frame table
Returns
The rectified (and shifted) frame

Definition at line 928 of file xsh_rectify.c.

References check, compute_shift_with_localization(), instrument, 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().

◆ xsh_rectify_ifu()

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 
)

◆ xsh_rectify_orders()

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.

Parameters
sci_frameThe input Science frame after sky subtaraction
orderlistThe input Order Table Frame
wavesol_frame
The input Wavesolution frame
model_frame
The input model frame
instrument
Pointer to instrument description structure
rectify_parParameters for rectification
spectralformat_framespectral format table
disp_tab_framedisp tab frame
res_nameresampled frame filename
tagresampled frame tag
res_frame_extresampled frame in ESO format
res_frame_tabresampled frame in ESO format table
min_indexmin index
max_indexmax index
slit_minslit min
nslitnumber of slit sampling points
slit_shiftshift of nod position on slit
Returns
Rectified frame

Definition at line 1079 of file xsh_rectify.c.

References xsh_spectralformat::absorder, adjust_lambdas(), assure, check, xsh_rectify_param::conserve_flux, xsh_pre::data, xsh_pre::data_header, xsh_instrument::decode_bp, fill_rectified(), xsh_rec_list::header, instrument, 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_pre::qual, 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_free_mask(), 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_qual_to_cpl_mask(), 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().

◆ 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.

Parameters
[in]sci_frameScience frame after sky subtaraction
[in]orderlistOrder traces structure
[in]wavesol_framesetInput Wavesolution frameset (containing the 3 slitlet wave solution: DOWN, CEN, UP)
[in]model_framephysical model cfg table frame
[in]instrumentPointer to instrument description structure
[in]rectify_parParameters for rectification
[in]spectralformat_frameThe frame for the spectral format
[in]sliceoffset_frameframe with measured offsets of each IFU slices
[in]slitmap_frameThe SLIT MAP Image Frame
[out]res_frameset_extresampled frame in ESO format
[out]res_frameset_tabresampled frame in ESO format (tab)
[in]min_indexmin index
[in]max_indexmax index
[in]rec_prefixrecipe prefix (for proper PRO.CATG values)
Returns
Rectified frame

Definition at line 1514 of file xsh_rectify.c.

References CENTER_IFU_SLITLET, check, instrument, 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 xsh_rectify_ifu().

◆ xsh_shift()

static cpl_frame * xsh_shift ( cpl_frame *  rec_frame,
xsh_instrument instrument,
const char *  fname,
double  slit_shift,
cpl_frame **  res_frame_ext 
)
static

◆ xsh_shift_rectified()

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.

Parameters
[in]rec_frameInput rectified frame to be shifted
[in]loc_frameLocalization frame used (or not) for shifting
[in]loc0_frameLocalization of reference frame used (or not) for shifting
[in]combine_nod_paramParameters
[in]rectif_parrectify parameters
[in]instrumentInstrument structure
[out]res_frame_extresampled frame in ESO format
Returns
The shifted frame

Definition at line 2108 of file xsh_rectify.c.

References check, instrument, shift_with_kw(), XSH_ASSURE_NOT_NULL, and xsh_msg.

Variable Documentation

◆ err_profile

cpl_vector* err_profile = NULL
static

Definition at line 81 of file xsh_rectify.c.

Referenced by fill_rectified().

◆ rec_profile

cpl_vector* rec_profile = NULL
static