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

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

Loading...
Searching...
No Matches
hdrl_overscan.h
Go to the documentation of this file.
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_OVERSCAN_H
21#define HDRL_OVERSCAN_H
22
23/*-----------------------------------------------------------------------------
24 Include
25 -----------------------------------------------------------------------------*/
26
27#include "hdrl_utils.h"
28#include "hdrl_image.h"
29
30#include <cpl.h>
31
32CPL_BEGIN_DECLS
33
34/*-----------------------------------------------------------------------------
35 Define
36 -----------------------------------------------------------------------------*/
37
38#define HDRL_OVERSCAN_FULL_BOX -1
39 typedef struct _hdrl_overscan_compute_result_ hdrl_overscan_compute_result;
40 typedef struct _hdrl_overscan_correct_result_ hdrl_overscan_correct_result;
41
42/*-----------------------------------------------------------------------------
43 Functions prototypes
44 -----------------------------------------------------------------------------*/
45
46/*----------------------------------------------------------------------------
47 Overscan Computation Parameters
48 ----------------------------------------------------------------------------*/
49 hdrl_parameter * hdrl_overscan_parameter_create(hdrl_direction, double, int,
50 hdrl_parameter *, hdrl_parameter *) ;
51cpl_error_code hdrl_overscan_parameter_verify(const hdrl_parameter *,
52 cpl_size, cpl_size) ;
53cpl_boolean hdrl_overscan_parameter_check(const hdrl_parameter *) ;
54
55/* Accessors */
56 hdrl_direction hdrl_overscan_parameter_get_correction_direction(
57 const hdrl_parameter *) ;
58 double hdrl_overscan_parameter_get_ccd_ron(const hdrl_parameter *) ;
59 int hdrl_overscan_parameter_get_box_hsize(const hdrl_parameter *) ;
60 hdrl_parameter * hdrl_overscan_parameter_get_collapse(const hdrl_parameter *) ;
61 hdrl_parameter * hdrl_overscan_parameter_get_rect_region(const hdrl_parameter*);
62
63/* Parameter Lists */
64cpl_parameterlist * hdrl_overscan_parameter_create_parlist(const char *,
65 const char *, const char *, int, double, hdrl_parameter *,
66 const char *, hdrl_parameter *, hdrl_parameter *, hdrl_parameter *) ;
67 hdrl_parameter * hdrl_overscan_parameter_parse_parlist(
68 const cpl_parameterlist *, const char *) ;
69
70/*----------------------------------------------------------------------------
71 Overscan Computation
72 ----------------------------------------------------------------------------*/
73 hdrl_overscan_compute_result * hdrl_overscan_compute(
74 const cpl_image * source,
75 const hdrl_parameter * params) ;
76
77/*----------------------------------------------------------------------------
78 Overscan Computation Result
79 ----------------------------------------------------------------------------*/
80 hdrl_image * hdrl_overscan_compute_result_get_correction(
81 const hdrl_overscan_compute_result *);
82 hdrl_image * hdrl_overscan_compute_result_unset_correction(
83 hdrl_overscan_compute_result *);
84
85cpl_image * hdrl_overscan_compute_result_get_contribution(
86 const hdrl_overscan_compute_result *);
87cpl_image * hdrl_overscan_compute_result_unset_contribution(
88 hdrl_overscan_compute_result *);
89
90cpl_image * hdrl_overscan_compute_result_get_chi2(
91 const hdrl_overscan_compute_result *);
92cpl_image * hdrl_overscan_compute_result_unset_chi2(
93 hdrl_overscan_compute_result *);
94
95cpl_image * hdrl_overscan_compute_result_get_red_chi2(
96 const hdrl_overscan_compute_result *);
97cpl_image * hdrl_overscan_compute_result_unset_red_chi2(
98 hdrl_overscan_compute_result *);
99
100cpl_image * hdrl_overscan_compute_result_get_sigclip_reject_low(
101 const hdrl_overscan_compute_result *);
102cpl_image * hdrl_overscan_compute_result_unset_sigclip_reject_low(
103 hdrl_overscan_compute_result *);
104
105cpl_image * hdrl_overscan_compute_result_get_sigclip_reject_high(
106 const hdrl_overscan_compute_result *);
107cpl_image * hdrl_overscan_compute_result_unset_sigclip_reject_high(
108 hdrl_overscan_compute_result *);
109
110cpl_image * hdrl_overscan_compute_result_get_minmax_reject_low(
111 const hdrl_overscan_compute_result *);
112cpl_image * hdrl_overscan_compute_result_unset_minmax_reject_low(
113 hdrl_overscan_compute_result *);
114
115cpl_image * hdrl_overscan_compute_result_get_minmax_reject_high(
116 const hdrl_overscan_compute_result *);
117cpl_image * hdrl_overscan_compute_result_unset_minmax_reject_high(
118 hdrl_overscan_compute_result *);
119
120 void hdrl_overscan_compute_result_delete(hdrl_overscan_compute_result *);
121
122/*----------------------------------------------------------------------------
123 Overscan Correction
124 ----------------------------------------------------------------------------*/
125 hdrl_overscan_correct_result * hdrl_overscan_correct(
126 const hdrl_image * source,
127 const hdrl_parameter * region,
128 const hdrl_overscan_compute_result * os_computation) ;
129
130/*----------------------------------------------------------------------------
131 Overscan Correction Result
132 ----------------------------------------------------------------------------*/
133 hdrl_image * hdrl_overscan_correct_result_get_corrected(
134 const hdrl_overscan_correct_result *);
135 hdrl_image * hdrl_overscan_correct_result_unset_corrected(
136 hdrl_overscan_correct_result *);
137
138cpl_image * hdrl_overscan_correct_result_get_badmask(
139 const hdrl_overscan_correct_result *);
140cpl_image * hdrl_overscan_correct_result_unset_badmask(
141 hdrl_overscan_correct_result *);
142 void hdrl_overscan_correct_result_delete(hdrl_overscan_correct_result *);
143
144CPL_END_DECLS
145
146#endif
hdrl_image.h
hdrl_overscan_correct_result
struct _hdrl_overscan_correct_result_ hdrl_overscan_correct_result
Definition hdrl_overscan.h:40
hdrl_overscan_compute_result
struct _hdrl_overscan_compute_result_ hdrl_overscan_compute_result
Definition hdrl_overscan.h:39
hdrl_utils.h
hdrl_direction
hdrl_direction
Define an image direction e.g along X or Y.
Definition hdrl_utils.h:55
hdrl_parameter
struct _hdrl_parameter_ hdrl_parameter
Definition hdrl_parameter.h:27
hdrl_overscan_compute_result_delete
void hdrl_overscan_compute_result_delete(hdrl_overscan_compute_result *)
Deletes the Overscan Computation Result Structure.
Definition hdrl_overscan.c:1222
hdrl_overscan_correct_result_get_badmask
cpl_image * hdrl_overscan_correct_result_get_badmask(const hdrl_overscan_correct_result *)
Access the bad pixels mask in the Overscan Correction result object.
Definition hdrl_overscan.c:1485
hdrl_overscan_compute_result_unset_red_chi2
cpl_image * hdrl_overscan_compute_result_unset_red_chi2(hdrl_overscan_compute_result *)
Unset the reduced CHI2 in the Overscan Computation result object.
Definition hdrl_overscan.c:1074
hdrl_overscan_correct_result_unset_badmask
cpl_image * hdrl_overscan_correct_result_unset_badmask(hdrl_overscan_correct_result *)
Unset the bad pixels mask in the Overscan Correction result object.
Definition hdrl_overscan.c:1499
hdrl_overscan_compute_result_get_minmax_reject_high
cpl_image * hdrl_overscan_compute_result_get_minmax_reject_high(const hdrl_overscan_compute_result *)
Access the high threshold in the Overscan Computation result object.
Definition hdrl_overscan.c:1195
hdrl_overscan_parameter_check
cpl_boolean hdrl_overscan_parameter_check(const hdrl_parameter *)
Check that the parameter is an Overscan parameter.
Definition hdrl_overscan.c:269
hdrl_overscan_correct_result_unset_corrected
hdrl_image * hdrl_overscan_correct_result_unset_corrected(hdrl_overscan_correct_result *)
Unset the corrected image in the Overscan Correction result object.
Definition hdrl_overscan.c:1469
hdrl_overscan_compute_result_get_red_chi2
cpl_image * hdrl_overscan_compute_result_get_red_chi2(const hdrl_overscan_compute_result *)
Access the reduced CHI2 in the Overscan Computation result object.
Definition hdrl_overscan.c:1060
hdrl_overscan_compute_result_get_sigclip_reject_low
cpl_image * hdrl_overscan_compute_result_get_sigclip_reject_low(const hdrl_overscan_compute_result *)
Access the low threshold in the Overscan Computation result object.
Definition hdrl_overscan.c:1090
hdrl_overscan_compute_result_get_chi2
cpl_image * hdrl_overscan_compute_result_get_chi2(const hdrl_overscan_compute_result *)
Access the CHI2 in the Overscan Computation result object.
Definition hdrl_overscan.c:1030
hdrl_overscan_compute
hdrl_overscan_compute_result * hdrl_overscan_compute(const cpl_image *source, const hdrl_parameter *params)
Overscan correction computation.
Definition hdrl_overscan.c:686
hdrl_overscan_compute_result_unset_chi2
cpl_image * hdrl_overscan_compute_result_unset_chi2(hdrl_overscan_compute_result *)
Unset the CHI2 in the Overscan Computation result object.
Definition hdrl_overscan.c:1044
hdrl_overscan_compute_result_unset_minmax_reject_high
cpl_image * hdrl_overscan_compute_result_unset_minmax_reject_high(hdrl_overscan_compute_result *)
Unset the high threshold in the Overscan Computation result object.
Definition hdrl_overscan.c:1208
hdrl_overscan_compute_result_unset_contribution
cpl_image * hdrl_overscan_compute_result_unset_contribution(hdrl_overscan_compute_result *)
Unset the contribution in the Overscan Computation result object.
Definition hdrl_overscan.c:1014
hdrl_overscan_compute_result_get_minmax_reject_low
cpl_image * hdrl_overscan_compute_result_get_minmax_reject_low(const hdrl_overscan_compute_result *)
Access the low threshold in the Overscan Computation result object.
Definition hdrl_overscan.c:1169
hdrl_overscan_compute_result_unset_correction
hdrl_image * hdrl_overscan_compute_result_unset_correction(hdrl_overscan_compute_result *)
Unset the correction in the Overscan Computation result object.
Definition hdrl_overscan.c:984
hdrl_overscan_correct_result_get_corrected
hdrl_image * hdrl_overscan_correct_result_get_corrected(const hdrl_overscan_correct_result *)
Access the corrected image in the Overscan Correction result object.
Definition hdrl_overscan.c:1455
hdrl_overscan_parameter_get_rect_region
hdrl_parameter * hdrl_overscan_parameter_get_rect_region(const hdrl_parameter *)
Access the Overscan Region parameters in the Overscan Parameter.
Definition hdrl_overscan.c:333
hdrl_overscan_parameter_get_collapse
hdrl_parameter * hdrl_overscan_parameter_get_collapse(const hdrl_parameter *)
Access the collapse method parameters in the Overscan Parameter.
Definition hdrl_overscan.c:320
hdrl_overscan_parameter_create
hdrl_parameter * hdrl_overscan_parameter_create(hdrl_direction, double, int, hdrl_parameter *, hdrl_parameter *)
Creates Overscan Parameters object.
Definition hdrl_overscan.c:150
hdrl_overscan_compute_result_get_correction
hdrl_image * hdrl_overscan_compute_result_get_correction(const hdrl_overscan_compute_result *)
Access the correction in the Overscan Computation result object.
Definition hdrl_overscan.c:970
hdrl_overscan_parameter_get_ccd_ron
double hdrl_overscan_parameter_get_ccd_ron(const hdrl_parameter *)
Access the CCD read out noise in the Overscan Parameter.
Definition hdrl_overscan.c:294
hdrl_overscan_parameter_get_correction_direction
hdrl_direction hdrl_overscan_parameter_get_correction_direction(const hdrl_parameter *)
Access the Correction Direction in the Overscan Parameter.
Definition hdrl_overscan.c:281
hdrl_overscan_correct
hdrl_overscan_correct_result * hdrl_overscan_correct(const hdrl_image *source, const hdrl_parameter *region, const hdrl_overscan_compute_result *os_computation)
Overscan correction.
Definition hdrl_overscan.c:1286
hdrl_overscan_parameter_parse_parlist
hdrl_parameter * hdrl_overscan_parameter_parse_parlist(const cpl_parameterlist *, const char *)
Parse parameterlist to create input parameters for the Overscan method.
Definition hdrl_overscan.c:473
hdrl_overscan_compute_result_get_contribution
cpl_image * hdrl_overscan_compute_result_get_contribution(const hdrl_overscan_compute_result *)
Access the contribution in the Overscan Computation result object.
Definition hdrl_overscan.c:1000
hdrl_overscan_parameter_get_box_hsize
int hdrl_overscan_parameter_get_box_hsize(const hdrl_parameter *)
Access the Box Half Size in the Overscan Parameter.
Definition hdrl_overscan.c:307
hdrl_overscan_compute_result_unset_minmax_reject_low
cpl_image * hdrl_overscan_compute_result_unset_minmax_reject_low(hdrl_overscan_compute_result *)
Unset the low threshold in the Overscan Computation result object.
Definition hdrl_overscan.c:1182
hdrl_overscan_compute_result_get_sigclip_reject_high
cpl_image * hdrl_overscan_compute_result_get_sigclip_reject_high(const hdrl_overscan_compute_result *)
Access the high threshold in the Overscan Computation result object.
Definition hdrl_overscan.c:1132
hdrl_overscan_correct_result_delete
void hdrl_overscan_correct_result_delete(hdrl_overscan_correct_result *)
Delete the Overscan Correction Result Structure.
Definition hdrl_overscan.c:1438
hdrl_overscan_compute_result_unset_sigclip_reject_low
cpl_image * hdrl_overscan_compute_result_unset_sigclip_reject_low(hdrl_overscan_compute_result *)
Unset the low threshold in the Overscan Computation result object.
Definition hdrl_overscan.c:1110
hdrl_overscan_compute_result_unset_sigclip_reject_high
cpl_image * hdrl_overscan_compute_result_unset_sigclip_reject_high(hdrl_overscan_compute_result *)
Unset the high threshold in the Overscan Computation result object.
Definition hdrl_overscan.c:1152
hdrl_overscan_parameter_create_parlist
cpl_parameterlist * hdrl_overscan_parameter_create_parlist(const char *, const char *, const char *, int, double, hdrl_parameter *, const char *, hdrl_parameter *, hdrl_parameter *, hdrl_parameter *)
Create parameter list for the Overscan computation.
Definition hdrl_overscan.c:367
hdrl_overscan_parameter_verify
cpl_error_code hdrl_overscan_parameter_verify(const hdrl_parameter *, cpl_size, cpl_size)
Verify basic correctness of the Overscan parameters.
Definition hdrl_overscan.c:176
_hdrl_image_
Definition hdrl_image_defs.h:40