X-shooter Pipeline Reference Manual 3.8.15
xsh_data_arclist.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: 2012-06-21 07:39:48 $
23 * $Revision: 1.12 $
24 * $Name: not supported by cvs2svn $
25 */
26#ifndef XSH_DATA_ARCLIST_H
27#define XSH_DATA_ARCLIST_H
28
29#include <cpl.h>
30
31
32#define XSH_ARCLIST_TABLE_NB_COL 4
33#define XSH_ARCLIST_TABLE_COLNAME_WAVELENGTH "WAVELENGTH"
34#define XSH_ARCLIST_TABLE_UNIT_WAVELENGTH "none"
35#define XSH_ARCLIST_TABLE_COLNAME_NAME "NAME"
36#define XSH_ARCLIST_TABLE_UNIT_NAME "none"
37#define XSH_ARCLIST_TABLE_COLNAME_FLUX "FLUX"
38#define XSH_ARCLIST_TABLE_UNIT_FLUX "none"
39#define XSH_ARCLIST_TABLE_COLNAME_COMMENT "COMMENT"
40#define XSH_ARCLIST_TABLE_UNIT_COMMENT "none"
41
42typedef struct{
43 /* wavelength of arc line */
45 /* name of arc line*/
46 char* name;
47 /* value of flux */
48 int flux;
49 /* comment */
50 char* comment;
52
53
54typedef struct{
55 int size;
59 cpl_propertylist* header;
61
62xsh_arclist* xsh_arclist_load(cpl_frame* frame);
63void xsh_arcline_free(xsh_arcline** line);
64void xsh_arclist_free(xsh_arclist** list);
65void xsh_arclist_reject(xsh_arclist* l, int i);
66void xsh_arclist_restore(xsh_arclist* l, int i);
70int xsh_arclist_is_rejected(xsh_arclist* list, int idx);
72void xsh_arclist_clean_from_list( xsh_arclist* list, double* lambda, int size);
73void xsh_arclist_clean_from_list_not_flagged( xsh_arclist* list, double* lambda, int* flag, int size);
74cpl_propertylist* xsh_arclist_get_header(xsh_arclist* list);
76cpl_frame* xsh_arclist_save(xsh_arclist* list,const char* filename,const char* tag);
77void xsh_dump_arclist( xsh_arclist* list ) ;
78#endif /* XSH_ARCLIST_H */
void xsh_arclist_lambda_sort(xsh_arclist *list)
sort arcline list by increasing lambda
void xsh_dump_arclist(xsh_arclist *list)
Dump main info about an arcline_list.
void xsh_arclist_clean_from_list_not_flagged(xsh_arclist *list, double *lambda, int *flag, int size)
float xsh_arclist_get_wavelength(xsh_arclist *l, int i)
get wavelength of a line in the arcline list
void xsh_arclist_clean(xsh_arclist *list)
void xsh_arclist_clean_from_list(xsh_arclist *list, double *lambda, int size)
Clean an arclist according to a list of valid lambda.
int xsh_arclist_get_nbrejected(xsh_arclist *l)
get nb lines rejected in arcline list
void xsh_arclist_free(xsh_arclist **list)
free memory associated to a arclist
void xsh_arclist_restore(xsh_arclist *l, int i)
restore a line from the list
int xsh_arclist_get_size(xsh_arclist *list)
get size of arcline list
void xsh_arclist_reject(xsh_arclist *l, int i)
reject a line from the list
xsh_arclist * xsh_arclist_load(cpl_frame *frame)
load an arcline list frame in arclist structure
void xsh_arcline_free(xsh_arcline **line)
free memory associated to a arcline
int xsh_arclist_is_rejected(xsh_arclist *list, int idx)
give if a line is rejected
cpl_propertylist * xsh_arclist_get_header(xsh_arclist *list)
get header of the table
cpl_frame * xsh_arclist_save(xsh_arclist *list, const char *filename, const char *tag)
save a arclist to a frame
int size
cpl_propertylist * header
xsh_arcline ** list