X-shooter Pipeline Reference Manual 3.8.15
xsh_data_wavemap.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-11-13 11:12:50 $
23 * $Revision: 1.19 $
24 */
25#ifndef XSH_DATA_WAVEMAP_H
26#define XSH_DATA_WAVEMAP_H
27
28#include <cpl.h>
29#include <xsh_data_instrument.h>
30
31#define XSH_WAVEMAP_TABLE_NB_UVB_ORDERS 11
32#define XSH_WAVEMAP_TABLE_NB_VIS_ORDERS 14
33#define XSH_WAVEMAP_TABLE_NB_NIR_ORDERS 16
34
35typedef struct {
36 double lambda;
37 double slit;
38 float flux ;
39 float sigma ;
40 int ix;
41 int iy;
42 int qual;
43 double fitted ;
44 double fit_err ;
46
47typedef struct{
48 int order ;
53 double lambda_min, lambda_max ;
57 cpl_polynomial *pol_lambda;
58 cpl_polynomial *pol_slit;
59 cpl_polynomial *tcheb_pol_lambda;
60 double xmin, xmax, ymin, ymax;
62
63typedef struct{
68 int size;
69 int degx, degy ;
72 cpl_propertylist * header;
74
75cpl_error_code
77 xsh_instrument * instr,
78 const int iter);
79
80cpl_error_code
82 xsh_instrument * instr,
83 const int abs_ord, const int sid,const int iter);
84
85
87 xsh_instrument * instr,
88 const char * prefix);
89
91
93
94void xsh_wavemap_list_dump( xsh_wavemap_list * list, const char * fname ) ;
95
97 int ordnum, int ndata ) ;
98
99void xsh_wavemap_list_compute( double * vlambda, double * xpos, double * ypos,
100 int nitems, double * orders,
101 xsh_dispersol_param * dispsol_param,
102 xsh_wavemap_list * wmap ) ;
103
104void xsh_wavemap_list_compute_poly( double * vlambda, double *vslit,
105 double * xpos, double * ypos,
106 int nitems, double * orders,
107 xsh_dispersol_param * dispsol_param,
108 xsh_wavemap_list * wmap );
109
111 cpl_frame * order_frame,
112 xsh_pre * pre,
113 xsh_instrument * instr, const char * fname,
114 cpl_frame **dispersol_frame, cpl_frame **slitmap_frame);
115
116cpl_frame * xsh_wavemap_list_save( xsh_wavemap_list * wmap,
117 cpl_frame * order_frame,
118 xsh_pre * pre,
119 xsh_instrument * instr, const char * fname);
120
121cpl_frame * xsh_wavemap_list_save2( xsh_wavemap_list * wmap,
122 xsh_order_list * order_list,
123 xsh_pre * pre,
124 xsh_instrument * instr, const char * prefix);
125#endif /* XSH_DATA_WAVEMAP_H */
void xsh_wavemap_list_compute_poly(double *vlambda, double *vslit, double *xpos, double *ypos, int nitems, double *orders, xsh_dispersol_param *dispsol_param, xsh_wavemap_list *wmap)
compute a wave-map-list
void xsh_wavemap_list_dump(xsh_wavemap_list *list, const char *fname)
Dump main info about a rec table (for each order of the list)
void xsh_wavemap_list_free(xsh_wavemap_list **list)
free memory associated to a wavemap_list
cpl_frame * xsh_wavemap_list_save_poly(xsh_wavemap_list *wmap, cpl_frame *order_frame, xsh_pre *pre, xsh_instrument *instr, const char *fname, cpl_frame **dispersol_frame, cpl_frame **slitmap_frame)
Save the wave_map slit_map and disp_tab.
cpl_error_code xsh_wavemap_list_sky_image_save(xsh_wavemap_list *smap, xsh_instrument *instr, const int abs_ord, const int sid, const int iter)
cpl_error_code xsh_wavemap_list_object_image_save(xsh_wavemap_list *omap, xsh_instrument *instr, const int iter)
cpl_frame * xsh_wavemap_list_save2(xsh_wavemap_list *wmap, xsh_order_list *order_list, xsh_pre *pre, xsh_instrument *instr, const char *prefix)
void xsh_wavemap_list_compute(double *vlambda, double *xpos, double *ypos, int nitems, double *orders, xsh_dispersol_param *dispsol_param, xsh_wavemap_list *wmap)
compute a wave-map-list
cpl_error_code xsh_wavemap_list_save4debug(xsh_wavemap_list *wmap, xsh_instrument *instr, const char *prefix)
void xsh_wavemap_list_set_max_size(xsh_wavemap_list *list, int idx, int ordnum, int ndata)
set max size of wavemap
xsh_wavemap_list * xsh_wavemap_list_create(xsh_instrument *instr)
create an empty order list
cpl_frame * xsh_wavemap_list_save(xsh_wavemap_list *wmap, cpl_frame *order_frame, xsh_pre *pre, xsh_instrument *instr, const char *fname)
xsh_instrument * instrument
xsh_wavemap * list
cpl_propertylist * header
wavemap_item * sky
cpl_polynomial * pol_lambda
cpl_polynomial * pol_slit
wavemap_item * all
cpl_polynomial * tcheb_pol_lambda
wavemap_item * object