ERIS Pipeline Reference Manual 1.9.2
eris_nix_gain_linearity.h
1/* $Id$
2 *
3 * This file is part of the ERIS/NIX Pipeline
4 * Copyright (C) 2017 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$:
23 * $Date$:
24 * $Rev$:
25 */
26
27/*
28 * This file defines structures and methods used to store and maintain
29 * an ERIS/NIX 'gain_linearity' structure.
30 */
31
32#ifndef ERIS_NIX_GAIN_LINEARITY_H
33#define ERIS_NIX_GAIN_LINEARITY_H
34
35#ifdef HAVE_CONFIG_H
36#include <config.h>
37#endif
38
39/*-----------------------------------------------------------------------------
40 Defines
41 -----------------------------------------------------------------------------*/
42
43#define MAX_LIN_DEPTH 20
44#define MAX_LIN_DIFFERENCE 2.0
45
46/*-----------------------------------------------------------------------------
47 Includes
48 -----------------------------------------------------------------------------*/
49
50#include <cpl.h>
51#include <hdrl.h>
52#include "eris_nix_defs.h"
53
54/*-----------------------------------------------------------------------------
55 Declarations
56 -----------------------------------------------------------------------------*/
57
58typedef struct {
59 cpl_imagelist * lin_coeffs;
60 double * ordered_lin_coeffs;
61 cpl_mask * bpm;
62 hdrl_value gain;
63 double saturation_limit;
64 cpl_propertylist * plist;
65} gain_linearity;
66
67/*-----------------------------------------------------------------------------
68 Prototypes
69 -----------------------------------------------------------------------------*/
70
71void engl_gain_linearity_delete(gain_linearity *);
72
73gain_linearity * engl_gain_linearity_load_from_frameset(const cpl_frameset *,
74 const char *,
75 const char *,
76 const char *,
77 const int,
78 cpl_frameset *)
79 CPL_ATTR_ALLOC;
80
81gain_linearity * engl_gain_linearity_test(const cpl_size ,
82 const cpl_size,
83 const double,
84 const double,
85 const double,
86 const double,
87 const hdrl_value,
88 const double saturation)
89 CPL_ATTR_ALLOC;
90
91#endif /* ERIS_NIX_GAIN_LINEARITY_H */
92
93