Merge the orders (xsh_merge_ord)
[DRL Functions]

Functions

static void xsh_merge_point (double flux_a, double err_a, double weight_a, double flux_b, double err_b, double weight_b, double *flux_res, double *err_res)
 Compute flux and error associated to each merged spectrum point.
static cpl_frame * xsh_merge_ord_with_tag (cpl_frame *rec_frame, xsh_instrument *instrument, xsh_merge_param *merge_par, const char *tag)
 Merge the orders.
cpl_frame * xsh_merge_ord (cpl_frame *rec_frame, xsh_instrument *instrument, xsh_merge_param *merge_par, const char *rec_prefix)
 Merge orders of the rectified frame using merge parameters.
cpl_frame * xsh_merge_ord_slitlet (cpl_frame *rec_frame, xsh_instrument *instrument, xsh_merge_param *merge_par, int slitlet, const char *rec_prefix)
 Merge orders of the rectified frame using merge parameters.
cpl_frameset * xsh_merge_ord_ifu (cpl_frameset *rec_frameset, xsh_instrument *instrument, xsh_merge_param *merge_par, const char *rec_prefix)
 Merge orders of the rectified frame using merge parameters.

Detailed Description

Function ...


Function Documentation

cpl_frame* xsh_merge_ord ( cpl_frame *  rec_frame,
xsh_instrument instrument,
xsh_merge_param merge_par,
const char *  rec_prefix 
)

Merge orders of the rectified frame using merge parameters.

Parameters:
[in] rec_frame Rectified frame
[in] instrument Pointer to instrument description structure
[in] merge_par Merge parameters
[in] rec_prefix Prefix (string value recipe related) used for product filenames and tags
Returns:
The merged spectrum

Definition at line 386 of file xsh_merge_ord.c.

References CENTER_SLIT, check, xsh_merge_ord_slitlet(), and xsh_msg.

Referenced by analyse_localization(), main(), xsh_flux_calibrate(), xsh_localize_obj(), xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), xsh_scired_slit_nod(), xsh_scired_slit_offset(), xsh_scired_slit_stare(), and xsh_util_apply_response().

cpl_frameset* xsh_merge_ord_ifu ( cpl_frameset *  rec_frameset,
xsh_instrument instrument,
xsh_merge_param merge_par,
const char *  rec_prefix 
)

Merge orders of the rectified frame using merge parameters.

Parameters:
[in] rec_frameset Rectified frameset
[in] instrument Pointer to instrument description structure
[in] merge_par Merge parameters
[in] rec_prefix Prefix (string value recipe related) used for product filenames and tags
Returns:
The merged spectrum

Definition at line 501 of file xsh_merge_ord.c.

References check, LOWER_IFU_SLITLET, SlitletName, UPPER_IFU_SLITLET, XSH_ASSURE_NOT_NULL, xsh_frameset_drl_frames(), xsh_free_frameset(), xsh_merge_ord_slitlet(), xsh_msg, and XSH_REGDEBUG.

cpl_frame* xsh_merge_ord_slitlet ( cpl_frame *  rec_frame,
xsh_instrument instrument,
xsh_merge_param merge_par,
int  slitlet,
const char *  rec_prefix 
)

Merge orders of the rectified frame using merge parameters.

Parameters:
[in] rec_frame Rectified frame
[in] instrument Pointer to instrument description structure
[in] merge_par Merge parameters
[in] slitlet slitlet id (used for IFU)
[in] rec_prefix Prefix (string value recipe related) used for product filenames and tags
Returns:
The merged spectrum

Definition at line 415 of file xsh_merge_ord.c.

