UVES Pipeline Reference Manual  5.4.6
Functions | Variables
Recipe: Science Reduction

Functions

static void scired_qclog (const cpl_table *info_tbl, const uves_propertylist *raw_header, const cpl_image *raw_image, double slit, cpl_table *qclog)
 compute science QC More...
 
static void tflat_qclog (const cpl_image *ima, const uves_propertylist *raw_header, cpl_table *qclog)
 compute tflat QC More...
 
static uves_propertylistuves_paste_wave_accuracy (const uves_propertylist *header_from)
 
int uves_scired_define_parameters_body (cpl_parameterlist *parameters, const char *recipe_id)
 Setup the recipe options. More...
 
const char * uves_get_pro_catg_special (bool extract_is_2d, merge_method m_method)
 
static cpl_frame ** set_all_raw_none (cpl_frameset *frames)
 Change tag of RAW frames to NONE. More...
 
static cpl_error_code uves_scired_process_chip (const cpl_image *raw_image, const uves_propertylist *raw_header, const uves_propertylist *rotated_header, const cpl_image *master_bias, const uves_propertylist *mbias_header, const cpl_image *master_dark, const uves_propertylist *mdark_header, const cpl_image *master_flat, const uves_propertylist *mflat_header, const cpl_table *ordertable, const polynomial *order_locations, const cpl_table *linetable[3], const uves_propertylist *linetable_header[3], const polynomial *dispersion_relation[3], const cpl_image *response_curve, const cpl_table *master_response, const uves_propertylist *response_curve_header, const cpl_table *atm_extinction, enum uves_chip chip, bool debug_mode, const cpl_parameterlist *parameters, const char *recipe_id, cpl_image **x2d, uves_propertylist **x2d_header, cpl_image **fx2d, cpl_image **background, cpl_image **flatfielded_variance, uves_propertylist **flatfielded_variance_header, cpl_image **resampled_science, cpl_image **resampled_mf, cpl_image **rebinned_science, cpl_image **rebinned_noise, uves_propertylist **rebinned_header, cpl_image **merged_sky, cpl_image **merged_science, uves_propertylist **merged_header, cpl_image **reduced_science, cpl_image **reduced_science_error, cpl_table **cosmic_mask, cpl_image **wave_map, cpl_image **fluxcal_science, cpl_image **fluxcal_error, uves_propertylist **fluxcal_header, cpl_table **info_tbl, double *extraction_slit, cpl_table **order_trace)
 Reduce one chip of a UVES science frame. More...
 
void uves_reduce_scired (cpl_frameset *frames, const cpl_parameterlist *parameters, const char *recipe_id, const char *starttime)
 Get the command line options and execute the data reduction. More...
 

Variables

const char *const uves_scired_desc_short = "Reduces a science frame"
 
const char *const uves_scired_desc
 

Detailed Description

This recipe reduces a science frame. See man-page for details.

Function Documentation

static void scired_qclog ( const cpl_table *  info_tbl,
const uves_propertylist raw_header,
const cpl_image *  raw_image,
double  slit,
cpl_table *  qclog 
)
static

compute science QC

Parameters
info_tblparameters from optimal extraction
raw_headerinput frame FITS header
raw_imageinput image
slitextraction slit length
qclogQC parameters are written here

Definition at line 2191 of file uves_reduce_scired.c.

References check_nomsg, uves_qclog_add_sci(), and uves_qclog_add_string().

Referenced by uves_reduce_scired().

static void tflat_qclog ( const cpl_image *  ima,
const uves_propertylist raw_header,
cpl_table *  qclog 
)
static

compute tflat QC

Parameters
imaresampled science in wavelength, order space
raw_headerraw frame header
qclogQC parameters are written here

Definition at line 2226 of file uves_reduce_scired.c.

References assure_mem, check, check_nomsg, uves_pfits_get_exptime(), uves_pfits_get_insmode(), uves_pfits_get_inspath(), uves_pfits_get_slit1_name(), uves_qclog_add_double(), uves_qclog_add_string(), and uves_remove_string_prefix().

Referenced by uves_reduce_scired().

int uves_scired_define_parameters_body ( cpl_parameterlist *  parameters,
const char *  recipe_id 
)

Setup the recipe options.

Parameters
parametersthe parameterlist to fill
recipe_idname of calling recipe
Returns
0 if everything is ok

Definition at line 216 of file uves_reduce_scired.c.

static cpl_frame** set_all_raw_none ( cpl_frameset *  frames)
static

Change tag of RAW frames to NONE.

Parameters
framesframe set to change
Returns
NULL terminated array of pointers to the frames that were changed

Definition at line 274 of file uves_reduce_scired.c.

Referenced by uves_reduce_scired().

