SINFONI Pipeline Reference Manual  2.5.2
sinfo_new_psf.h
1 #ifndef SINFO_NEW_PSF_H
2 #define SINFO_NEW_PSF_H
3 /*
4  * This file is part of the ESO SINFONI Pipeline
5  * Copyright (C) 2004,2005 European Southern Observatory
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
20  */
21 /*****************************************************************************
22 * E.S.O. - VLT project
23 *
24 * "@(#) $Id: sinfo_new_psf.h,v 1.12 2008-02-12 16:33:50 amodigli Exp $"
25 *
26 * who when what
27 * -------- -------- ----------------------------------------------
28 * amodigli 17/09/03 created
29 */
30 
31 /************************************************************************
32  * sinfo_new_psf.h
33 
34  sinfo_psf.py does the image reconstruction of a set of sky-subtracted,
35  flatfielded,
36  bad pixel corrected and slope of the spectra aligned exposures of a bright
37  star with continuum spectrum. The resulting image can be used to determine
38  the PSF
39  *----------------------------------------------------------------------
40  */
41 
42 /*
43  * header files
44  */
45 
46 #include <cpl.h>
47 #include <irplib_strehl.h>
48 #include "sinfo_msg.h"
49 
50 /*----------------------------------------------------------------------------
51  * Function ANSI C prototypes
52  *--------------------------------------------------------------------------*/
53 
54 /*----------------------------------------------------------------------------
55  Function : sinfo_new_psf()
56  In : ini_file: file name of according .ini file
57  Out : integer (0 if it worked, -1 if it doesn't)
58  Job :
59 
60  sinfo_psf.py does the image reconstruction of a set of sky-subtracted,
61  flatfielded, bad pixel corrected and slope of the spectra aligned exposures
62  of a bright star with continuum spectrum. The resulting image can be used
63  to determine the PSF
64 
65  ---------------------------------------------------------------------------*/
66 int
67 sinfo_new_psf(const char* plugin_id,
68  cpl_parameterlist* config,
69  cpl_frameset* sof,
70  cpl_frameset* ref_set) ;
71 
72 
73 int sinfo_strehl_compute_two(
74  const cpl_image * im1,
75  const cpl_image * im2,
76  double m1,
77  double m2,
78  double lam,
79  double pscale1,
80  double pscale2,
81  double exptime1,
82  double exptime2,
83  int xpos1,
84  int ypos1,
85  int xpos2,
86  int ypos2,
87  double r1,
88  double r2,
89  double r3,
90  double * strehl,
91  double * strehl_err,
92  double * star_bg,
93  double * star_peak,
94  double * star_flux,
95  double * psf_peak,
96  double * psf_flux,
97  double * bg_noise);
98 
99 cpl_error_code
100 sinfo_strehl_compute_one(const cpl_image * im,
101  double m1,
102  double m2,
103  double lam,
104  double dlam,
105  double pscale,
106  int xpos,
107  int ypos,
108  double r1,
109  double r2,
110  double r3,
111  int noise_box_sz,
112  double * strehl,
113  double * strehl_err,
114  double * star_bg,
115  double * star_peak,
116  double * star_flux,
117  double * psf_peak,
118  double * psf_flux,
119  double * bg_noise);
120 
121 
122 
123 
124 cpl_error_code
125 sinfo_get_bkg_4corners(const cpl_image *img,
126  const int bkg_sx,
127  const int bkg_sy,
128  double* bkg,
129  double* std);
130 
131 cpl_error_code
132 sinfo_compute_psf(const double dia,
133  const double occ,
134  const double lambda,
135  const double psize,
136  const double cx,
137  const double cy,
138  const double anamorph,
139  double* psf_peak);
140 cpl_error_code
141 sinfo_get_flux_above_bkg(const cpl_image* img,
142  const float kappa,
143  const float std,
144  double* f);
145 
146 
147 double
148 sinfo_scale_flux(const double p1,
149  const double p2,
150  const double t1,
151  const double t2);
152 
153 #endif
154 
155 /*--------------------------------------------------------------------------*/