High-Level Data Reduction Library: hdrl_mode.h Source File

High-Level Data Reduction Library 1.6.0 High-Level data reduction routines for ESO pipelines

Loading...
Searching...
No Matches
hdrl_mode.h
Go to the documentation of this file.
1/*
2 * This file is part of the HDRL
3 * Copyright (C) 2021 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_MODE_H
21#define HDRL_MODE_H
22
23
24/*-----------------------------------------------------------------------------
25 Include
26 -----------------------------------------------------------------------------*/
27
28#include "hdrl_mode_defs.h"
29#include "hdrl_parameter.h"
30#include <cpl.h>
31
32CPL_BEGIN_DECLS
33
34
35/*-----------------------------------------------------------------------------
36 Define
37 -----------------------------------------------------------------------------*/
38
39
40/*-----------------------------------------------------------------------------
41 Functions prototypes
42 -----------------------------------------------------------------------------*/
43
44cpl_parameterlist * hdrl_mode_parameter_create_parlist(
45 const char * base_context,
46 const char * prefix,
47 const hdrl_parameter * defaults);
48
49cpl_error_code hdrl_mode_parameter_parse_parlist(
50 const cpl_parameterlist * parlist,
51 const char * prefix,
52 double * histo_min,
53 double * histo_max,
54 double * bin_size,
55 hdrl_mode_type * method,
56 cpl_size * error_niter);
57
58
59cpl_error_code hdrl_mode_clip_image(
60 const cpl_image * source,
61 const double histo_min,
62 const double histo_max,
63 const double bin_size,
64 const hdrl_mode_type method,
65 const cpl_size error_niter,
66 double * mode,
67 double * mode_error,
68 cpl_size * naccepted);
69
70cpl_error_code hdrl_mode_clip(
71 cpl_vector * vec,
72 const double histo_min,
73 const double histo_max,
74 const double bin_size,
75 const hdrl_mode_type method,
76 const cpl_size error_niter,
77 double * mode,
78 double * mode_error,
79 cpl_size * naccepted);
80
81/*-----------------------------------------------------------------------------
82 Private declarations - must not be used outside of hdrl
83 -----------------------------------------------------------------------------*/
84#ifdef HDRL_USE_PRIVATE
85
86cpl_error_code
87 hdrl_mode_bootstrap(
88 const cpl_vector * vec,
89 const double histo_min,
90 const double histo_max,
91 const double bin_size,
92 const hdrl_mode_type method,
93 const cpl_size error_niter,
94 double * mode_error);
95
96
97#endif
98
99CPL_END_DECLS
100
101#endif /* HDRL_MODE_H */
102
hdrl_mode_clip
cpl_error_code hdrl_mode_clip(cpl_vector *vec, const double histo_min, const double histo_max, const double bin_size, const hdrl_mode_type method, const cpl_size error_niter, double *mode, double *mode_error, cpl_size *naccepted)
Compute mode of data.
Definition hdrl_mode.c:1137
hdrl_mode_parameter_create_parlist
CPL_BEGIN_DECLS cpl_parameterlist * hdrl_mode_parameter_create_parlist(const char *base_context, const char *prefix, const hdrl_parameter *defaults)
Create parameters for the mode collapse.
Definition hdrl_mode.c:89
hdrl_mode_clip_image
cpl_error_code hdrl_mode_clip_image(const cpl_image *source, const double histo_min, const double histo_max, const double bin_size, const hdrl_mode_type method, const cpl_size error_niter, double *mode, double *mode_error, cpl_size *naccepted)
Compute mode of data.
Definition hdrl_mode.c:1065
hdrl_mode_parameter_parse_parlist
cpl_error_code hdrl_mode_parameter_parse_parlist(const cpl_parameterlist *parlist, const char *prefix, double *histo_min, double *histo_max, double *bin_size, hdrl_mode_type *method, cpl_size *error_niter)
parse parameterlist for mode parameters to init corresponding hdrl structure parameters
Definition hdrl_mode.c:186
hdrl_mode_bootstrap
cpl_error_code hdrl_mode_bootstrap(const cpl_vector *vec, const double histo_min, const double histo_max, const double bin_size, const hdrl_mode_type method, const cpl_size error_niter, double *mode_error)
uses Montecarlo simulations based on the bootstrap technique to determine the error of the mode of th...
Definition hdrl_mode.c:1273
hdrl_mode_defs.h
hdrl_mode_type
hdrl_mode_type
Define the type of the mode that should be computed.
Definition hdrl_mode_defs.h:33
hdrl_parameter.h
hdrl_parameter
struct _hdrl_parameter_ hdrl_parameter
Definition hdrl_parameter.h:27