ERIS Pipeline Reference Manual 1.8.15
eris_nix_detector.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#ifndef ERIS_NIX_DETECTOR_H
28#define ERIS_NIX_DETECTOR_H
29
30#ifdef HAVE_CONFIG_H
31#include <config.h>
32#endif
33
34/*-----------------------------------------------------------------------------
35 Includes
36 -----------------------------------------------------------------------------*/
37
38#include "eris_nix_gain_linearity.h"
39#include "eris_nix_master_dark.h"
40#include "eris_nix_utils.h"
41#include <cpl.h>
42
43/*-----------------------------------------------------------------------------
44 Defines
45 -----------------------------------------------------------------------------*/
46
47#define LINEARIZE_MAXITER 5
48
49/*-----------------------------------------------------------------------------
50 Declarations
51 -----------------------------------------------------------------------------*/
52
53typedef struct {
54 cpl_size nr;
55 cpl_image ** samples;
56} eris_nix_samples;
57
58/*-----------------------------------------------------------------------------
59 Prototypes
60 -----------------------------------------------------------------------------*/
61
62eris_nix_samples * end_calculate_samples(const cpl_image * start_intensity,
63 const cpl_image * ramp_intensity,
64 cpl_size nr,
65 const double dit,
66 const cpl_image * f);
67
68void end_samples_delete(eris_nix_samples * samples);
69
70cpl_error_code end_linearize_and_variance(const gain_linearity * gain_linearity,
71 const master_dark * master_dark,
72 located_imagelist * limlist,
73 cpl_size x_probe,
74 cpl_size y_probe);
75
76hdrl_image *
77end_linearize_and_variance_detmon(const gain_linearity * gain_linearity,
78 const master_dark * master_dark,
79 const hdrl_image * himage,
80 const cpl_propertylist * plist,
81 const cpl_size x_probe,
82 const cpl_size y_probe)
83 CPL_ATTR_ALLOC;
84
85cpl_error_code end_linearize_image(cpl_image * data,
86 const gain_linearity * gain_linearity,
87 const cpl_size rot,
88 const cpl_size strx,
89 const cpl_size stry,
90 const cpl_size x_probe,
91 const cpl_size y_probe);
92
93cpl_image * end_uptheramp_reduce(eris_nix_samples * samples,
94 const double dit);
95
96cpl_image * end_vacca_linearize_cds(cpl_image * intensity,
97 const gain_linearity * gain_linearity,
98 const double dit,
99 const cpl_size nr,
100 const cpl_image * f,
101 cpl_size rot,
102 cpl_size strx,
103 cpl_size stry,
104 cpl_size x_probe,
105 cpl_size y_probe);
106
107cpl_image * end_vacca_linearize_ramp(cpl_image * intensity,
108 const gain_linearity * gain_linearity,
109 const double dit,
110 const cpl_size nr,
111 const cpl_image * f,
112 const cpl_size rot,
113 const cpl_size strx,
114 const cpl_size stry,
115 const cpl_size x_probe,
116 const cpl_size y_probe);
117
118double engl_lin_correct(const double,
119 const cpl_size,
120 const double *,
121 const cpl_binary,
122 const double,
123 cpl_binary *,
124 cpl_binary *,
125 const int);
126
127double engl_lin_find(const double,
128 double,
129 double,
130 const cpl_size,
131 const double *);
132
133#endif