HAWKI Pipeline Reference Manual  1.8.12
hawki_bkg.h
1 /* $Id: hawki_bkg.h,v 1.11 2012/12/10 12:31:33 cgarcia Exp $
2  *
3  * This file is part of the HAWKI Pipeline
4  * Copyright (C) 2002,2003 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 /*
22  * $Author: cgarcia $
23  * $Date: 2012/12/10 12:31:33 $
24  * $Revision: 1.11 $
25  * $Name: hawki-1_8_12 $
26  */
27 
28 #ifndef HAWKI_BKG_H
29 #define HAWKI_BKG_H
30 
31 /*-----------------------------------------------------------------------------
32  Includes
33  -----------------------------------------------------------------------------*/
34 
35 #include <cpl.h>
36 
37 typedef struct _hawki_bkg_frames_buffer_ hawki_bkg_frames_buffer;
38 
39 struct _hawki_bkg_frames_buffer_
40 {
41  cpl_image ** images;
42  double * medians;
43  cpl_frameset * frames;
44  cpl_size nframes;
45 };
46 
47 CPL_BEGIN_DECLS
48 
49 hawki_bkg_frames_buffer * hawki_bkg_frames_buffer_init
50 (const cpl_frameset * fset);
51 
52 void hawki_bkg_frames_buffer_delete(hawki_bkg_frames_buffer * frames_buffer);
53 
54 int hawki_bkg_fill_assoc(cpl_frameset * objframes, cpl_propertylist * proplist);
55 
56 int hawki_bkg_from_objects_median
57 (const cpl_frameset * objframes, cpl_imagelist * bkg);
58 
59 int hawki_bkg_from_sky_median
60 (const cpl_frameset * skyframes,
61  cpl_imagelist * bkg);
62 
63 int hawki_bkg_from_running_mean
64 (cpl_imagelist * objimages,
65  const cpl_vector * medians,
66  int i_target,
67  int half_width,
68  int rejlow,
69  int rejhigh,
70  cpl_image * bkg);
71 
72 int hawki_bkg_from_running_mean_frame_extension
73 (hawki_bkg_frames_buffer * frames_buffer,
74  cpl_vector * offsets_x,
75  cpl_vector * offsets_y,
76  cpl_image * globalmask,
77  double mask_off_x,
78  double mask_off_y,
79  cpl_image * distortion_x,
80  cpl_image * distortion_y,
81  int iextension,
82  int i_target,
83  int half_width,
84  int rejlow,
85  int rejhigh,
86  cpl_image * bkg);
87 
88 int hawki_bkg_set_obj_mask
89 (cpl_image * target_image,
90  cpl_image * globalmask,
91  cpl_image * distor_x,
92  cpl_image * distor_y,
93  double target_off_x,
94  double target_off_y,
95  double mask_off_x,
96  double mask_off_y);
97 
98 CPL_END_DECLS
99 
100 #endif