UVES Pipeline Reference Manual  5.4.6
Functions
Order merging

Functions

cpl_image * uves_merge_orders (const cpl_image *spectrum, const cpl_image *spectrum_noise, const uves_propertylist *spectrum_header, merge_method m_method, int n_traces, uves_propertylist **merged_header, const double delt1, const double delt2, enum uves_chip chip, cpl_image **merged_noise)
 Merge orders. More...
 
merge_method uves_get_merge_method (const cpl_parameterlist *parameters, const char *context, const char *subcontext)
 Read merging method from parameter list. More...
 

Detailed Description

Merge echelle orders to obtain a 1D spectrum.

Function Documentation

cpl_image* uves_merge_orders ( const cpl_image *  spectrum,
const cpl_image *  spectrum_noise,
const uves_propertylist spectrum_header,
merge_method  m_method,
int  n_traces,
uves_propertylist **  merged_header,
const double  delt1,
const double  delt2,
enum uves_chip  chip,
cpl_image **  merged_noise 
)

Merge orders.

Parameters
spectrumThe 2D spectrum in (wavelength, order)-space
spectrum_noiseThe spectrum noise
spectrum_headerHeader describing the wavelength offset for each row in the spectrum image.
m_methodThe merge method
n_tracesNumber of traces per order (equal to 1, or more if 2d extraction)
merged_header(out) Newly allocated header of merged image
merged_noise(out) Newly allocated merged 1D noise spectrum
Returns
The merged spectrum as an image of height n_traces.

If m_method is MERGE_OPTIMAL, the resulting spectrum is at each wavelength optimally merged from the (one, two or more) single order spectra:

flux = sum [1/sigma_i^2 flux_i] / sum [1/sigma_i^2] sigma^2 = 1 / sum [1/sigma_i^2]

If m_method is MERGE_SUM, the sum (not average as above) of input fluxes is computed:

flux = sum [flux_i] sigma^2 = sum [sigma_i^2]

Definition at line 239 of file uves_merge.c.

References check, passure, uves_chip_tostring_upper(), uves_initialize_image_header(), uves_msg, uves_msg_debug, uves_pfits_get_cdelt1(), uves_pfits_get_wend(), uves_pfits_get_wstart(), uves_propertylist_new(), and uves_tostring_cpl_type().

Referenced by extract_ff_rebin_merge().

merge_method uves_get_merge_method ( const cpl_parameterlist *  parameters,
const char *  context,
const char *  subcontext 
)

Read merging method from parameter list.

Parameters
parametersThe parameter list
contextContext of parameter (or NULL)
subcontextSubcontext of parameter
Returns
The merging method as read from the parameter context.subcontext.merge

Definition at line 777 of file uves_merge.c.

References check.

Referenced by uves_reduce(), and uves_reduce_scired().