MOONS Pipeline Reference Manual 0.13.2
moo_compute_linearity.h
1/*
2 * This file is part of the MOONS Pipeline
3 * Copyright (C) 2002-2016 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20#ifndef MOO_COMPUTE_LINEARITY_H
21#define MOO_COMPUTE_LINEARITY_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27#include <cpl.h>
28#include <hdrl.h>
29#include "moo_params.h"
30#include "moo_detlist.h"
31#include "moo_loc.h"
32#include "moo_cube.h"
33#include "moo_bpm.h"
34#include "moo_saturate_map.h"
35
36#define MOO_DEBUG_COMPUTE_LINEARITY 0
37#define CPL_COEFF_FIT 1
38
39#define MOO_LINEARITY_TABLE_X "x"
40#define MOO_LINEARITY_TABLE_Y "y"
41#define MOO_LINEARITY_TABLE_TIME "time"
42#define MOO_LINEARITY_TABLE_FLUX "flux"
43#define MOO_LINEARITY_TABLE_ERR "err"
44#define MOO_LINEARITY_TABLE_MSE "mse"
45#define MOO_LINEARITY_TABLE_ILLUMINATED "illuminated"
46#define MOO_LINEARITY_TABLE_C0 "c0"
47#define MOO_LINEARITY_TABLE_C1 "c1"
48
49#define MOO_LINEARITY_TABLE_D0 "d0"
50#define MOO_LINEARITY_TABLE_D1 "d1"
51#define MOO_LINEARITY_TABLE_D2 "d2"
52#define MOO_LINEARITY_TABLE_DMSE "dmse"
53
54#define MOO_COMPUTE_LINEARITY_DEGREE 3
55moo_saturate_map *moo_compute_saturate_pixels(moo_detlist *detlist,
56 moo_loc *loc,
57 moo_linear_params *params);
58
59moo_cube *moo_compute_linearity(moo_detlist *detlist,
60 moo_loc *loc,
61 moo_saturate_map *saturate_map,
62 const char *cube_filename);
63
64moo_bpm *moo_compute_bpm_linearity(moo_cube *cube,
65 moo_loc *loc,
66 moo_saturate_map *saturate_map,
67 moo_linear_params *params,
68 const char *bpm_name);
69
70#endif