X-shooter Pipeline Reference Manual 3.8.15
xsh_data_dispersol.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: 2011-12-02 14:15:28 $
23 * $Revision: 1.10 $
24 * $Name: not supported by cvs2svn $
25 */
26#ifndef XSH_DATA_DISPERSOL_H
27#define XSH_DATA_DISPERSOL_H
28
29#include <cpl.h>
30#include <xsh_data_instrument.h>
31#include <xsh_data_pre.h>
32
33#define XSH_DISPERSOL_TABLE_NBCOL 4
34#define XSH_DISPERSOL_TABLE_COLNAME_AXIS "AXIS"
35#define XSH_DISPERSOL_TABLE_COLNAME_ORDER "ORDER"
36#define XSH_DISPERSOL_TABLE_COLNAME_DEGX "DEGX"
37#define XSH_DISPERSOL_TABLE_COLNAME_DEGY "DEGY"
38#define XSH_DISPERSOL_AXIS_SLIT "SLIT"
39#define XSH_DISPERSOL_AXIS_LAMBDA "LAMBDA"
40typedef struct{
41 int absorder; /* absolute index of order */
42 cpl_polynomial *lambda_poly;
43 cpl_polynomial *slit_poly;
45
46
47typedef struct{
48 int size;
49 int degx; /* degree of 2D polynomial in X */
50 int degy; /* degree of 2D polynomial in Y */
51 int binx;
52 int biny;
54 cpl_propertylist *header;
56
57
59xsh_dispersol_list_new( int size, int deg_x, int deg_y,
60 xsh_instrument *instr);
61
63xsh_dispersol_list_load( cpl_frame *frame, xsh_instrument *instr);
64
65void
67 int idx,
68 int absorder,
69 cpl_polynomial *lambda_poly,
70 cpl_polynomial *slit_poly);
71
72cpl_frame*
74 cpl_frame *order_frame,
75 xsh_pre *pre,
76 xsh_instrument *instr,
77 const char* tag);
78
79cpl_frame*
81 cpl_frame *order_frame,
82 xsh_pre *pre,
83 xsh_instrument *instr,
84 const char* tag);
85
87 cpl_polynomial *poly, cpl_vector *pos);
88
89void
91
92cpl_frame* xsh_dispersol_list_save( xsh_dispersol_list *list,const char* tag);
93
94#endif /* XSH_DISPERSOL_H */
cpl_frame * xsh_dispersol_list_save(xsh_dispersol_list *list, const char *tag)
Save a dispersion list on the disk.
void xsh_dispersol_list_add(xsh_dispersol_list *list, int idx, int absorder, cpl_polynomial *lambda_poly, cpl_polynomial *slit_poly)
Add a dispersion solution in the list.
xsh_dispersol_list * xsh_dispersol_list_load(cpl_frame *frame, xsh_instrument *instr)
Load a dispersion list from a frame.
void xsh_dispersol_list_free(xsh_dispersol_list **list)
Free the dispersion list.
cpl_frame * xsh_dispersol_list_to_slitmap(xsh_dispersol_list *list, cpl_frame *order_frame, xsh_pre *pre, xsh_instrument *instr, const char *tag)
Save a SLIT MAP image.
double xsh_dispersol_list_eval(xsh_dispersol_list *list, cpl_polynomial *poly, cpl_vector *pos)
Evaluate the polynomial according the binning.
xsh_dispersol_list * xsh_dispersol_list_new(int size, int deg_x, int deg_y, xsh_instrument *instr)
Create a new dispersion solution list.
cpl_frame * xsh_dispersol_list_to_wavemap(xsh_dispersol_list *list, cpl_frame *order_frame, xsh_pre *pre, xsh_instrument *instr, const char *tag)
Save a WAVE MAP image.
int size
cpl_propertylist * header
xsh_dispersol * list
cpl_polynomial * slit_poly
cpl_polynomial * lambda_poly