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

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

Loading...
Searching...
No Matches
hdrl_elemop.h
Go to the documentation of this file.
1/* $Id: hdrl_elemop.h,v 1.4 2013-10-17 15:44:14 jtaylor Exp $
2 *
3 * This file is part of the HDRL
4 * Copyright (C) 2013 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 02110-1301 USA
19 */
20
21/*
22 * $Author: jtaylor $
23 * $Date: 2013-10-17 15:44:14 $
24 * $Revision: 1.4 $
25 */
26
27#ifndef HDRL_ELEMOP_H
28#define HDRL_ELEMOP_H
29
30#ifndef HDRL_USE_PRIVATE
31#error This file is not allowed to be included outside of hdrl
32#endif
33
34/*-----------------------------------------------------------------------------
35 Includes
36 -----------------------------------------------------------------------------*/
37
38#include "hdrl_types.h"
39#include <cpl.h>
40
41CPL_BEGIN_DECLS
42
43/*-----------------------------------------------------------------------------
44 Define
45 -----------------------------------------------------------------------------*/
46
47
48/*-----------------------------------------------------------------------------
49 Functions prototypes
50 -----------------------------------------------------------------------------*/
51
52/* ---------------------------------------------------------------------------*/
65/* ---------------------------------------------------------------------------*/
66cpl_error_code
67 hdrl_elemop_image_add_image(cpl_image * a, cpl_image * ae,
68 const cpl_image * b, const cpl_image * be);
69cpl_error_code
70 hdrl_elemop_image_sub_image(cpl_image * a, cpl_image * ae,
71 const cpl_image * b, const cpl_image * be);
72cpl_error_code
73 hdrl_elemop_image_mul_image(cpl_image * a, cpl_image * ae,
74 const cpl_image * b, const cpl_image * be);
75cpl_error_code
76 hdrl_elemop_image_div_image(cpl_image * a, cpl_image * ae,
77 const cpl_image * b, const cpl_image * be);
78cpl_error_code
79 hdrl_elemop_image_pow_image(cpl_image * a, cpl_image * ae,
80 const cpl_image * b, const cpl_image * be);
81
82/* ---------------------------------------------------------------------------*/
95/* ---------------------------------------------------------------------------*/
96cpl_error_code
97 hdrl_elemop_image_add_scalar(cpl_image * a, cpl_image * ae,
98 const hdrl_data_t b, const hdrl_error_t be);
99cpl_error_code
100 hdrl_elemop_image_sub_scalar(cpl_image * a, cpl_image * ae,
101 const hdrl_data_t b, const hdrl_error_t be);
102cpl_error_code
103 hdrl_elemop_image_mul_scalar(cpl_image * a, cpl_image * ae,
104 const hdrl_data_t b, const hdrl_error_t be);
105cpl_error_code
106 hdrl_elemop_image_div_scalar(cpl_image * a, cpl_image * ae,
107 const hdrl_data_t b, const hdrl_error_t be);
108cpl_error_code
109 hdrl_elemop_image_pow_scalar(cpl_image * a, cpl_image * ae,
110 const hdrl_data_t b, const hdrl_error_t be);
111cpl_error_code
112 hdrl_elemop_image_exp_scalar(cpl_image * a, cpl_image * ae,
113 const hdrl_data_t b, const hdrl_error_t be);
114/* ---------------------------------------------------------------------------*/
128/* ---------------------------------------------------------------------------*/
129cpl_error_code
130 hdrl_elemop_imagelist_add_imagelist(cpl_imagelist * a, cpl_imagelist * ae,
131 const cpl_imagelist * b, const cpl_imagelist * be);
132cpl_error_code
133 hdrl_elemop_imagelist_sub_imagelist(cpl_imagelist * a, cpl_imagelist * ae,
134 const cpl_imagelist * b, const cpl_imagelist * be);
135cpl_error_code
136 hdrl_elemop_imagelist_mul_imagelist(cpl_imagelist * a, cpl_imagelist * ae,
137 const cpl_imagelist * b, const cpl_imagelist * be);
138cpl_error_code
139 hdrl_elemop_imagelist_div_imagelist(cpl_imagelist * a, cpl_imagelist * ae,
140 const cpl_imagelist * b, const cpl_imagelist * be);
141cpl_error_code
142 hdrl_elemop_imagelist_pow_imagelist(cpl_imagelist * a, cpl_imagelist * ae,
143 const cpl_imagelist * b, const cpl_imagelist * be);
144
145/* ---------------------------------------------------------------------------*/
159/* ---------------------------------------------------------------------------*/
160cpl_error_code
161 hdrl_elemop_imagelist_add_vector(cpl_imagelist * a, cpl_imagelist * ae,
162 const cpl_vector * b, const cpl_vector * be);
163cpl_error_code
164 hdrl_elemop_imagelist_sub_vector(cpl_imagelist * a, cpl_imagelist * ae,
165 const cpl_vector * b, const cpl_vector * be);
166cpl_error_code
167 hdrl_elemop_imagelist_mul_vector(cpl_imagelist * a, cpl_imagelist * ae,
168 const cpl_vector * b, const cpl_vector * be);
169cpl_error_code
170 hdrl_elemop_imagelist_div_vector(cpl_imagelist * a, cpl_imagelist * ae,
171 const cpl_vector * b, const cpl_vector * be);
172cpl_error_code
173 hdrl_elemop_imagelist_pow_vector(cpl_imagelist * a, cpl_imagelist * ae,
174 const cpl_vector * b, const cpl_vector * be);
175
176/* ---------------------------------------------------------------------------*/
190/* ---------------------------------------------------------------------------*/
191cpl_error_code
192 hdrl_elemop_imagelist_add_image(cpl_imagelist * a, cpl_imagelist * ae,
193 const cpl_image * b, const cpl_image * be);
194cpl_error_code
195 hdrl_elemop_imagelist_sub_image(cpl_imagelist * a, cpl_imagelist * ae,
196 const cpl_image * b, const cpl_image * be);
197cpl_error_code
198 hdrl_elemop_imagelist_mul_image(cpl_imagelist * a, cpl_imagelist * ae,
199 const cpl_image * b, const cpl_image * be);
200cpl_error_code
201 hdrl_elemop_imagelist_div_image(cpl_imagelist * a, cpl_imagelist * ae,
202 const cpl_image * b, const cpl_image * be);
203cpl_error_code
204 hdrl_elemop_imagelist_pow_image(cpl_imagelist * a, cpl_imagelist * ae,
205 const cpl_image * b, const cpl_image * be);
206
207/* see hdrl_elemop.c for doc strings */
208cpl_error_code hdrl_elemop_add(hdrl_data_t * a, hdrl_error_t * ea, size_t na,
209 const hdrl_data_t * b, const hdrl_error_t * eb, size_t nb,
210 const cpl_binary * mask);
211cpl_error_code hdrl_elemop_sub(hdrl_data_t * a, hdrl_error_t * ea, size_t na,
212 const hdrl_data_t * b, const hdrl_error_t * eb, size_t nb,
213 const cpl_binary * mask);
214cpl_error_code hdrl_elemop_mul(hdrl_data_t * a, hdrl_error_t * ea, size_t na,
215 const hdrl_data_t * b, const hdrl_error_t * eb, size_t nb,
216 const cpl_binary * mask);
217cpl_error_code hdrl_elemop_div(hdrl_data_t * a, hdrl_error_t * ea, size_t na,
218 const hdrl_data_t * b, const hdrl_error_t * eb, size_t nb,
219 const cpl_binary * mask);
220cpl_error_code hdrl_elemop_pow(hdrl_data_t * a, hdrl_error_t * ea, size_t na,
221 const hdrl_data_t * b, const hdrl_error_t * eb, size_t nb,
222 const cpl_binary * mask);
223cpl_error_code hdrl_elemop_pow_inverted(
224 hdrl_data_t * a, hdrl_error_t * ea, size_t na,
225 const hdrl_data_t * b, const hdrl_error_t * eb, size_t nb,
226 const cpl_binary * mask);
227
228/*-----------------------------------------------------------------------------
229 Private declarations - must not be used outside of hdrl
230 -----------------------------------------------------------------------------*/
231
232#ifdef HDRL_USE_PRIVATE
233
234#endif
235
236CPL_END_DECLS
237
238#endif
hdrl_types.h
hdrl_error_t
double hdrl_error_t
Definition hdrl_types.h:72
hdrl_data_t
double hdrl_data_t
Definition hdrl_types.h:62
hdrl_elemop_imagelist_mul_imagelist
cpl_error_code hdrl_elemop_imagelist_mul_imagelist(cpl_imagelist *a, cpl_imagelist *ae, const cpl_imagelist *b, const cpl_imagelist *be)
Definition hdrl_elemop.c:856
hdrl_elemop_sub
cpl_error_code hdrl_elemop_sub(hdrl_data_t *a, hdrl_error_t *ea, size_t na, const hdrl_data_t *b, const hdrl_error_t *eb, size_t nb, const cpl_binary *mask)
subtract two arrays of with error propagation in place
Definition hdrl_elemop.c:123
hdrl_elemop_imagelist_pow_imagelist
cpl_error_code hdrl_elemop_imagelist_pow_imagelist(cpl_imagelist *a, cpl_imagelist *ae, const cpl_imagelist *b, const cpl_imagelist *be)
Definition hdrl_elemop.c:876
hdrl_elemop_imagelist_mul_vector
cpl_error_code hdrl_elemop_imagelist_mul_vector(cpl_imagelist *a, cpl_imagelist *ae, const cpl_vector *b, const cpl_vector *be)
Definition hdrl_elemop.c:702
hdrl_elemop_imagelist_sub_image
cpl_error_code hdrl_elemop_imagelist_sub_image(cpl_imagelist *a, cpl_imagelist *ae, const cpl_image *b, const cpl_image *be)
Definition hdrl_elemop.c:766
hdrl_elemop_imagelist_add_imagelist
cpl_error_code hdrl_elemop_imagelist_add_imagelist(cpl_imagelist *a, cpl_imagelist *ae, const cpl_imagelist *b, const cpl_imagelist *be)
add/subtract/multiply/divide two imagelists and scalar with error propagation
Definition hdrl_elemop.c:836
hdrl_elemop_image_mul_scalar
cpl_error_code hdrl_elemop_image_mul_scalar(cpl_image *a, cpl_image *ae, const hdrl_data_t b, const hdrl_error_t be)
Definition hdrl_elemop.c:543
hdrl_elemop_image_sub_scalar
cpl_error_code hdrl_elemop_image_sub_scalar(cpl_image *a, cpl_image *ae, const hdrl_data_t b, const hdrl_error_t be)
Definition hdrl_elemop.c:536
hdrl_elemop_add
cpl_error_code hdrl_elemop_add(hdrl_data_t *a, hdrl_error_t *ea, size_t na, const hdrl_data_t *b, const hdrl_error_t *eb, size_t nb, const cpl_binary *mask)
add two arrays of with error propagation in place
Definition hdrl_elemop.c:69
hdrl_elemop_imagelist_add_vector
cpl_error_code hdrl_elemop_imagelist_add_vector(cpl_imagelist *a, cpl_imagelist *ae, const cpl_vector *b, const cpl_vector *be)
add/subtract/multiply/divide each image of an imagelist and a scalar from a vector with error propaga...
Definition hdrl_elemop.c:682
hdrl_elemop_div
cpl_error_code hdrl_elemop_div(hdrl_data_t *a, hdrl_error_t *ea, size_t na, const hdrl_data_t *b, const hdrl_error_t *eb, size_t nb, const cpl_binary *mask)
divide two arrays of with error propagation in place
Definition hdrl_elemop.c:240
hdrl_elemop_image_div_scalar
cpl_error_code hdrl_elemop_image_div_scalar(cpl_image *a, cpl_image *ae, const hdrl_data_t b, const hdrl_error_t be)
Definition hdrl_elemop.c:550
hdrl_elemop_imagelist_sub_imagelist
cpl_error_code hdrl_elemop_imagelist_sub_imagelist(cpl_imagelist *a, cpl_imagelist *ae, const cpl_imagelist *b, const cpl_imagelist *be)
Definition hdrl_elemop.c:846
hdrl_elemop_image_div_image
cpl_error_code hdrl_elemop_image_div_image(cpl_image *a, cpl_image *ae, const cpl_image *b, const cpl_image *be)
Definition hdrl_elemop.c:638
hdrl_elemop_imagelist_add_image
cpl_error_code hdrl_elemop_imagelist_add_image(cpl_imagelist *a, cpl_imagelist *ae, const cpl_image *b, const cpl_image *be)
add/subtract/multiply/divide each image of an imagelist and an image with error propagation
Definition hdrl_elemop.c:756
hdrl_elemop_pow_inverted
cpl_error_code hdrl_elemop_pow_inverted(hdrl_data_t *a, hdrl_error_t *ea, size_t na, const hdrl_data_t *b, const hdrl_error_t *eb, size_t nb, const cpl_binary *mask)
power of two arrays of with error propagation in place
Definition hdrl_elemop.c:409
hdrl_elemop_pow
cpl_error_code hdrl_elemop_pow(hdrl_data_t *a, hdrl_error_t *ea, size_t na, const hdrl_data_t *b, const hdrl_error_t *eb, size_t nb, const cpl_binary *mask)
power of two arrays of with error propagation in place
Definition hdrl_elemop.c:351
hdrl_elemop_image_add_image
CPL_BEGIN_DECLS cpl_error_code hdrl_elemop_image_add_image(cpl_image *a, cpl_image *ae, const cpl_image *b, const cpl_image *be)
add/subtract/multiply/divide two images with error propagation
Definition hdrl_elemop.c:617
hdrl_elemop_imagelist_div_image
cpl_error_code hdrl_elemop_imagelist_div_image(cpl_imagelist *a, cpl_imagelist *ae, const cpl_image *b, const cpl_image *be)
Definition hdrl_elemop.c:786
hdrl_elemop_imagelist_sub_vector
cpl_error_code hdrl_elemop_imagelist_sub_vector(cpl_imagelist *a, cpl_imagelist *ae, const cpl_vector *b, const cpl_vector *be)
Definition hdrl_elemop.c:692
hdrl_elemop_mul
cpl_error_code hdrl_elemop_mul(hdrl_data_t *a, hdrl_error_t *ea, size_t na, const hdrl_data_t *b, const hdrl_error_t *eb, size_t nb, const cpl_binary *mask)
multiply two arrays of with error propagation in place
Definition hdrl_elemop.c:177
hdrl_elemop_image_exp_scalar
cpl_error_code hdrl_elemop_image_exp_scalar(cpl_image *a, cpl_image *ae, const hdrl_data_t b, const hdrl_error_t be)
Definition hdrl_elemop.c:564
hdrl_elemop_image_mul_image
cpl_error_code hdrl_elemop_image_mul_image(cpl_image *a, cpl_image *ae, const cpl_image *b, const cpl_image *be)
Definition hdrl_elemop.c:631
hdrl_elemop_imagelist_div_imagelist
cpl_error_code hdrl_elemop_imagelist_div_imagelist(cpl_imagelist *a, cpl_imagelist *ae, const cpl_imagelist *b, const cpl_imagelist *be)
Definition hdrl_elemop.c:866
hdrl_elemop_image_pow_image
cpl_error_code hdrl_elemop_image_pow_image(cpl_image *a, cpl_image *ae, const cpl_image *b, const cpl_image *be)
Definition hdrl_elemop.c:645
hdrl_elemop_image_add_scalar
cpl_error_code hdrl_elemop_image_add_scalar(cpl_image *a, cpl_image *ae, const hdrl_data_t b, const hdrl_error_t be)
add/subtract/multiply/divide image and scalar with error propagation
Definition hdrl_elemop.c:529
hdrl_elemop_image_pow_scalar
cpl_error_code hdrl_elemop_image_pow_scalar(cpl_image *a, cpl_image *ae, const hdrl_data_t b, const hdrl_error_t be)
Definition hdrl_elemop.c:557
hdrl_elemop_image_sub_image
cpl_error_code hdrl_elemop_image_sub_image(cpl_image *a, cpl_image *ae, const cpl_image *b, const cpl_image *be)
Definition hdrl_elemop.c:624
hdrl_elemop_imagelist_pow_vector
cpl_error_code hdrl_elemop_imagelist_pow_vector(cpl_imagelist *a, cpl_imagelist *ae, const cpl_vector *b, const cpl_vector *be)
Definition hdrl_elemop.c:722
hdrl_elemop_imagelist_div_vector
cpl_error_code hdrl_elemop_imagelist_div_vector(cpl_imagelist *a, cpl_imagelist *ae, const cpl_vector *b, const cpl_vector *be)
Definition hdrl_elemop.c:712
hdrl_elemop_imagelist_mul_image
cpl_error_code hdrl_elemop_imagelist_mul_image(cpl_imagelist *a, cpl_imagelist *ae, const cpl_image *b, const cpl_image *be)
Definition hdrl_elemop.c:776
hdrl_elemop_imagelist_pow_image
cpl_error_code hdrl_elemop_imagelist_pow_image(cpl_imagelist *a, cpl_imagelist *ae, const cpl_image *b, const cpl_image *be)
Definition hdrl_elemop.c:796