/home/amodigli/releases/xsh/1.2.10/pso/xsh.26608/xshp/xsh/xsh_utils_ifu.h File Reference

#include <cpl.h>
#include <xsh_parameters.h>

Go to the source code of this file.

Functions

void xsh_edge_check (const int px, const int nx, const int rad_x, int *llx, int *urx)
 check edge values (llx,urx) fit in image size (1,nx)
void xsh_convert_xy_to_ws (double x_centroid, double *p_obj_cen, double *p_slit, double *p_wave, const int lly, const int nx, const int row, double *p_obj_cen_s, double *p_obj_cen_w)
 convert X-Y coordinates to Wavelengt Slit space
cpl_error_code xsh_table_edges_swap_low_upp (cpl_table **tab)
 swap lower and upper edge columns
cpl_table * xsh_table_edge_prepare (const char *name)
 Add to edges table columns to store LOW/CEN/UPP object positions.
cpl_error_code xsh_ifu_trace_object_calibrate (const char *ifu_object_ff_name, const char *order_tab_edges_ifu_name, const char *slit_map_name, const char *wave_map_name)
 Function to calibrate object traces in IFU mode.
cpl_error_code xsh_build_ifu_cube (cpl_frame *div_frame, cpl_frame *ifu_config_frame, cpl_frame *spectral_format_frame, cpl_frame *model_config_frame, cpl_frame *wavesol_frame, xsh_instrument *instrument, cpl_frameset *frameset, cpl_parameterlist *parameters, xsh_rectify_param *rectify_par, const char *recipe_id, const char *rec_prefix, const int frame_is_object)
 Reconstruct IFU cube.
cpl_error_code xsh_frame_check_model_cfg_is_proper_for_sci (cpl_frame *model_config_frame, cpl_frame *sci_frame, xsh_instrument *instrument)
 Check if a model configuration frame has been corrected for flexures.
cpl_error_code xsh_frame_check_model_cfg_is_afc_corrected (cpl_frame *model_config_frame)
 utility to check if a frame has been corrected for flexures
cpl_error_code xsh_cube_set_wcs (cpl_propertylist *plist, float cenLambda, float dispersion, int center_z, float center_x, float center_y)

Function Documentation

cpl_error_code xsh_build_ifu_cube ( cpl_frame *  div_frame,
cpl_frame *  ifu_config_frame,
cpl_frame *  spectral_format_frame,
cpl_frame *  model_config_frame,
cpl_frame *  wavesol_frame,
xsh_instrument instrument,
cpl_frameset *  frameset,
cpl_parameterlist *  parameters,
xsh_rectify_param rectify_par,
const char *  recipe_id,
const char *  rec_prefix,
const int  frame_is_object 
)

Reconstruct IFU cube.

Parameters:
[in] div_frame input frame flat field corrected
[in] ifu_config_frame IFU configuration frame
[in] spectral_format_frame spectral format frame
[in] model_config_frame model configuration frame
[in] wavesol_frame wavelength solution frame
[in] instrument instrument (arm) setting
[in] frameset input frame set
[in] parameters input parameter list
[in] rectify_par input parameters to specify rectification
[in] recipe_id input recipe id
[in] rec_prefix input recipe prefix
[in] frame_is_object flag to specify if input frame is object or sky
Returns:
corrected table

Definition at line 1187 of file xsh_utils_ifu.c.

References xsh_instrument::arm, binx, biny, check, xsh_rectify_param::kernel_type, method, xsh_rectify_param::rectif_bin_lambda, xsh_rectify_param::rectif_bin_space, xsh_rectify_param::rectif_radius, s, x, xsh_add_product_imagelist(), xsh_add_product_table_multi(), XSH_ARM_NIR, xsh_arm_tostring(), XSH_ARM_UVB, XSH_ARM_VIS, xsh_cube_qc_trace_window(), xsh_frame_product(), xsh_free_frame(), xsh_free_image(), xsh_free_imagelist(), xsh_free_propertylist(), xsh_free_table(), xsh_free_vector(), xsh_iml_merge_avg(), xsh_model_binxy(), xsh_model_config_load_best(), xsh_model_get_xy(), xsh_msg, xsh_msg_debug, xsh_pfits_get_binx(), xsh_pfits_get_biny(), xsh_pfits_set_cdelt3(), xsh_pfits_set_crval3(), XSH_PRE_DATA_TYPE, XSH_PRE_ERRS_TYPE, XSH_PRE_QUAL_TYPE, xsh_rec_list_create(), xsh_rec_list_free(), xsh_wavesol_eval_polx(), xsh_wavesol_eval_poly(), xsh_wavesol_load(), and y.

Referenced by xsh_scired_ifu_offset(), and xsh_scired_ifu_stare().