References check, XSH_ASSURE_NOT_NULL, XSH_COMBINED_OFFSET_2D_SLIT, XSH_FLUX_MERGE1D, XSH_FLUX_MERGE2D, XSH_FLUX_ORDER1D, XSH_FLUX_ORDER2D, xsh_free_propertylist(), XSH_GET_TAG_FROM_ARM, XSH_GET_TAG_FROM_SLITLET, XSH_MERGE1D, XSH_MERGE2D, XSH_MERGE_EXT1D, xsh_merge_ord_with_tag(), XSH_MERGE_OXT1D, xsh_msg_error, XSH_NORM_MERGE1D, XSH_NORM_MERGE2D, XSH_NORM_ORDER1D, XSH_NORM_ORDER2D, XSH_ORDER1D, XSH_ORDER2D, XSH_ORDER_EXT1D, XSH_ORDER_OXT1D, and xsh_pfits_get_pcatg().

Referenced by main(), xsh_merge_ord(), and xsh_merge_ord_ifu().

static cpl_frame* xsh_merge_ord_with_tag ( cpl_frame *  rec_frame,
xsh_instrument instrument,
xsh_merge_param merge_par,
const char *  tag 
) [static]

Merge the orders.

Parameters:
[in] rec_frame Rectified frame (1D or 2D)
[in] instrument Instrument pointer
[in] merge_par Parameters for merge the orders
[in] tag The spectrum tag
Returns:
A spectrum (1D or 2D)

Definition at line 124 of file xsh_merge_ord.c.

References check, xsh_spectrum::flux_header, xsh_rec_list::header, lambda_step, MEAN_MERGE_METHOD, MERGE_METHOD_PRINT, xsh_merge_param::method, n, xsh_rec_list::size, xsh_spectrum::size, slit_step, XSH_ASSURE_NOT_NULL, XSH_CALLOC, XSH_COMBINED_OFFSET_2D_IFU, XSH_COMBINED_OFFSET_2D_SLIT, XSH_FREE, xsh_free_propertylist(), XSH_GOOD_PIXEL_LEVEL, XSH_MERGE2D, xsh_merge_point(), xsh_msg_dbg_high, xsh_msg_dbg_medium, xsh_msg_warning, XSH_ORDER2D, xsh_pfits_get_naxis(), xsh_pfits_get_pcatg(), xsh_pfits_get_rectify_bin_lambda(), xsh_pfits_get_rectify_bin_space(), xsh_pfits_get_rectify_lambda_max(), xsh_pfits_get_rectify_lambda_min(), xsh_pfits_get_rectify_space_max(), xsh_pfits_get_rectify_space_min(), xsh_rec_list_free(), xsh_rec_list_get_data1(), xsh_rec_list_get_errs1(), xsh_rec_list_get_lambda(), xsh_rec_list_get_nlambda(), xsh_rec_list_get_nslit(), xsh_rec_list_get_qual1(), xsh_rec_list_load(), xsh_rec_list_load_eso(), xsh_round_double(), xsh_spectrum_1D_create(), xsh_spectrum_2D_create(), xsh_spectrum_free(), xsh_spectrum_get_errs(), xsh_spectrum_get_flux(), xsh_spectrum_get_qual(), xsh_spectrum_get_size_lambda(), xsh_spectrum_get_size_slit(), xsh_spectrum_save(), and xsh_stringcat_any().

Referenced by xsh_merge_ord_slitlet().

static void xsh_merge_point ( double  flux_a,
double  err_a,
double  weight_a,
double  flux_b,
double  err_b,
double  weight_b,
double *  flux_res,
double *  err_res 
) [static]

Compute flux and error associated to each merged spectrum point.

Parameters:
[in] flux_a Input flux from a contribute
[in] err_a Error associated to flux_a
[in] weight_a Weight associated to flux_a
[in] flux_b Input flux from b contribute
[in] err_b Error associated to flux_b
[in] weight_b Weight associated to flux_b
[out] flux_res Input flux from merged contributes
[out] err_res Error associated to flux_res
Returns:
void (

Definition at line 94 of file xsh_merge_ord.c.

References XSH_ASSURE_NOT_NULL.

Referenced by xsh_merge_ord_with_tag().


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