26#ifndef XSH_DATA_WAVESOL_H
27#define XSH_DATA_WAVESOL_H
33#define XSH_SLIT_RANGE 1.2
35#define XSH_WAVESOL_TABLE_NB_COL 4
36#define XSH_WAVESOL_TABLE_NB_ROWS 2
37#define XSH_WAVESOL_TABLE_COLNAME_AXIS "AXIS"
38#define XSH_WAVESOL_TABLE_COLNAME_DEGLAMBDA "DEGLAMBDA"
39#define XSH_WAVESOL_TABLE_COLNAME_DEGORDER "DEGORDER"
40#define XSH_WAVESOL_TABLE_COLNAME_DEGSLIT "DEGSLIT"
94 double* posdata,
double *minpos,
double *maxpos,
double* lambda,
double*
order,
95 double* slit, cpl_polynomial* res);
97 double* new_pos,
double* lambda,
98 double*
order,
double* slit,
99 cpl_polynomial* result,
char axis) ;
static xsh_instrument * instrument
void xsh_wavesol_apply_shift(xsh_wavesol *wsol, float shift_x, float shift_y)
Apply a shift on X and Y to wave solution.
void xsh_wavesol_set_bin_y(xsh_wavesol *wsol, int bin)
Set the bin of wave table in y.
void xsh_wavesol_set_bin_x(xsh_wavesol *wsol, int bin)
Set the bin of wave table in x.
cpl_table * xsh_wavesol_trace(xsh_wavesol *wsol, double *lambda, double *order, double *slit, int size)
void xsh_wavesol_compute(xsh_wavesol *sol, int size, double *posdata, double *minpos, double *maxpos, double *lambda, double *order, double *slit, cpl_polynomial *res)
compute a wavelength solution
cpl_polynomial * xsh_wavesol_get_polx(xsh_wavesol *sol)
get the solution in X
void xsh_wavesol_dump(xsh_wavesol *wsol, const char *fname, int nb)
xsh_wavesol * xsh_wavesol_load(cpl_frame *frame, xsh_instrument *instrument)
load a wavelength solution
double xsh_wavesol_eval_poly(xsh_wavesol *sol, double lambda, double order, double slit)
eval the polynomial solution in Y
void xsh_wavesol_residual(xsh_wavesol *sol, xsh_wavesol *adj, int size, double *new_pos, double *lambda, double *order, double *slit, cpl_polynomial *result, char axis)
xsh_wavesol * xsh_wavesol_create(cpl_frame *spectral_format_frame, xsh_detect_arclines_param *p, xsh_instrument *instrument)
Create a new wavelength solution structure.
cpl_polynomial * xsh_wavesol_get_poly(xsh_wavesol *sol)
get the solution in Y
void xsh_wavesol_free(xsh_wavesol **w)
free wavelength solution structure
double xsh_wavesol_eval_polx(xsh_wavesol *sol, double lambda, double order, double slit)
eval the polynomial solution in X
enum wavesol_type xsh_wavesol_get_type(xsh_wavesol *wsol)
get the type of the wave table
void xsh_wavesol_set_type(xsh_wavesol *wsol, enum wavesol_type type)
set the type of the wave table
cpl_propertylist * xsh_wavesol_get_header(xsh_wavesol *sol)
get header of the table
xsh_wavesol * xsh_wavesol_duplicate(xsh_wavesol *org)
duplicate a wavelength solution structure
void xsh_wavesol_add_poly(xsh_wavesol *to, xsh_wavesol *from)
cpl_frame * xsh_wavesol_save(xsh_wavesol *w, cpl_table *trace, const char *filename, const char *tag)
save a wavelength solution
cpl_propertylist * header