MOONS Pipeline Reference Manual 0.13.2
moo_prepare.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_PREPARE_H
21#define MOO_PREPARE_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <cpl.h>
29#include <hdrl.h>
30
31#include "moo_params.h"
32#include "moo_det.h"
33
34/*-----------------------------------------------------------------------------
35 Types
36 -----------------------------------------------------------------------------*/
37#define DEBUG_PREPARE_ADU 0
38#define DEBUG_PREPARE_ADU_LIN 0
39
40#define MOO_PREPARE_COUNT_BUNIT "counts"
41#define MOO_PREPARE_ADU_BUNIT "adu"
42#define MOO_TO_ELECTRON(adu, gain) (adu / gain)
43#define MOO_TO_ADU(e, gain) (e * gain)
44
45
46/*-----------------------------------------------------------------------------
47 Functions prototypes
48 -----------------------------------------------------------------------------*/
49
50moo_det *moo_prepare(const cpl_frame *rawframe,
51 const char *const badpixmask_rp,
52 const char *const badpixmask_nl,
53 const cpl_frame *masterbias,
54 const cpl_frame *cube_frame,
55 moo_prepare_params *params);
56moo_det *moo_prepare_adu(const cpl_frame *rawframe,
57 const char *const badpixmask_rp,
58 moo_prepare_params *params);
59#endif
moo_det * moo_prepare(const cpl_frame *rawframe, const char *const badpixmask_rp, const char *const badpixmask_nl, const cpl_frame *masterbias, const cpl_frame *cube_frame, moo_prepare_params *params)
This function transforms RAW frames in DET frames attaching the default bad pixel map and an error im...
Definition: moo_prepare.c:324
moo_det * moo_prepare_adu(const cpl_frame *rawframe, const char *const badpixmask_rp, moo_prepare_params *params)
This function transforms RAW frames in DET ADU frames attaching the default bad pixel.
Definition: moo_prepare.c:430