CR2RE Pipeline Reference Manual 1.6.2
hdrl_sigclip.h
1/*
2 * This file is part of the HDRL
3 * Copyright (C) 2012,2013 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, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef HDRL_SIGCLIP_H_
21#define HDRL_SIGCLIP_H_
22
23/*-----------------------------------------------------------------------------
24 Include
25 -----------------------------------------------------------------------------*/
26
27#include "hdrl_parameter.h"
28#include <cpl.h>
29
30CPL_BEGIN_DECLS
31
32/*-----------------------------------------------------------------------------
33 Functions prototypes
34 -----------------------------------------------------------------------------*/
35
36cpl_parameterlist * hdrl_sigclip_parameter_create_parlist(
37 const char * base_context,
38 const char * prefix,
39 const hdrl_parameter * defaults);
40
41cpl_error_code hdrl_sigclip_parameter_parse_parlist(
42 const cpl_parameterlist * parlist,
43 const char * prefix,
44 double * kappa_low,
45 double * kappa_high,
46 int * niter);
47
48cpl_parameterlist * hdrl_minmax_parameter_create_parlist(
49 const char * base_context,
50 const char * prefix,
51 const hdrl_parameter * defaults);
52
53cpl_error_code hdrl_minmax_parameter_parse_parlist(
54 const cpl_parameterlist * parlist,
55 const char * prefix,
56 double * nlow,
57 double * nhigh);
58
59cpl_error_code hdrl_kappa_sigma_clip_image(
60 const cpl_image * source,
61 const cpl_image * error,
62 const double kappa_low,
63 const double kappa_high,
64 const int iter,
65 double * mean_ks,
66 double * mean_ks_err,
67 cpl_size * naccepted,
68 double * reject_low,
69 double * reject_high);
70
71cpl_error_code hdrl_minmax_clip_image(
72 const cpl_image * source,
73 const cpl_image * error,
74 const double nlow,
75 const double nhigh,
76 double * mean_mm,
77 double * mean_mm_err,
78 cpl_size * naccepted,
79 double * reject_low,
80 double * reject_high);
81
82cpl_error_code hdrl_kappa_sigma_clip(
83 cpl_vector * vec,
84 cpl_vector * vec_err,
85 const double kappa_low,
86 const double kappa_high,
87 const int iter,
88 cpl_boolean inplace,
89 double * mean_ks,
90 double * mean_ks_err,
91 cpl_size * naccepted,
92 double * reject_low,
93 double * reject_high);
94
95cpl_error_code hdrl_minmax_clip(
96 cpl_vector * vec,
97 cpl_vector * vec_err,
98 const double nlow,
99 const double nhigh,
100 cpl_boolean inplace,
101 double * mean_mm,
102 double * mean_mm_err,
103 cpl_size * naccepted,
104 double * reject_low,
105 double * reject_high);
106
107
108CPL_END_DECLS
109
110#endif /* HDRL_SIGCLIP_H_ */