void xsh_convert_xy_to_ws ( double  x_centroid,
double *  p_obj_cen,
double *  p_slit,
double *  p_wave,
const int  lly,
const int  nx,
const int  row,
double *  p_obj_cen_s,
double *  p_obj_cen_w 
)

convert X-Y coordinates to Wavelengt Slit space

Parameters:
x_centroid centrod position on X axis
p_obj_cen [IN] pointer to central object array
p_slit [IN] pointer to slit array
p_wave [IN] pointer to wave array
lly [IN] Lower left X
nx [IN] number of X points (vector size) l
row [IN] detector row position(Y)
p_obj_cen_s [OUT] pointer to object s position
p_obj_cen_w [OUT] pointer to object s position
Returns:
void

Definition at line 546 of file xsh_utils_ifu.c.

References xsh_interpol().

Referenced by xsh_ifu_trace_object_calibrate().

cpl_error_code xsh_cube_set_wcs ( cpl_propertylist *  plist,
float  cenLambda,
float  dispersion,
int  center_z,
float  center_x,
float  center_y 
)
void xsh_edge_check ( const int  px,
const int  nx,
const int  rad_x,
int *  llx,
int *  urx 
)

check edge values (llx,urx) fit in image size (1,nx)

Parameters:
px [IN] point position
nx [IN] x image size
rad_x [IN] x radii
llx [OUT] lower left X
urx [OUT] upper right X
Returns:
void

Definition at line 514 of file xsh_utils_ifu.c.

Referenced by xsh_ifu_trace_object_calibrate().

cpl_error_code xsh_frame_check_model_cfg_is_afc_corrected ( cpl_frame *  model_config_frame  ) 

utility to check if a frame has been corrected for flexures

Parameters:
model_config_frame input frame
Returns:
corrected table

Definition at line 1143 of file xsh_utils_ifu.c.

References check, xsh_free_propertylist(), xsh_msg_error, and xsh_pfits_get_raw1catg().

Referenced by xsh_scired_ifu_stare().

cpl_error_code xsh_frame_check_model_cfg_is_proper_for_sci ( cpl_frame *  model_config_frame,
cpl_frame *  sci_frame,
xsh_instrument instrument 
)

Check if a model configuration frame has been corrected for flexures.

Parameters:
model_config_frame model configuration frame
sci_frame science frame
instrument instrument setting
Returns:
cpl error code

Definition at line 1074 of file xsh_utils_ifu.c.

References check, xsh_free_propertylist(), xsh_msg_error, xsh_pfits_get_obs_id(), xsh_pfits_get_obs_targ_name(), and xsh_pfits_get_slit_value().

Referenced by xsh_scired_ifu_stare().

cpl_error_code xsh_ifu_trace_object_calibrate ( const char *  ifu_object_ff_name,
const char *  order_tab_edges_ifu_name,
const char *  slit_map_name,
const char *  wave_map_name 
)

Function to calibrate object traces in IFU mode.

Parameters:
ifu_object_ff_name name of input object frame (flat field corrected)
order_tab_edges_ifu_name name of input edge order table
slit_map_name slit map filename
wave_map_name wave map filename
Returns:
cpl error code

Definition at line 787 of file xsh_utils_ifu.c.

References binx, biny, check, llx, lly, nx, ny, urx, ury, XSH_ARM_NIR, xsh_arm_tostring(), XSH_ARM_UNDEFINED, XSH_ARM_UVB, XSH_ARM_VIS, xsh_convert_xy_to_ws(), xsh_edge_check(), xsh_free_image(), xsh_free_propertylist(), xsh_image_fit_gaussian_max_pos_x_window(), xsh_msg, xsh_pfits_get_binx(), xsh_pfits_get_biny(), xsh_pfits_get_pcatg(), xsh_pfits_set_pcatg(), xsh_table_edge_prepare(), and xsh_table_edges_swap_low_upp().

Referenced by xsh_scired_ifu_stare().

cpl_table* xsh_table_edge_prepare ( const char *  name  ) 

Add to edges table columns to store LOW/CEN/UPP object positions.

Parameters:
name [IN] input file name
Returns:
corrected table

Definition at line 633 of file xsh_utils_ifu.c.

References check.

Referenced by xsh_ifu_trace_object_calibrate().

cpl_error_code xsh_table_edges_swap_low_upp ( cpl_table **  tab  ) 

swap lower and upper edge columns

Parameters:
tab [INOUT] pointer to input/output table
Returns:
if no error, CPL_ERROR_NONE

Definition at line 590 of file xsh_utils_ifu.c.

Referenced by xsh_ifu_trace_object_calibrate().


Generated on 9 Mar 2011 for X-shooter Pipeline Reference Manual by  doxygen 1.6.1