X-shooter Pipeline Reference Manual 3.8.15
xsh_data_order_resid_tab.h
Go to the documentation of this file.
1/* *
2 * This file is part of the ESO X-shooter Pipeline *
3 * Copyright (C) 2006 European Southern Observatory *
4 * *
5 * This library is/ free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA *
18 * */
19
20/*
21 * $Author: amodigli $
22 * $Date: 2009-12-30 15:03:39 $
23 * $$
24*/
25#ifndef XSH_DATA_ORDER_RESID_TAB_H
26#define XSH_DATA_ORDER_RESID_TAB_H
27
28#include <cpl.h>
29#include <xsh_data_order.h>
30
31#define XSH_RESID_ORDER_TABLE_NB_COL 4
32
33#define XSH_RESID_ORDER_TABLE_COLNAME_ORDER "Order"
34#define XSH_RESID_ORDER_TABLE_UNIT_ORDER "none"
35
36#define XSH_RESID_ORDER_TABLE_COLNAME_POSX "X"
37#define XSH_RESID_ORDER_TABLE_UNIT_POSX "pixel"
38#define XSH_RESID_ORDER_TABLE_COLNAME_POSY "Y"
39#define XSH_RESID_ORDER_TABLE_UNIT_POSY "pixel"
40
41#define XSH_RESID_ORDER_TABLE_COLNAME_RESX "RESX"
42#define XSH_RESID_ORDER_TABLE_UNIT_RESX "pixel"
43
44#define XSH_RESID_ORDER_TABLE_COLNAME_POLX "POLX"
45#define XSH_RESID_ORDER_TABLE_UNIT_POLX "pixel"
46
47/* get property PROPERTY of type TYPE from OBJECT */
48#define PROPERTY_GET( OBJECT, PROPERTY, TYPE, DEFAULT)\
49TYPE OBJECT##_get_##PROPERTY( OBJECT* obj)\
50{\
51 TYPE result = DEFAULT;\
52\
53 XSH_ASSURE_NOT_NULL( obj);\
54 result = obj->PROPERTY;\
55\
56 cleanup:\
57 return result;\
58}
59
60/* get property PROPERTY of type TYPE from resid_tab */
61#define RESID_ORDER_PROPERTY_GET( PROPERTY, TYPE, DEFAULT)\
62 PROPERTY_GET( xsh_resid_tab, PROPERTY, TYPE, DEFAULT)
63
64typedef struct{
65 int size ;
66 double residmin ;
67 double residmax ;
68 double residavg ;
69 double residrms ;
70
71 double residmin_sel ;
72 double residmax_sel ;
73 double residavg_sel ;
74 double residrms_sel ;
75
76 /* order */
77 int * order;
78 double * pos_x;
79 double * pos_y;
80 double * res_x;
81 double * pol_x;
82 cpl_propertylist* header;
84
86 double * posx, double * posy,
87 double * resx, double* polx ) ;
88
89xsh_resid_order_tab * xsh_resid_order_load( cpl_frame* resid_tab_frame);
90
92
93
94cpl_frame * xsh_resid_order_save( xsh_resid_order_tab * resid,
95 const char* filename,
97 ORDERPOS_QC_PARAM* ord_qc_param,
98 const char* tag);
99cpl_table *
102 ORDERPOS_QC_PARAM* ord_qc_param);
103
104#endif /* XSH_DATA_RESID_TAB_H */
static xsh_instrument * instrument
xsh_resid_order_tab * xsh_resid_order_create(int size, int *orders, double *posx, double *posy, double *resx, double *polx)
Create a residual tab structure.
void xsh_resid_order_free(xsh_resid_order_tab **resid)
Free memory associated to a resid_tab.
cpl_table * xsh_resid_order_2tab(xsh_resid_order_tab *resid, xsh_instrument *instrument, ORDERPOS_QC_PARAM *ord_qc_param)
convert a residual tab structure to a cpl_table
xsh_resid_order_tab * xsh_resid_order_load(cpl_frame *resid_tab_frame)
Load a residual tab from a frame.
cpl_frame * xsh_resid_order_save(xsh_resid_order_tab *resid, const char *filename, xsh_instrument *instrument, ORDERPOS_QC_PARAM *ord_qc_param, const char *tag)
Save a residual tab to a frame.
int size