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
static void tflat_qclog (const cpl_image *ima, const uves_propertylist *raw_header, cpl_table *qclog)
 compute tflat QC
int uves_scired_define_parameters_body (cpl_parameterlist *parameters, const char *recipe_id)
 Setup the recipe options.
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.
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 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, 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, 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.
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.

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_tbl parameters from optimal extraction
raw_header input frame FITS header
raw_image input image
slit extraction slit length
qclog QC parameters are written here

Definition at line 2025 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:
ima resampled science in wavelength, order space
raw_header raw frame header
qclog QC parameters are written here

Definition at line 2060 of file uves_reduce_scired.c.

References assure_mem, check, check_nomsg, uves_max_int(), uves_min_int(), 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:
parameters the parameterlist to fill
recipe_id name of calling recipe
Returns:
0 if everything is ok

Definition at line 145 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:
frames frame set to change
Returns:
NULL terminated array of pointers to the frames that were changed

Definition at line 203 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 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,
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,
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_image The raw image
raw_header FITS header of raw image
rotated_header Header describing the geometry of the raw image after rotation and removal of pre- and overscan areas
master_bias The master bias image for this chip, or NULL
master_dark The master bias image for this chip, or NULL
mdark_header FITS header of master dark frame
master_flat The master flat image for this chip, or NULL
mflat_header FITS header of master flat frame
mdark_header FITS header of master dark frame
ordertable Order table describing the order locations on the raw image
order_locations The polynomial describing the order positions
linetable Length 3 array of linetables for sky, object, sky.
linetable_header Length 3 array of linetable headers for sky, object, sky.
response_curve The response curve (image of height 1) used for flux correction If non-NULL this is used for flux correction
master_response response curve as a table. If response_curve is NULL and this is non-NULL, it is used for flux correction
response_curve_header Header describing the geometry of the response_curve.
atm_extinction Table of atmospheric extinction coefficients.
dispersion_relation Length 3 array of dispersion relations for sky, object, sky.
chip CCD chip
DEBUG If set to true, intermediate results are saved to the current directory
parameters The recipe parameter list containing parameters for background subtraction, flat-fielding, extraction, rebinning
recipe_id name 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 303 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 
)

Generated on 8 Mar 2011 for UVES Pipeline Reference Manual by  doxygen 1.6.1