Defines | |
#define | HALF_SLIC_WINDOW 5 |
Functions | |
static cpl_table * | xsh_compute_flat_edges (cpl_frame *frame, xsh_order_list *list, xsh_instrument *instrument, const char *method) |
Measure flat edges (and eventually IFU slices) on master bias using Scharr X filter. | |
static void | xsh_eval_y_avg_chunk (xsh_pre *pre, int xc, int yc, int chunk_y_hsize, int x_hsize, const int decode_bp, double *flux, double *noise) |
Evaluate by chunk in Y the total and mean flux and the corresponding errors around x,y input position. | |
static void | xsh_detect_max_y (xsh_order_list *list, int chunk_hsize, cpl_polynomial *cen_poly, int cen_start, int cen_end, xsh_pre *pre, const int decode_bp, int *maxy) |
Detect Y position where flux is max. | |
static void | xsh_detect_edges (xsh_order_list *list, int y, cpl_polynomial *cen_poly, xsh_pre *pre, int window_hsize, double *res_flux, double *res_noise, int chunk_hsize, double min_snr, double flux_frac, int min_size_x, const int decode_bp, int *x_min, float *x_cen_sdivn, int *xup, int *xlow, float *min_low, float *min_up) |
Detect order edges: at each y position determines low (left) and upper (right) order edges. | |
static void | xsh_detect_slitlet_ratio (double *res_flux, int window_hsize, double min_low, double min_up, int xlow, int xup, double *ratio_low, double *ratio_up) |
cpl_frame * | xsh_detect_order_edge (cpl_frame *frame, cpl_frame *cen_order_tab_frame, xsh_detect_order_param *detectorder_par, xsh_instrument *instrument) |
Detect order edges and compute polynomial description of ordermin and order max. |
#define HALF_SLIC_WINDOW 5 |
Definition at line 58 of file xsh_detect_order.c.
Referenced by xsh_detect_order_edge(), and xsh_detect_slitlet_ratio().
static cpl_table* xsh_compute_flat_edges | ( | cpl_frame * | frame, | |
xsh_order_list * | list, | |||
xsh_instrument * | instrument, | |||
const char * | method | |||
) | [static] |
Measure flat edges (and eventually IFU slices) on master bias using Scharr X filter.
frame | input (master) frame (must have good S/N) | |
list | input order list | |
instrument | instrument setting | |
method | method used |
Definition at line 79 of file xsh_detect_order.c.
References xsh_order::absorder, xsh_instrument::arm, xsh_order_list::bin_x, xsh_order_list::bin_y, xsh_order::cenpoly, check, xsh_order::edglopoly, xsh_order::edguppoly, xsh_order::endy, xsh_instrument::lamp, xsh_order_list::list, llx, xsh_instrument::mode, xsh_order::order, xsh_order::pol_degree, xsh_order_list::size, xsh_order::sliclopoly, xsh_order::slicuppoly, xsh_order::starty, urx, XSH_ARM_UVB, xsh_debug_level_get(), XSH_DEBUG_LEVEL_MEDIUM, xsh_free_image(), xsh_free_polynomial(), xsh_free_propertylist(), xsh_free_table(), XSH_GET_TAG_FROM_ARM, xsh_instrument_get_mode(), XSH_LAMP_QTH, XSH_MEASURE_FLAT_D2_IFU_EDGES_UVB, XSH_MEASURE_FLAT_D2_SLIT_EDGES_UVB, XSH_MEASURE_FLAT_IFU_EDGES, XSH_MEASURE_FLAT_QTH_IFU_EDGES_UVB, XSH_MEASURE_FLAT_QTH_SLIT_EDGES_UVB, XSH_MEASURE_FLAT_SLIT_EDGES, XSH_MODE_IFU, xsh_msg, xsh_msg_dbg_medium, xsh_order_list_eval(), xsh_order_list_eval_int(), xsh_polynomial_fit_1d_create(), xsh_scharr_x(), xsh_sobel_lx(), and y.
Referenced by xsh_detect_order_edge().
static void xsh_detect_edges | ( | xsh_order_list * | list, | |
int | y, | |||
cpl_polynomial * | cen_poly, | |||
xsh_pre * | pre, | |||
int | window_hsize, | |||
double * | res_flux, | |||
double * | res_noise, | |||
int | chunk_hsize, | |||
double | min_snr, | |||
double | flux_frac, | |||
int | min_size_x, | |||
const int | decode_bp, | |||
int * | x_min, | |||
float * | x_cen_sdivn, | |||
int * | xup, | |||
int * | xlow, | |||
float * | min_low, | |||
float * | min_up | |||
) | [static] |
Detect order edges: at each y position determines low (left) and upper (right) order edges.
list | order list structure | |
y | y position at which flux is max | |
cen_poly | polynomial description order centres | |
pre | frame in pre format | |
window_hsize | window half (X) size | |
res_flux | data flux array pointer | |
res_noise | data noise array pointer | |
chunk_hsize | chunk half (Y) size | |
min_snr | minimum signal to noise ratio | |
flux_frac | flux fraction | |
min_size_x | minimum x size of flat size | |
x_min | output min x | |
x_cen_sdivn | output singnal to noise ratio at central x | |
xup | output upper x | |
xlow | output lower x | |
min_low | output flux min at low edge | |
min_up | output flux min at upp edge |
Definition at line 707 of file xsh_detect_order.c.
References check, nx, threshold, x, XSH_ASSURE_NOT_NULL, xsh_eval_y_avg_chunk(), xsh_msg, xsh_msg_dbg_medium, and xsh_order_list_eval_int().
Referenced by xsh_detect_order_edge().
static void xsh_detect_max_y | ( | xsh_order_list * | list, | |
int | chunk_hsize, | |||
cpl_polynomial * | cen_poly, | |||
int | cen_start, | |||
int | cen_end, | |||
xsh_pre * | pre, | |||
const int | decode_bp, | |||
int * | maxy | |||
) | [static] |
Detect Y position where flux is max.
list | order list structure | |
chunk_hsize | chunk half size | |
cen_poly | polynomial description order centres | |
cen_start | start y order centers | |
cen_end | end y order centers | |
pre | frame in pre format | |
maxy | found Y maximum |
Definition at line 640 of file xsh_detect_order.c.
References check, xsh_pre::nx, ny, xsh_pre::qual, x, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, xsh_eval_y_avg_chunk(), xsh_order_list_eval_int(), and y.
Referenced by xsh_detect_order_edge().
cpl_frame* xsh_detect_order_edge | ( | cpl_frame * | frame, | |
cpl_frame * | cen_order_tab_frame, | |||
xsh_detect_order_param * | detectorder_par, | |||
xsh_instrument * | instrument | |||
) |
Detect order edges and compute polynomial description of ordermin and order max.
[in] | frame | The image frame [PRE] |
[in] | cen_order_tab_frame | The frame [ORDER_TAB] |
[in] | detectorder_par | The detection parameters |
[in] | instrument | The instrument setting |
< Y position
< Lower X position
< Upper X position
< Upper X position of center slice
< Lower X position of center slice
Definition at line 928 of file xsh_detect_order.c.
References xsh_order::absorder, assure, xsh_order_list::bin_x, xsh_order_list::bin_y, BOOLEAN_TO_STRING, xsh_order::cenpoly, check, xsh_detect_order_param::chunk_hsize, xsh_instrument::decode_bp, xsh_order::edglopoly, xsh_order::edguppoly, xsh_order::endy, xsh_detect_order_param::fixed_slice, xsh_detect_order_param::flux_thresh, HALF_SLIC_WINDOW, xsh_order_list::header, xsh_order_list::list, xsh_detect_order_param::method, method, xsh_detect_order_param::min_order_size_x, xsh_detect_order_param::min_sn, xsh_pre::nx, ny, xsh_pre::ny, xsh_order::pol_degree, xsh_detect_order_param::search_window_hsize, xsh_order_list::size, size, xsh_order::sliclopoly, xsh_order::slicuppoly, xsh_detect_order_param::slitlet_low_factor, xsh_detect_order_param::slitlet_up_factor, xsh_order::starty, XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_compute_flat_edges(), xsh_debug_level_get(), XSH_DEBUG_LEVEL_MEDIUM, xsh_detect_edges(), xsh_detect_max_y(), xsh_detect_slitlet_ratio(), XSH_FREE, xsh_free_polynomial(), xsh_free_propertylist(), xsh_free_table(), XSH_GET_TAG_FROM_LAMP, xsh_instrument_get_mode(), XSH_MODE_IFU, xsh_msg, xsh_msg_dbg_high, xsh_msg_dbg_medium, xsh_msg_error, XSH_NAME_LAMP_MODE_ARM, XSH_NEW_PROPERTYLIST, xsh_order_list_eval_int(), xsh_order_list_free(), xsh_order_list_get_endy(), xsh_order_list_get_starty(), xsh_order_list_load(), xsh_order_list_save(), XSH_ORDER_TAB_EDGES, xsh_polynomial_fit_1d_create(), xsh_pre_free(), xsh_pre_load(), XSH_REGDEBUG, xsh_unwrap_vector(), and y.
Referenced by xsh_combine_flats_and_detect_edges().
static void xsh_detect_slitlet_ratio | ( | double * | res_flux, | |
int | window_hsize, | |||
double | min_low, | |||
double | min_up, | |||
int | xlow, | |||
int | xup, | |||
double * | ratio_low, | |||
double * | ratio_up | |||
) | [static] |
Definition at line 863 of file xsh_detect_order.c.
References HALF_SLIC_WINDOW, size, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_detect_order_edge().
static void xsh_eval_y_avg_chunk | ( | xsh_pre * | pre, | |
int | xc, | |||
int | yc, | |||
int | chunk_y_hsize, | |||
int | x_hsize, | |||
const int | decode_bp, | |||
double * | flux, | |||
double * | noise | |||
) | [static] |
Evaluate by chunk in Y the total and mean flux and the corresponding errors around x,y input position.
[in] | pre | The image frame |
[in] | xc | The x center of chunk |
[in] | yc | The y center of chunk |
[in] | chunk_y_hsize | The half size of chunk in y |
[in] | x_hsize | The half size of window in which we do the |
[in] | decode_bp | bad pixel code |
[out] | flux | The flux of chunk (must be allocated) size x_hsize*2+1 |
[out] | noise | The errors associated to chunk (must be allocated) size x_hsize*2+1 |
Definition at line 567 of file xsh_detect_order.c.
References check, xsh_pre::data, xsh_pre::errs, xsh_pre::nx, nx, xsh_pre::ny, ny, xsh_pre::qual, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_detect_edges(), and xsh_detect_max_y().