static cpl_error_code uves_scired_process_chip ( const cpl_image *  raw_image,
const uves_propertylist raw_header,
const uves_propertylist rotated_header,
const cpl_image *  master_bias,
const uves_propertylist mbias_header,
const cpl_image *  master_dark,
const uves_propertylist mdark_header,
const cpl_image *  master_flat,
const uves_propertylist mflat_header,
const cpl_table *  ordertable,
const polynomial order_locations,
const cpl_table *  linetable[3],
const uves_propertylist linetable_header[3],
const polynomial dispersion_relation[3],
const cpl_image *  response_curve,
const cpl_table *  master_response,
const uves_propertylist response_curve_header,
const cpl_table *  atm_extinction,
enum uves_chip  chip,
bool  debug_mode,
const cpl_parameterlist *  parameters,
const char *  recipe_id,
cpl_image **  x2d,
uves_propertylist **  x2d_header,
cpl_image **  fx2d,
cpl_image **  background,
cpl_image **  flatfielded_variance,
uves_propertylist **  flatfielded_variance_header,
cpl_image **  resampled_science,
cpl_image **  resampled_mf,
cpl_image **  rebinned_science,
cpl_image **  rebinned_noise,
uves_propertylist **  rebinned_header,
cpl_image **  merged_sky,
cpl_image **  merged_science,
uves_propertylist **  merged_header,
cpl_image **  reduced_science,
cpl_image **  reduced_science_error,
cpl_table **  cosmic_mask,
cpl_image **  wave_map,
cpl_image **  fluxcal_science,
cpl_image **  fluxcal_error,
uves_propertylist **  fluxcal_header,
cpl_table **  info_tbl,
double *  extraction_slit,
cpl_table **  order_trace 
)
static

Reduce one chip of a UVES science frame.

Parameters
raw_imageThe raw image
raw_headerFITS header of raw image
rotated_headerHeader describing the geometry of the raw image after rotation and removal of pre- and overscan areas
master_biasThe master bias image for this chip, or NULL
master_darkThe master bias image for this chip, or NULL
mdark_headerFITS header of master dark frame
master_flatThe master flat image for this chip, or NULL
mflat_headerFITS header of master flat frame
mdark_headerFITS header of master dark frame
ordertableOrder table describing the order locations on the raw image
order_locationsThe polynomial describing the order positions
linetableLength 3 array of linetables for sky, object, sky.
linetable_headerLength 3 array of linetable headers for sky, object, sky.
response_curveThe response curve (image of height 1) used for flux correction If non-NULL this is used for flux correction
master_responseresponse curve as a table. If response_curve is NULL and this is non-NULL, it is used for flux correction
response_curve_headerHeader describing the geometry of the response_curve.
atm_extinctionTable of atmospheric extinction coefficients.
dispersion_relationLength 3 array of dispersion relations for sky, object, sky.
chipCCD chip
debug_modeIf set to true, intermediate results are saved to the current directory
parametersThe recipe parameter list containing parameters for background subtraction, flat-fielding, extraction, rebinning
recipe_idname of calling recipe
x2d(output) In 2d extraction mode, the extracted spectrum
x2d_header(output) In 2d extraction mode, header of extracted spectrum
fx2d(output) In 2d extraction mode, the flat-fielded, extracted spectrum
background(output) The background that was subtracted from the raw image
flatfielded_variance(output) Variance of extracted, flat-fielded spectrum
flatfielded_variance_header(output) Header of flatfielded_variance
resampled_science(output) The extracted, rebinned spectrum. If flat-field method is 'extract', this spectrum was not flat-fielded.
resampled_mf(output) As resampled_science, but for the master flat-field
rebinned_science(output) The extracted, flat-fielded, rebinned spectrum
rebinned_header(output) Header of rebinned_science
merged_sky(output) The extracted, rebinned, merged sky spectrum
merged_science(output) The extracted, rebinned, merged object spectrum
merged_header(output) Header of merged_science, also applies to reduced_science and reduced_science_error
reduced_science(output) The extracted, flat-fielded, rebinned, merged, sky-subtracted spectrum
reduced_science_error(output) The error (1 sigma) of reduced_science
cosmic_mask(output) In optimal extraction mode, the list of hot pixels
fluxcal_science(output) As reduced_science but also response corrected (if response curve was provided)
fluxcal_error(output) Error (1 sigma) of fluxcal_science (if response curve was provided)
fluxcal_header(output) Header describing the geometry of fluxcal_science and fluxcal_error
info_tbl(output) optimal extraction QC parameters
extraction_slit(output) extraction slit length used
order_trace(output) In optimal extraction mode, table describing the measured spatial profile
Returns
CPL_ERROR_NONE iff okay

This function does a science reduction (see uves_reduce) and, if a response curve if provided, corrects for the instrument response (by moving the science spectrum to the top of the atmosphere (see uves_normalize_spectrum) and multiplying be the response function).

Definition at line 372 of file uves_reduce_scired.c.

References check, uves_initialize_image_header(), uves_msg, uves_normalize_spectrum(), uves_pfits_get_cdelt1(), uves_pfits_get_crval1(), uves_reduce(), and uves_spline_hermite_table().

Referenced by uves_reduce_scired().

void uves_reduce_scired ( cpl_frameset *  frames,
const cpl_parameterlist *  parameters,
const char *  recipe_id,
const char *  starttime 
)