X-shooter Pipeline Reference Manual 3.8.15
xsh_data_the_map.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.15 $
24 * $Name: not supported by cvs2svn $
25 */
26#ifndef XSH_DATA_THE_MAP_H
27#define XSH_DATA_THE_MAP_H
28
29#include <cpl.h>
30
31#define XSH_THE_MAP_TABLE_NB_COL 6
32#define XSH_THE_MAP_TABLE_COLNAME_WAVELENGTH "Wavelength"
33#define XSH_THE_MAP_TABLE_UNIT_WAVELENGTH "nm"
34#define XSH_THE_MAP_TABLE_COLNAME_ORDER "Order"
35#define XSH_THE_MAP_TABLE_UNIT_ORDER "none"
36#define XSH_THE_MAP_TABLE_COLNAME_SLITPOSITION "slit_position"
37#define XSH_THE_MAP_TABLE_UNIT_SLITPOSITION "arcsec"
38#define XSH_THE_MAP_TABLE_COLNAME_SLITINDEX "slit_index"
39#define XSH_THE_MAP_TABLE_UNIT_SLITINDEX "none"
40#define XSH_THE_MAP_TABLE_COLNAME_DETECTORX "detector_x"
41#define XSH_THE_MAP_TABLE_UNIT_DETECTORX "pixel"
42#define XSH_THE_MAP_TABLE_COLNAME_DETECTORY "detector_y"
43#define XSH_THE_MAP_TABLE_UNIT_DETECTORY "pixel"
44
45typedef struct{
46 /* wavelength of arc lines */
48 /* order */
49 int order;
50 /* slit position */
52 /* slit index */
54 /* given pixel position along X axis */
55 double detector_x;
56 /* given pixel position along Y axis */
57 double detector_y;
59
60
61typedef struct{
62 int size;
64 cpl_propertylist * header ;
66
68xsh_the_map* xsh_the_map_load(cpl_frame* frame);
70void xsh_the_map_free(xsh_the_map** list);
71
72void xsh_the_map_set_arcline( xsh_the_map* list, int idx, float wavelength,
73 int order, int slit_index, float slit_position, double detx, double dety);
74
76double xsh_the_map_get_detx(xsh_the_map* list, int idx);
77double xsh_the_map_get_dety(xsh_the_map* list, int idx);
78int xsh_the_map_get_slit_index( xsh_the_map* list, int idx);
79float xsh_the_map_get_wavelength(xsh_the_map* list, int idx);
80int xsh_the_map_get_order(xsh_the_map* list, int idx);
81float xsh_the_map_get_slit_position( xsh_the_map* list, int idx);
82
83cpl_frame* xsh_the_map_save(xsh_the_map* list,const char* filename);
86void xsh_dump_the_map( xsh_the_map* list ) ;
87
88#endif /* XSH_THE_MAP_H */
void xsh_the_map_free(xsh_the_map **list)
free memory associated to a the_map
double xsh_the_map_get_detx(xsh_the_map *list, int idx)
get detx of the map list
float xsh_the_map_get_slit_position(xsh_the_map *list, int idx)
get slit position of the map list
int xsh_the_map_get_slit_index(xsh_the_map *list, int idx)
get slit position of the map list
void xsh_dump_the_map(xsh_the_map *list)
Dump main info about the_map.
double xsh_the_map_get_dety(xsh_the_map *list, int idx)
get dety of the map list
void xsh_the_map_set_arcline(xsh_the_map *list, int idx, float wavelength, int order, int slit_index, float slit_position, double detx, double dety)
void xsh_the_map_lambda_sort(xsh_the_map *list)
sort the_map arcline list by increasing lambda
int xsh_the_map_get_order(xsh_the_map *list, int idx)
get order of the map list
int xsh_the_map_get_size(xsh_the_map *list)
get size of the map list
void xsh_the_arcline_free(xsh_the_arcline **arc)
free memory associated to a the_arcline
void xsh_the_map_lambda_order_slit_sort(xsh_the_map *list)
xsh_the_map * xsh_the_map_create(int size)
Create an empty theoretical map.
float xsh_the_map_get_wavelength(xsh_the_map *list, int idx)
get wavelength of the map list
xsh_the_map * xsh_the_map_load(cpl_frame *frame)
load a theoretical map frame in the_map structure. Suppress spurious entries in the THE MAP (marked w...
cpl_frame * xsh_the_map_save(xsh_the_map *list, const char *filename)
save a the_map to a frame
int size
cpl_propertylist * header
xsh_the_arcline ** list
int order
Definition: xsh_detmon_lg.c:80