28#include "cr2res_utils.h"
54 const cpl_table * trace,
55 int * nb_order_idx_values) ;
58 const cpl_table * trace_wave1,
59 const cpl_table * trace_wave2) ;
62 const cpl_table * trace_wave,
63 const char * poly_column,
68 const cpl_table * trace_wave,
74 const cpl_table * trace_wave,
79 const cpl_table * trace_wave,
83 const cpl_table * trace_wave,
92 const cpl_table * trace,
98 const cpl_table * trace,
103 cpl_polynomial * trace1,
104 cpl_polynomial * trace2,
108 cpl_polynomial * trace1,
109 cpl_polynomial * trace2,
113 const cpl_table * traces,
122 const cpl_table * traces,
123 const cpl_array * new_slit_fraction) ;
126cpl_table * cr2res_trace_adjust(
127 const cpl_table * trace_wave,
128 const cpl_frameset * flat_raw,
133 const cpl_array * slit_frac,
137 cr2res_decker decker_position,
141 cpl_table * trace_wave,
146 const cpl_table * tw,
147 const char * setting,
150cpl_table * cr2res_trace_shift_wavelength(
152 double old_slit_fraction,
cpl_vector * cr2res_trace_get_ycen(const cpl_table *trace, int order_idx, int trace_nb, int size)
Retrieves the middle (All) polynomial from trace table and evaluates.
cpl_vector * cr2res_trace_compute_middle(cpl_polynomial *trace1, cpl_polynomial *trace2, int vector_size)
Computes the positions between 2 trace polynomials.
cpl_table * cr2res_trace_filter(const cpl_table *tw, const char *setting, int zp_order)
Only keep the predefined orders of the setting.
cpl_image * cr2res_trace_gen_image(cpl_table *trace, int nx, int ny)
Make an image out of the trace solution.
cpl_size cr2res_get_nb_traces(const cpl_table *trace_wave, int order_idx)
Get the number of traces for a specified order_idx.
double cr2res_trace_get_trace_ypos(const cpl_table *traces, int idx)
Compute the y position of the trace.
int cr2res_trace_get_height(const cpl_table *trace, cpl_size order_idx, cpl_size trace_nb)
Computes the average height (pix) of an order, from trace polys.
cpl_table * cr2res_trace_split(cpl_table *trace_wave, int order_idx, int nb_subtraces)
Splits full slit traces into several sub traces.
cr2res_decker cr2res_trace_slit_fraction_info(const cpl_array *slit_frac, int *up_or_down)
Get a standard slit fraction information.
cpl_table * cr2res_trace(cpl_image *ima, int smooth_x, int smooth_y, double threshold, int opening, int degree, int min_cluster)
Main function for running all parts of the trace algorithm.
cpl_size cr2res_get_trace_table_index(const cpl_table *trace_wave, int order_idx, int trace_nb)
Get the index in a TRACE_WAVE table.
cpl_table * cr2res_trace_new_slit_fraction(const cpl_table *traces, const cpl_array *new_slit_fraction)
Recompute the traces at a newly specified slit fraction.
int cr2res_trace_compute_height(cpl_polynomial *trace1, cpl_polynomial *trace2, int vector_size)
Computes extraction height between 2 trace polynomials.
int * cr2res_get_trace_numbers(const cpl_table *trace_wave, int order_idx, int *nb_traces)
Get the trace numbers for a specified order_idx.
cpl_polynomial * cr2res_get_trace_wave_poly(const cpl_table *trace_wave, const char *poly_column, int order_idx, int trace_nb)
Get a polynomial from a TRACE_WAVE table.
cpl_vector * cr2res_trace_get_wl(const cpl_table *trace_wave, int order_idx, int trace_nb, int size)
Get the Wavelength vector from a TRACE_WAVE table.
cpl_mask * cr2res_trace_clean(cpl_mask *mask, int opening, int min_cluster)
Clean small blobs.
int cr2res_trace_add_extra_columns(cpl_table *traces, const char *infile, int det_nr)
Add extra columns to the plain trace table.
int * cr2res_trace_get_order_idx_values(const cpl_table *trace, int *nb_order_idx_values)
Count and return the different order_idx values from a TW table.
cpl_array * cr2res_trace_slit_fraction_create(cr2res_decker decker_position, int up_or_down)
Get a standard slit fraction.
cpl_table * cr2res_trace_merge(const cpl_table *trace_wave1, const cpl_table *trace_wave2)
Merge 2 trace_wave tables.