CR2RE Pipeline Reference Manual 1.7.0
irplib_wlxcorr.h
1/* $Id: irplib_wlxcorr.h,v 1.22 2013-01-29 08:43:33 jtaylor Exp $
2 *
3 * This file is part of the IRPLIB package
4 * Copyright (C) 2002,2003 European Southern Observatory
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
19 */
20
21/*
22 * $Author: jtaylor $
23 * $Date: 2013-01-29 08:43:33 $
24 * $Revision: 1.22 $
25 * $Name: not supported by cvs2svn $
26 */
27
28#ifndef IRPLIB_WLXCORR_H
29#define IRPLIB_WLXCORR_H
30
31/*-----------------------------------------------------------------------------
32 Include
33 -----------------------------------------------------------------------------*/
34
35#include <cpl.h>
36
37/*-----------------------------------------------------------------------------
38 Define
39 -----------------------------------------------------------------------------*/
40
41/* The 4 columns of the table */
42#define IRPLIB_WLXCORR_COL_WAVELENGTH "Wavelength"
43#define IRPLIB_WLXCORR_COL_CAT_INIT "Catalog Initial"
44#define IRPLIB_WLXCORR_COL_CAT_FINAL "Catalog Corrected"
45#define IRPLIB_WLXCORR_COL_OBS "Observed"
46
47/*-----------------------------------------------------------------------------
48 Functions prototypes
49 -----------------------------------------------------------------------------*/
50
51int irplib_wlxcorr_plot_spc_table(const cpl_table *, const char *, int, int);
52int irplib_wlxcorr_catalog_plot(const cpl_bivector *, double, double);
53int irplib_wlxcorr_plot_solution(const cpl_polynomial *,
54 const cpl_polynomial *,
55 const cpl_polynomial *,
56 int,
57 int);
58
59cpl_polynomial *irplib_wlxcorr_best_poly(const cpl_vector *,
60 const cpl_bivector *,
61 int,
62 const cpl_polynomial *,
63 const cpl_vector *,
64 int,
65 double,
66 double,
67 double *,
68 cpl_table **,
69 cpl_vector **);
70
71/*
72TODO :
73 Merge irplib_wlxcorr_best_poly_prop() with irplib_wlxcorr_best_poly() by
74 adding a new parameter.
75 Need to coordinate with all pipelines.
76*/
77cpl_polynomial *irplib_wlxcorr_best_poly_prop(const cpl_vector *spectrum,
78 const cpl_bivector *lines_catalog,
79 int degree,
80 const cpl_polynomial *guess_poly,
81 const cpl_vector *wl_error,
82 int nsamples,
83 double slitw,
84 double fwhm,
85 double *xc,
86 cpl_table **wlres,
87 cpl_vector **xcorrs);
88
89cpl_table *irplib_wlxcorr_gen_spc_table(const cpl_vector *,
90 const cpl_bivector *,
91 double,
92 double,
93 const cpl_polynomial *,
94 const cpl_polynomial *);
95cpl_bivector *irplib_wlxcorr_cat_extract(const cpl_bivector *, double, double);
96cpl_vector *irplib_wlxcorr_convolve_create_kernel(double, double);
97int irplib_wlxcorr_convolve(cpl_vector *, const cpl_vector *);
98
99
100cpl_error_code irplib_wlxcorr_vector_fill_line_spectrum(cpl_vector *,
101 const cpl_polynomial *,
102 const cpl_bivector *,
103 double,
104 double,
105 double,
106 int);
107
108#endif