CR2RE Pipeline Reference Manual 1.6.2
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 *, const cpl_polynomial *,
54 const cpl_polynomial *, int, int) ;
55
56cpl_polynomial * irplib_wlxcorr_best_poly(const cpl_vector *,
57 const cpl_bivector *, int, const cpl_polynomial *, const cpl_vector *,
58 int, double, double, double *, cpl_table **, cpl_vector **) ;
59
60/*
61TODO :
62 Merge irplib_wlxcorr_best_poly_prop() with irplib_wlxcorr_best_poly() by
63 adding a new parameter.
64 Need to coordinate with all pipelines.
65*/
66cpl_polynomial * irplib_wlxcorr_best_poly_prop(const cpl_vector * spectrum,
67 const cpl_bivector * lines_catalog,
68 int degree,
69 const cpl_polynomial * guess_poly,
70 const cpl_vector * wl_error,
71 int nsamples,
72 double slitw,
73 double fwhm,
74 double * xc,
75 cpl_table ** wlres,
76 cpl_vector ** xcorrs) ;
77
78cpl_table * irplib_wlxcorr_gen_spc_table(const cpl_vector *,
79 const cpl_bivector *, double, double, const cpl_polynomial *,
80 const cpl_polynomial *) ;
81cpl_bivector * irplib_wlxcorr_cat_extract(const cpl_bivector *, double, double);
82cpl_vector * irplib_wlxcorr_convolve_create_kernel(double, double) ;
83int irplib_wlxcorr_convolve(cpl_vector *,const cpl_vector *) ;
84
85
86cpl_error_code irplib_wlxcorr_vector_fill_line_spectrum(cpl_vector *,
87 const cpl_polynomial *,
88 const cpl_bivector *,
89 double, double, double,
90 int);
91
92#endif