UVES Pipeline Reference Manual  5.4.0
Functions
Recipe: Response

Functions

cpl_error_code uves_response_efficiency (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_table *ordertable, const polynomial *order_locations, const cpl_table *linetable[3], const uves_propertylist *linetable_header[3], const polynomial *dispersion_relation[3], const cpl_table *flux_table, const cpl_table *atm_extinction, enum uves_chip chip, bool debug_mode, const cpl_parameterlist *parameters, double PACCURACY, cpl_table **efficiency, cpl_table **blaze_efficiency)
 Calculate quantum detection efficiency.
cpl_image * uves_calculate_response (const cpl_image *spectrum, const uves_propertylist *spectrum_header, const cpl_table *flux_table, const uves_propertylist *raw_header, double PACCURACY, bool inverse, char **ref_obj_id)
 Calculate response.
cpl_table * uves_align (const uves_propertylist *object_header, const cpl_table *flux_table, double accuracy, char **ref_name_dynamic)
 Match a star against a catalogue of stars.

Detailed Description

This recipe calculates the response function and the quantum detection efficiency. See man-page for details.


Function Documentation

cpl_error_code uves_response_efficiency ( 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_table *  ordertable,
const polynomial order_locations,
const cpl_table *  linetable[3],
const uves_propertylist linetable_header[3],
const polynomial dispersion_relation[3],
const cpl_table *  flux_table,
const cpl_table *  atm_extinction,
enum uves_chip  chip,
bool  debug_mode,
const cpl_parameterlist *  parameters,
double  PACCURACY,
cpl_table **  efficiency,
cpl_table **  blaze_efficiency 
)

Calculate quantum detection efficiency.

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 dark image for this chip, or NULL
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 linetable for sky, object, sky.
linetable_headerLength 3 array of linetable headers for sky, object, sky.
dispersion_relationLength 3 array of dispersion relations for sky, object, sky.
flux_tableCatalogue standard star fluxes
atm_extinctionAtmospheric extinction coefficients
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
PACCURACYPointing accuracy (in arcseconds) used to identify object
efficiency(out) The quantum detection efficiency table
blaze_efficiency(out) Efficiency at blaze function maximum, for each order
Returns:
The reduced spectrum

Definition at line 100 of file uves_response_efficiency.c.

References check, uves_absolute_order(), uves_calculate_response(), uves_filter_image_median(), uves_msg, uves_msg_debug, uves_normalize_spectrum(), uves_pfits_get_cdelt1(), uves_pfits_get_firstabsorder(), uves_pfits_get_lastabsorder(), uves_pfits_get_wend(), uves_pfits_get_wstart(), uves_polynomial_collapse(), uves_polynomial_delete(), uves_polynomial_derivative_2d(), uves_polynomial_solve_1d(), and uves_reduce().

cpl_image* uves_calculate_response ( const cpl_image *  spectrum,
const uves_propertylist spectrum_header,
const cpl_table *  flux_table,
const uves_propertylist raw_header,
double  PACCURACY,
bool  inverse,
char **  ref_obj_id 
)

Calculate response.

Parameters:
spectrumThe 1d (merged) or 2d (non-merged) spectrum
spectrum_headerHeader describing the geometry of the input spectrum
flux_tableTable of standard star fluxes
raw_headerHeader of the raw frame
PACCURACYPointing accuracy (in arcseconds) used to find a unique matching object in the flux_table
inverseIf false, flux/std_flux is calculated, if true std_flux/flux is computed.
ref_obj_id(output) reference object ID. Must be deallocated by the caller
Returns:
Response curve

Undefined values (division by zero) are set to zero.

Definition at line 140 of file uves_response_utils.c.

References check, uves_align(), uves_pfits_get_cdelt1(), uves_pfits_get_crval1(), uves_pfits_get_wstart(), and uves_spline_hermite_table().

Referenced by uves_response_efficiency().

cpl_table* uves_align ( const uves_propertylist object_header,
const cpl_table *  flux_table,
double  accuracy,
char **  ref_name_dynamic 
)

Match a star against a catalogue of stars.

Parameters:
object_headerHeader containing the object coordinates
flux_tableThe catalogue of standard star coordinates and fluxes
accuracyThe pointing accuracy in arcseconds
ref_name_dynamic(output) reference object ID. Must be deallocated by the caller
Returns:
Table containing the catalogue flux of the identified star.

The input object coordinates are matched against the list of standard star coordinates.

Exactly one reference star must match the object within the specified accuracy, or an error is set.

The spectrum of the uniquely identified star is read from the catalogue and returned as a (2D) table.

Definition at line 257 of file uves_response_utils.c.

References assure_nomsg, check, uves_msg, uves_msg_debug, uves_pfits_get_dec(), and uves_pfits_get_ra().

Referenced by test_3dtable(), and uves_calculate_response().