UVES Pipeline Reference Manual
5.4.0
Main Page
Modules
Data Structures
Files
File List
uves
uves_utils_polynomial.h
1
/*
2
* This file is part of the ESO UVES Pipeline
3
* Copyright (C) 2004,2005 European Southern Observatory
4
*
5
* This program 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-08 13:54:13 $
23
* $Revision: 1.25 $
24
* $Name: not supported by cvs2svn $
25
* $Log: not supported by cvs2svn $
26
* Revision 1.24 2010/09/24 09:32:09 amodigli
27
* put back QFITS dependency to fix problem spot by NRI on FIBER mode (with MIDAS calibs) data
28
*
29
* Revision 1.22 2007/09/11 17:08:49 amodigli
30
* mooved uves_polynomial_convert_from_plist_midas to uves_dfs
31
*
32
* Revision 1.21 2007/06/20 08:30:03 amodigli
33
* added index parameter to support FIBER mode lintab in uves_polynomial_convert_from_plist_midas
34
*
35
* Revision 1.20 2007/06/06 08:17:33 amodigli
36
* replace tab with 4 spaces
37
*
38
* Revision 1.19 2007/05/03 15:18:31 jmlarsen
39
* Added function to add polynomials
40
*
41
* Revision 1.18 2007/04/24 12:50:29 jmlarsen
42
* Replaced cpl_propertylist -> uves_propertylist which is much faster
43
*
44
* Revision 1.17 2007/03/19 15:04:57 jmlarsen
45
* Added get_degree function
46
*
47
* Revision 1.16 2007/03/05 10:20:51 jmlarsen
48
* Added uves_polynomial_delete_const()
49
*
50
* Revision 1.15 2006/08/17 13:56:53 jmlarsen
51
* Reduced max line length
52
*
53
* Revision 1.14 2006/04/24 09:28:29 jmlarsen
54
* Added function to create zero-polynomial
55
*
56
* Revision 1.13 2005/12/19 16:17:56 jmlarsen
57
* Replaced bool -> int
58
*
59
*/
60
#ifndef UVES_UTILS_POLYNOMIAL_H
61
#define UVES_UTILS_POLYNOMIAL_H
62
63
/*-----------------------------------------------------------------------------
64
Includes
65
-----------------------------------------------------------------------------*/
66
67
#include <uves_propertylist.h>
68
#include <cpl.h>
69
#include <uves_cpl_size.h>
70
/*-----------------------------------------------------------------------------
71
Typedefs
72
-----------------------------------------------------------------------------*/
73
74
typedef
struct
_polynomial
polynomial
;
75
76
/*-----------------------------------------------------------------------------
77
Prototypes
78
-----------------------------------------------------------------------------*/
79
80
81
polynomial
*
uves_polynomial_new
(
const
cpl_polynomial *
pol
);
82
polynomial
*
uves_polynomial_new_zero
(
int
dim);
83
polynomial
*
uves_polynomial_duplicate
(
const
polynomial
*p);
84
85
86
polynomial
*
uves_polynomial_convert_from_table
(cpl_table *t);
87
polynomial
*
uves_polynomial_collapse
(
const
polynomial
*p,
int
varno,
double
value);
88
polynomial
*
uves_polynomial_fit_1d
(
const
cpl_vector * x_pos,
89
const
cpl_vector * values,
90
const
cpl_vector * sigmas,
91
int
poly_deg,
92
double
* mse);
93
polynomial
*
uves_polynomial_fit_2d
(
const
cpl_bivector * xy_pos,
94
const
cpl_vector * values,
95
const
cpl_vector * sigmas,
96
int
poly_deg1,
97
int
poly_deg2,
98
double
* mse,
99
double
* red_chisq,
100
polynomial
** variance);
101
102
polynomial
*
uves_polynomial_add_2d
(
const
polynomial
*p1,
const
polynomial
*p2);
103
104
int
uves_polynomial_get_degree
(
const
polynomial
*p);
105
106
void
uves_polynomial_delete
(
polynomial
**p);
107
void
uves_polynomial_delete_const
(
const
polynomial
**p);
108
109
cpl_table *
uves_polynomial_convert_to_table
(
const
polynomial
*p);
110
int
uves_polynomial_get_dimension
(
const
polynomial
*p);
111
void
uves_polynomial_dump
(
const
polynomial
*p, FILE *stream);
112
cpl_error_code
uves_polynomial_shift
(
polynomial
*p,
int
varno,
double
shift
);
113
cpl_error_code
uves_polynomial_rescale
(
polynomial
*p,
int
varno,
double
scale
);
114
double
uves_polynomial_get_coeff_1d
(
const
polynomial
*p,
int
degree);
115
double
uves_polynomial_get_coeff_2d
(
const
polynomial
*p,
116
int
degree1,
int
degree2);
117
double
uves_polynomial_evaluate_1d
(
const
polynomial
*p,
double
x);
118
double
uves_polynomial_evaluate_2d
(
const
polynomial
*p,
double
x1,
double
x2);
119
double
uves_polynomial_solve_1d
(
const
polynomial
*p,
double
value,
120
double
guess,
int
multiplicity);
121
double
uves_polynomial_solve_2d
(
const
polynomial
*p,
double
value,
122
double
guess,
int
multiplicity,
123
int
varno,
double
x_value);
124
double
uves_polynomial_derivative_1d
(
const
polynomial
*p,
double
x);
125
double
uves_polynomial_derivative_2d
(
const
polynomial
*p,
double
x1,
126
double
x2,
int
varno);
127
cpl_error_code
uves_polynomial_derivative
(
polynomial
*p,
int
varno);
128
129
#endif
Generated by
1.8.1.1