26#ifndef XSH_DATA_ORDER_H
27#define XSH_DATA_ORDER_H
32#define XSH_ORDER_TABLE_COLNAME_ORDER "ORDER"
33#define XSH_ORDER_TABLE_COLNAME_ABSORDER "ABSORDER"
34#define XSH_ORDER_TABLE_COLNAME_CENTER "CENCOEF"
35#define XSH_ORDER_TABLE_COLNAME_EDGUP "EDGUPCOEF"
36#define XSH_ORDER_TABLE_COLNAME_EDGLO "EDGLOCOEF"
37#define XSH_ORDER_TABLE_COLNAME_SLICUP "SLICUPCOEF"
38#define XSH_ORDER_TABLE_COLNAME_SLICLO "SLICLOCOEF"
39#define XSH_ORDER_TABLE_DEGY "DEGY"
40#define XSH_ORDER_TABLE_COLNAME_STARTY "STARTY"
41#define XSH_ORDER_TABLE_COLNAME_ENDY "ENDY"
43#define XSH_ORDER_TABLE_COLNAME_CENTERX "CENTER_X"
44#define XSH_ORDER_TABLE_COLNAME_CENTERY "CENTER_Y"
45#define XSH_ORDER_TABLE_COLNAME_EDGUPX "EDG_UP_X"
46#define XSH_ORDER_TABLE_COLNAME_EDGUPY "EDG_UP_Y"
47#define XSH_ORDER_TABLE_COLNAME_EDGLOX "EDG_LO_X"
48#define XSH_ORDER_TABLE_COLNAME_EDGLOY "EDG_LO_Y"
49#define XSH_ORDER_TABLE_COLNAME_SLICLOX "SLIC_LO_X"
50#define XSH_ORDER_TABLE_COLNAME_SLICLOY "SLIC_LO_Y"
51#define XSH_ORDER_TABLE_COLNAME_SLICUPX "SLIC_UP_X"
52#define XSH_ORDER_TABLE_COLNAME_SLICUPY "SLIC_UP_Y"
137 const char* filename,
138 const char* tag,
const int ny);
148 double* posx,
double* posy,
int deg_poly);
154 cpl_frame* spectrum_format_frame, cpl_frame** qth_order_tab_frame,
static xsh_instrument * instrument
xsh_order_list * xsh_order_list_create(xsh_instrument *instr)
create an empty order list
void xsh_order_split_qth_d2(cpl_frame *order_tab_frame, cpl_frame *spectrum_format_frame, cpl_frame **qth_order_tab_frame, cpl_frame **d2_order_tab_frame, xsh_instrument *instr)
void xsh_order_list_set_bin_y(xsh_order_list *list, int bin)
Set the bin of image in y.
int xsh_order_list_get_index_by_absorder(xsh_order_list *list, double absorder)
void xsh_order_list_apply_shift(xsh_order_list *list, double xshift, double yshift)
Shift a order list.
cpl_frame * xsh_order_list_save(xsh_order_list *list, xsh_instrument *instrument, const char *filename, const char *tag, const int ny)
Save an order list to a frame.
void xsh_order_list_set_bin_x(xsh_order_list *list, int bin)
Set the bin of image in x.
int xsh_order_list_eval_int(xsh_order_list *list, cpl_polynomial *poly, double y)
Evaluate an order list poly but return the central pixel position rounding the polynomial.
xsh_order_list * xsh_order_list_load(cpl_frame *frame, xsh_instrument *instr)
load an order list from a frame
xsh_order_list * xsh_order_list_merge(xsh_order_list *lista, xsh_order_list *listb)
cpl_propertylist * xsh_order_list_get_header(xsh_order_list *list)
get header of the table
int xsh_order_list_get_starty(xsh_order_list *list, int i)
get position on Y axis of first pixel detected on order
void xsh_order_list_dump(xsh_order_list *list, const char *fname)
void xsh_order_list_fit(xsh_order_list *list, int size, double *vorderdata, double *posx, double *posy, int deg_poly)
fit the polynomial solution of given points
int xsh_order_list_get_endy(xsh_order_list *list, int i)
get position on Y axis of last pixel detected on order
int xsh_order_list_get_order(xsh_order_list *list, int absorder)
xsh_order_list * xsh_order_list_new(int size)
Create a new order list from size (no check)
void xsh_order_list_free(xsh_order_list **list)
free memory associated to an order_list
void xsh_order_list_verify(xsh_order_list *list, int ny)
double xsh_order_list_eval(xsh_order_list *list, cpl_polynomial *poly, double y)
Evaluate an order list poly.
xsh_instrument * instrument
cpl_propertylist * header
cpl_polynomial * edguppoly
cpl_polynomial * blazepoly
cpl_polynomial * edglopoly
cpl_polynomial * slicuppoly
cpl_polynomial * sliclopoly
void xsh_order_list_set_starty(xsh_order_list *list, int i, int starty)
void xsh_order_list_set_endy(xsh_order_list *list, int i, int endy)