sinfo_new_psf.h

00001 #ifndef SINFO_NEW_PSF_H
00002 #define SINFO_NEW_PSF_H
00003 /*
00004  * This file is part of the ESO SINFONI Pipeline
00005  * Copyright (C) 2004,2005 European Southern Observatory
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA
00020  */
00021 /*****************************************************************************
00022 * E.S.O. - VLT project
00023 *
00024 * "@(#) $Id: sinfo_new_psf.h,v 1.12 2008/02/12 16:33:50 amodigli Exp $"
00025 *
00026 * who       when      what
00027 * --------  --------  ----------------------------------------------
00028 * amodigli  17/09/03  created
00029 */
00030 
00031 /************************************************************************
00032  * sinfo_new_psf.h
00033 
00034  sinfo_psf.py does the image reconstruction of a set of sky-subtracted, 
00035  flatfielded, 
00036  bad pixel corrected and slope of the spectra aligned exposures of a bright 
00037  star with continuum spectrum. The resulting image can be used to determine 
00038  the PSF
00039  *----------------------------------------------------------------------
00040  */
00041 
00042 /*
00043  * header files
00044  */
00045 
00046 #include <cpl.h> 
00047 #include <irplib_strehl.h>
00048 #include "sinfo_msg.h"
00049 
00050 /*----------------------------------------------------------------------------
00051  *                        Function ANSI C prototypes
00052  *--------------------------------------------------------------------------*/
00053 
00054 /*----------------------------------------------------------------------------
00055    Function     :       sinfo_new_psf()
00056    In           :       ini_file: file name of according .ini file
00057    Out          :       integer (0 if it worked, -1 if it doesn't) 
00058    Job          :
00059 
00060  sinfo_psf.py does the image reconstruction of a set of sky-subtracted, 
00061  flatfielded, bad pixel corrected and slope of the spectra aligned exposures 
00062  of a bright star with continuum spectrum. The resulting image can be used 
00063  to determine the PSF
00064 
00065  ---------------------------------------------------------------------------*/
00066 int 
00067 sinfo_new_psf(const char* plugin_id,
00068               cpl_parameterlist* config,
00069               cpl_frameset* sof,
00070               cpl_frameset* ref_set) ;
00071 
00072 
00073 int sinfo_strehl_compute_two(
00074               const cpl_image *   im1,
00075               const cpl_image *   im2,
00076               double              m1,
00077               double              m2,
00078               double              lam,
00079               double              pscale1,
00080               double              pscale2,
00081               double              exptime1,
00082               double              exptime2,
00083               int                 xpos1,
00084               int                 ypos1,
00085               int                 xpos2,
00086               int                 ypos2,
00087               double              r1,
00088               double              r2,
00089               double              r3,
00090               double          *   strehl,
00091               double          *   strehl_err,
00092               double          *   star_bg,
00093               double          *   star_peak,
00094               double          *   star_flux,
00095               double          *   psf_peak,
00096               double          *   psf_flux,
00097               double          *   bg_noise);
00098 
00099 cpl_error_code 
00100 sinfo_strehl_compute_one(const cpl_image *   im,
00101              double              m1,
00102              double              m2,
00103              double              lam,
00104              double              dlam,
00105              double              pscale,
00106              int                 xpos,
00107              int                 ypos,
00108              double              r1,
00109              double              r2,
00110              double              r3,
00111                          int                 noise_box_sz,
00112              double          *   strehl,
00113              double          *   strehl_err,
00114              double          *   star_bg,
00115              double          *   star_peak,
00116              double          *   star_flux,
00117              double          *   psf_peak,
00118              double          *   psf_flux,
00119              double          *   bg_noise);
00120 
00121 
00122 
00123 
00124 cpl_error_code 
00125 sinfo_get_bkg_4corners(const cpl_image *img,
00126                const int bkg_sx,
00127                        const int bkg_sy,
00128                        double* bkg,
00129                        double* std);
00130 
00131 cpl_error_code
00132 sinfo_compute_psf(const double dia, 
00133           const double occ,
00134           const double lambda,
00135           const double psize,
00136           const double cx,
00137           const double cy,
00138           const double anamorph,
00139           double* psf_peak);
00140 cpl_error_code
00141 sinfo_get_flux_above_bkg(const cpl_image* img, 
00142                          const float kappa, 
00143                          const float std, 
00144                          double* f);
00145 
00146 
00147 double
00148 sinfo_scale_flux(const double p1, 
00149                  const double p2, 
00150                  const double t1, 
00151                  const double t2);
00152 
00153 #endif 
00154 
00155 /*--------------------------------------------------------------------------*/

Generated on 8 Mar 2011 for SINFONI Pipeline Reference Manual by  doxygen 1.6.1