CR2RE Pipeline Reference Manual 1.7.0
cr2res_calib.h
1/*
2 * This file is part of the CR2RES Pipeline
3 * Copyright (C) 2002,2003 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 St, Fifth Floor, Boston, MA 02111-1307 USA
18 */
19
20#ifndef CR2RES_CALIB_H
21#define CR2RES_CALIB_H
22
23/*-----------------------------------------------------------------------------
24 Includes
25 -----------------------------------------------------------------------------*/
26
27#include <cpl.h>
28#include "hdrl.h"
29
30/*-----------------------------------------------------------------------------
31 Define
32 -----------------------------------------------------------------------------*/
33
34typedef enum {
35 CR2RES_COLLAPSE_UNSPECIFIED,
36 CR2RES_COLLAPSE_NONE,
37 CR2RES_COLLAPSE_SUM,
38 CR2RES_COLLAPSE_MEAN,
39 CR2RES_COLLAPSE_MEDIAN,
40} cr2res_collapse ;
41
42/*-----------------------------------------------------------------------------
43 Prototypes
44 -----------------------------------------------------------------------------*/
45
46hdrl_imagelist * cr2res_calib_imagelist(
47 const hdrl_imagelist * in,
48 int chip,
49 int clean_bad,
50 int subtract_nolight_rows,
51 int subtract_interorder_column,
52 int cosmics_corr,
53 const cpl_frame * flat,
54 const cpl_frame * dark,
55 const cpl_frame * bpm,
56 const cpl_frame * detlin,
57 const cpl_vector * dits,
58 const cpl_vector * ndits,
59 const cpl_vector * ndsamples) ;
60
61hdrl_image * cr2res_calib_image(
62 const hdrl_image * in,
63 int chip,
64 int clean_bad,
65 int subtract_nolight_rows,
66 int subtract_interorder_column,
67 int cosmics_corr,
68 const cpl_frame * flat,
69 const cpl_frame * dark,
70 const cpl_frame * bpm,
71 const cpl_frame * detlin,
72 double dit,
73 int ndit,
74 int ndsamples) ;
75
77 hdrl_image * ima,
78 const cpl_image * var) ;
79
80cpl_image * cr2res_calib_flat_relerr2(const hdrl_image * mflat) ;
81
83 hdrl_image * ima,
84 const cpl_image * relerr2,
85 double sign) ;
86
88 hdrl_imagelist * list,
89 const cpl_frame * master_dark_frame,
90 int chip,
91 const hdrl_image * mflat,
92 const cpl_vector * dits,
93 double sign) ;
94
95#endif
cpl_image * cr2res_calib_flat_relerr2(const hdrl_image *mflat)
Squared relative error of a master flat, (sigma_F/F)^2.
hdrl_image * cr2res_calib_image(const hdrl_image *in, int chip, int clean_bad, int subtract_nolight_rows, int subtract_interorder_column, int cosmics_corr, const cpl_frame *flat, const cpl_frame *dark, const cpl_frame *bpm, const cpl_frame *detlin, double dit, int ndit, int ndsamples)
The images calibration routine for a given chip.
hdrl_imagelist * cr2res_calib_imagelist(const hdrl_imagelist *in, int chip, int clean_bad, int subtract_nolight_rows, int subtract_interorder_column, int cosmics_corr, const cpl_frame *flat, const cpl_frame *dark, const cpl_frame *bpm, const cpl_frame *detlin, const cpl_vector *dits, const cpl_vector *ndits, const cpl_vector *ndsamples)
The images calibration routine for a given chip on a list.
int cr2res_calib_dark_var(hdrl_imagelist *list, const cpl_frame *master_dark_frame, int chip, const hdrl_image *mflat, const cpl_vector *dits, double sign)
Add or remove the master dark variance of cr2res_calib_image()
void cr2res_calib_add_var(hdrl_image *ima, const cpl_image *var)
Add a variance image to the error of an HDRL image.
void cr2res_calib_flat_var(hdrl_image *ima, const cpl_image *relerr2, double sign)
Add or remove the flat-field variance term of an image.