Defines | |
#define | FILESIZE 200 |
Functions | |
int | uves_physmod_calmap (const uves_propertylist *raw_header, enum uves_chip chip, const char *recipe_id, const cpl_parameterlist *parameters, cpl_table *npline_tbl, cpl_table **ord_tbl, cpl_table **lin_tbl, cpl_table **w_tbl, cpl_table **s_tbl, int *abs_ord_min, int *abs_ord_max, polynomial **poly2d) |
This procedure makes the order definitions and wavelength calibration from the wavelength projection map, and saves the data in tables and global keywords in echelle context. It generates order and line tables. | |
int | uves_physmod_center_gauss (const cpl_image *raw_image, cpl_table **m_tbl) |
Fit the image line X and Y distributions with a Gaussian in a box. | |
int | uves_physmod_chop_otab (const uves_propertylist *raw_header, enum uves_chip chip, cpl_table **ord_tbl, const char *col_name, int *ord_min, int *ord_max) |
Chop off orders which are not fully in the detector chip. | |
static int | flames_get_trans (const int plt_no, enum uves_chip chip, const double wlen, double *TX, double *TY) |
static int | flames_get_physmod_offset (const int plate_no, const int wavec, enum uves_chip chip, double *trans_x, double *trans_y, double *ech_ang_off, double *cd_ang_off, double *ccd_ang_off) |
Get the physical model shifts in FIBER mode. | |
static int | uves_get_physmod_offset (const int wavec, enum uves_chip chip, const int binx, const int biny, double *trans_x, double *trans_y, double *ech_ang_off, double *cd_ang_off, double *ccd_ang_off) |
Get the physical model offsets in ECHELLE mode. | |
int | uves_physmod_create_table (const uves_propertylist *raw_header, enum uves_chip chip, bool flames, const char *recipe_id, const cpl_parameterlist *parameters, cpl_table *line_refer, const double physmod_shift_x, const double physmod_shift_y, cpl_table **mod_tbl, cpl_table **fsr_tbl) |
Generates two tables with results of the UVES physical model. | |
int | uves_physmod_msrawxy (const cpl_image *raw_image, const uves_propertylist *raw_header, const char *recipe_id, const cpl_parameterlist *parameters, cpl_table *mod_tbl, cpl_table **l_tbl, cpl_table **m_tbl, cpl_table **p_tbl, cpl_table **rline_tbl, cpl_table **mline_tbl, cpl_table **npline_tbl) |
This procedure measures the raw XY positions and widths of Th-Ar lines on an ThAr arc echelle exposure. It computes the differences with the predicted positions. | |
int | uves_physmod_necregr (cpl_table **ord_tbl, cpl_table **reg_tbl) |
This procedure does a linear fit of independent orders. | |
int | uves_physmod_plotmod (const cpl_table *tbl, const uves_propertylist *head, const char *rec_id, const cpl_parameterlist *params, enum uves_chip chip) |
This procedure plots results from the uves_physmod recipe. | |
int | uves_physmod_qc1pmtbl (cpl_table **rline_tbl, cpl_table **lin_tbl) |
To be written. | |
int | uves_physmod_regress_echelle (const uves_propertylist *raw_header, enum uves_chip chip, const char *recipe_id, const cpl_parameterlist *parameters, cpl_table **o_tbl, int num_outliers, double tol, double kappa, cpl_table **s_tbl, cpl_table **w_tbl) |
Fit mesured position of orders by a bivariate polynomial. | |
static int | uves_physmod_align_tables (cpl_table **m_tbl, cpl_table **r_tbl) |
This procedure compares two input tables and eventually alignes them. | |
static int | flames_align_table_column (cpl_table **m_tbl, cpl_table **r_tbl, const char *col) |
This procedure compares two input tables and eventually alignes them. | |
int | uves_physmod_stability_check (cpl_table *m_tbl, cpl_table *r_tbl, double *med_dx, double *med_dy, double *avg_dx, double *avg_dy) |
This procedure run a stability check. |
This recipe computes a guess order and line table by using a physical model for UVES See man-page for details.
int uves_physmod_calmap | ( | const uves_propertylist * | raw_header, | |
enum uves_chip | chip, | |||
const char * | recipe_id, | |||
const cpl_parameterlist * | parameters, | |||
cpl_table * | npline_tbl, | |||
cpl_table ** | ord_tbl, | |||
cpl_table ** | lin_tbl, | |||
cpl_table ** | w_tbl, | |||
cpl_table ** | s_tbl, | |||
int * | abs_ord_min, | |||
int * | abs_ord_max, | |||
polynomial ** | poly2d | |||
) |
This procedure makes the order definitions and wavelength calibration from the wavelength projection map, and saves the data in tables and global keywords in echelle context. It generates order and line tables.
raw_header | header of raw frame | |
chip | UVES chip ID | |
recipe_id | name of calling recipe | |
parameters | input recipe parameters | |
npline_tbl | input table | |
ord_tbl | output order table | |
lin_tbl | output line table | |
w_tbl | output table with results from regression | |
s_tbl | output table with results from regression (same as w one?) | |
abs_ord_min | min absolute order | |
abs_ord_max | max absolute order | |
poly2d | output polynomial with coefficients from regression: Order=poly2d(X,YNEW) fit is stored in column RORD |
: this has been ported from UVES MIDAS pipeline
Definition at line 68 of file uves_physmod_calmap.c.
References check, uves_msg, uves_msg_debug, uves_physmod_regress_echelle(), uves_polynomial_delete(), uves_polynomial_get_coeff_1d(), uves_polynomial_regression_1d(), uves_polynomial_regression_2d(), and uves_propertylist_new().
int uves_physmod_center_gauss | ( | const cpl_image * | raw_image, | |
cpl_table ** | m_tbl | |||
) |
Fit the image line X and Y distributions with a Gaussian in a box.
raw_image | Input raw image | |
m_tbl | model table: Input/Output table with added colums ICENT,XCEN,YCEN,XFWHM,YFWHM,XSIG,YSIG,XERR,YERR,STATUS with results of a Gaussian marginal fit to the image intensity distributions obtained by collapsing along X and Y the image points within a box centered at each line |
This function is used to precisely locate each image line within a given box by a Gaussian 1d fit of each intensity distribution which can be obtained by collapsing the signal within a box centered at each line (routine derived from MIDAS one)
Definition at line 141 of file uves_physmod_center_gauss.c.
References check, check_nomsg, uves_msg, uves_msg_debug, uves_msg_warning, and uves_physmod_stacen().
Referenced by uves_physmod_msrawxy().
int uves_physmod_chop_otab | ( | const uves_propertylist * | raw_header, | |
enum uves_chip | chip, | |||
cpl_table ** | ord_tbl, | |||
const char * | col_name, | |||
int * | ord_min, | |||
int * | ord_max | |||
) |
Chop off orders which are not fully in the detector chip.
raw_header | An array containing the input image headers. The ordering must be the same as the ordering of images in the input image list | |
chip | CCD chip | |
col_name | Name of column of which min/max is computed | |
ord_tbl | The output guess order table. | |
ord_min | The output guess order table minimum value | |
ord_max | The output guess order table maximum value |
Definition at line 139 of file uves_physmod_chop_otab.c.
References check, check_nomsg, uves_msg_debug, uves_pfits_get_nx(), and uves_pfits_get_ny().
static int flames_get_physmod_offset | ( | const int | plate_no, | |
const int | wavec, | |||
enum uves_chip | chip, | |||
double * | trans_x, | |||
double * | trans_y, | |||
double * | ech_ang_off, | |||
double * | cd_ang_off, | |||
double * | ccd_ang_off | |||
) | [static] |
Get the physical model shifts in FIBER mode.
plate_no | plate number | |
wavec | central wavelength | |
trans_x | out physical model X shift | |
trans_y | out physical model Y shift | |
ech_ang_off | out ech angle | |
cd_ang_off | out cd angle | |
ccd_ang_off | out ccd angle |
Definition at line 1835 of file uves_physmod_create_table.c.
References uves_msg, and uves_msg_warning.
Referenced by uves_physmod_create_table().
static int uves_get_physmod_offset | ( | const int | wavec, | |
enum uves_chip | chip, | |||
const int | binx, | |||
const int | biny, | |||
double * | trans_x, | |||
double * | trans_y, | |||
double * | ech_ang_off, | |||
double * | cd_ang_off, | |||
double * | ccd_ang_off | |||
) | [static] |
Get the physical model offsets in ECHELLE mode.
wavec | central wavelength | |
trans_x | out physical model X shift | |
trans_y | out physical model Y shift | |
ech_ang_off | out ech angle | |
cd_ang_off | out cd angle | |
ccd_ang_off | out ccd angle |
Definition at line 912 of file uves_physmod_create_table.c.
References uves_msg, and uves_msg_warning.
Referenced by uves_physmod_create_table().
int uves_physmod_create_table | ( | const uves_propertylist * | raw_header, | |
enum uves_chip | chip, | |||
bool | flames, | |||
const char * | recipe_id, | |||
const cpl_parameterlist * | parameters, | |||
cpl_table * | line_refer, | |||
const double | physmod_shift_x, | |||
const double | physmod_shift_y, | |||
cpl_table ** | mod_tbl, | |||
cpl_table ** | fsr_tbl | |||
) |
Generates two tables with results of the UVES physical model.
raw_header | An array containing the input image headers. The ordering must be the same as the ordering of images in the input image list | |
chip | CCD chip | |
recipe_id | name of calling recipe | |
parameters | The recipe parameter list | |
line_refer | The reference arc lamp line list | |
physmod_shift_x | Correction to physical model | |
physmod_shift_y | Correction to physical model | |
mod_tbl | The output table with results from the UVES physical model | |
fsr_tbl | Output table with predicted Free Spectral Range |
This function is used to run the UVES physical model and predict the spectral format (order trace, line positions, blaze, etc..)
Definition at line 124 of file uves_physmod_create_table.c.
References check, check_nomsg, flames_get_physmod_offset(), uves_ccd_is_new(), uves_chip_tostring_upper(), uves_flames_pfits_get_plateid(), uves_get_physmod_offset(), uves_msg, uves_msg_debug, uves_pfits_get_binx(), uves_pfits_get_biny(), uves_pfits_get_chipid(), uves_pfits_get_dpr_tech(), uves_pfits_get_gratid(), uves_pfits_get_gratwlen(), uves_pfits_get_pressure(), uves_pfits_get_slitlength(), uves_pfits_get_slitwidth(), and uves_pfits_get_tempcam().
Referenced by uves_utl_physmod().
int uves_physmod_msrawxy | ( | const cpl_image * | raw_image, | |
const uves_propertylist * | raw_header, | |||
const char * | recipe_id, | |||
const cpl_parameterlist * | parameters, | |||
cpl_table * | mod_tbl, | |||
cpl_table ** | l_tbl, | |||
cpl_table ** | m_tbl, | |||
cpl_table ** | p_tbl, | |||
cpl_table ** | rline_tbl, | |||
cpl_table ** | mline_tbl, | |||
cpl_table ** | npline_tbl | |||
) |
This procedure measures the raw XY positions and widths of Th-Ar lines on an ThAr arc echelle exposure. It computes the differences with the predicted positions.
raw_image | The input raw frame (splitted) | |
raw_header | An array containing the input image headers. The ordering must be the same as the ordering of images in the input image list | |
recipe_id | name of calling recipe | |
parameters | The recipe parameter list | |
mod_tbl | Input model table from uves_physmod_create_table() | |
l_tbl | Temporary table | |
m_tbl | Temporary table | |
p_tbl | Temporary table | |
rline_tbl | Temporary table with predicted line positions | |
mline_tbl | Temporary table with corrected predicted line positions | |
npline_tbl | Temporary table |
This function creates tables rline_tbl containing predicted positions (XMOD,YMOD) and the differences, fits with a polynomial of degree 2,2 on X,Ythis difference depending on the positions (X,Y), computes the projection map with a polynomial fit of degree 2,2 on X,Y and save them in the table npline_tbl.
Definition at line 86 of file uves_physmod_msrawxy.c.
References check, check_nomsg, uves_msg_debug, uves_pfits_get_binx(), uves_pfits_get_biny(), uves_physmod_center_gauss(), uves_polynomial_delete(), uves_polynomial_evaluate_2d(), uves_polynomial_get_coeff_2d(), and uves_polynomial_regression_2d().
int uves_physmod_necregr | ( | cpl_table ** | ord_tbl, | |
cpl_table ** | reg_tbl | |||
) |
This procedure does a linear fit of independent orders.
ord_tbl | The input order table | |
reg_tbl | The output regression table. |
This procedure does a linear fit of independent orders and writes the rms in a table
Definition at line 108 of file uves_physmod_necregr.c.
References uves_msg_debug.
Referenced by uves_physmod_regress_echelle().
int uves_physmod_plotmod | ( | const cpl_table * | tbl, | |
const uves_propertylist * | head, | |||
const char * | rec_id, | |||
const cpl_parameterlist * | params, | |||
enum uves_chip | chip | |||
) |
This procedure plots results from the uves_physmod recipe.
tbl | The input line table. | |
tbl | The input raw data header. | |
params | The input recipe parameters. |
This procedure plots results from the uves_physmod recipe
Definition at line 122 of file uves_physmod_plotmod.c.
References check, uves_chip_tostring_lower(), uves_pfits_get_gratwlen(), uves_pfits_get_origfile(), uves_pfits_get_slitlength(), uves_pfits_get_slitwidth(), uves_pfits_get_tempcam(), and uves_pfits_get_tpl_start().
int uves_physmod_qc1pmtbl | ( | cpl_table ** | rline_tbl, | |
cpl_table ** | lin_tbl | |||
) |
To be written.
rline_tbl | The input line table. | |
lin_tbl | The input line table. |
Definition at line 124 of file uves_physmod_qc1pmtbl.c.
References check, check_nomsg, and uves_msg_debug.
int uves_physmod_regress_echelle | ( | const uves_propertylist * | raw_header, | |
enum uves_chip | chip, | |||
const char * | recipe_id, | |||
const cpl_parameterlist * | parameters, | |||
cpl_table ** | o_tbl, | |||
int | num_outliers, | |||
double | tol, | |||
double | kappa, | |||
cpl_table ** | s_tbl, | |||
cpl_table ** | w_tbl | |||
) |
Fit mesured position of orders by a bivariate polynomial.
raw_header | An array containing the input image headers. The ordering must be the same as the ordering of images in the input image list | |
chip | CCD chip | |
recipe_id | name of calling recipe | |
parameters | The recipe parameter list | |
o_tbl | The input order table | |
num_outliers | The input no of outliers | |
tol | The input tolerance | |
kappa | The input value of kappa in kappa-sigma clipping | |
s_tbl | The output table. | |
w_tbl | The output table. |
Definition at line 98 of file uves_physmod_regress_echelle.c.
References check, uves_max_int(), uves_msg, uves_msg_debug, uves_msg_error, uves_msg_warning, uves_pfits_get_cdelt1(), uves_pfits_get_cdelt2(), uves_pfits_get_crval1(), uves_pfits_get_crval2(), uves_pfits_get_naxis1(), uves_pfits_get_naxis2(), uves_pfits_get_nx(), uves_pfits_get_ny(), uves_physmod_necregr(), uves_polynomial_delete(), uves_polynomial_get_coeff_2d(), uves_polynomial_regression_2d(), and uves_propertylist_new().
Referenced by uves_physmod_calmap().
static int uves_physmod_align_tables | ( | cpl_table ** | m_tbl, | |
cpl_table ** | r_tbl | |||
) | [static] |
This procedure compares two input tables and eventually alignes them.
Definition at line 391 of file uves_physmod_stability_check.c.
References check_nomsg, flames_align_table_column(), uves_msg_warning, and uves_propertylist_new().
Referenced by uves_physmod_stability_check().
static int flames_align_table_column | ( | cpl_table ** | m_tbl, | |
cpl_table ** | r_tbl, | |||
const char * | col | |||
) | [static] |
This procedure compares two input tables and eventually alignes them.
m_tbl | model table on actual frame. | |
r_tbl | model table on reference frame | |
col | reference column |
Definition at line 339 of file uves_physmod_stability_check.c.
References check_nomsg.
Referenced by uves_physmod_align_tables().
int uves_physmod_stability_check | ( | cpl_table * | m_tbl, | |
cpl_table * | r_tbl, | |||
double * | med_dx, | |||
double * | med_dy, | |||
double * | avg_dx, | |||
double * | avg_dy | |||
) |
This procedure run a stability check.
m_tbl | model table on actual frame. | |
r_tbl | model table on reference frame | |
med_dx | median shift on X axis | |
med_dy | median shift on Y axis | |
avg_dx | mean shift on X axis | |
avg_dy | mean shift on Y axis |
This procedure compares values of XMES and YMES columns from check and reference frames and computes the median of their difference.
Definition at line 155 of file uves_physmod_stability_check.c.
References check, check_nomsg, uves_msg, uves_msg_warning, and uves_physmod_align_tables().