photometry.h

00001 
00002 /*----------------------------------------------------------------------------
00003  *                                  E.S.O.
00004  *----------------------------------------------------------------------------
00005  * File name    :   photometry.h
00006  * Author       :   Nicolas Devillard
00007  * Created on   :   Jun 23, 1997
00008  * Hardware     :   Sun Sparc 20
00009  * Software     :   ANSI C under Solaris Unix
00010  *                  Part of ECLIPSE library for Adonis
00011  * Description  :   photometry measurement routines
00012  *--------------------------------------------------------------------------*/
00013 
00014 /*
00015 
00016  $Id: photometry.h,v 1.1 2003/09/03 12:50:47 amodigli Exp $
00017  $Author: amodigli $
00018  $Date: 2003/09/03 12:50:47 $
00019  $Revision: 1.1 $
00020 
00021  */
00022 
00023 #ifndef _PHOTOMETRY_H_
00024 #define _PHOTOMETRY_H_
00025 
00026 /*----------------------------------------------------------------------------
00027  *                              Includes
00028  *--------------------------------------------------------------------------*/
00029 
00030 #include <stdio.h>
00031 #include <stdlib.h>
00032 #include <math.h>
00033 
00034 #include "cube_handling.h"
00035 #include "image_handling.h"
00036 #include "pixel_handling.h"
00037 
00038 /*----------------------------------------------------------------------------
00039  *                              Defines
00040  *--------------------------------------------------------------------------*/
00041 
00042 #define BG_METHOD_AVERAGE       1
00043 #define BG_METHOD_MEDIAN        2
00044 
00045 /*----------------------------------------------------------------------------
00046  *                          Function prototypes
00047  *--------------------------------------------------------------------------*/
00048 
00049 
00050 /*----------------------------------------------------------------------------
00051  * Function :   get_flux_in_disk()
00052  * In       :   image, coordinates of center, radius to use 
00053  * Out      :   double representing flux in ADU
00054  * Job      :   computes the flux in a circular region of an image.
00055  *              provide a center and radius, and the returned value
00056  *              is the flux in ADU in this disk.
00057  *              provide a background value (per pixel) to substract
00058  *              eventually from each pixel.
00059  * Notice   :   to be used with get_background_flux() to measure accurate
00060  *              photometry.
00061  *              coordinates are given in C reference, NOT FITS!
00062  *              first pixel at 0,0 in lower left corner, 
00063  *              last pixel at lx-1, ly-1 in upper right corner
00064  *--------------------------------------------------------------------------*/
00065 
00066 double
00067 get_flux_in_disk(
00068     OneImage    *   in,
00069     double          x_center,
00070     double          y_center,
00071     double          radius,
00072     pixelvalue      background
00073 ) ; 
00074 
00075 
00076 /*----------------------------------------------------------------------------
00077  * Function :   get_background_flux()
00078  * In       :   image, center, internal and external radii, method to use
00079  * Out      :   double, flux value (in ADU) per pixel
00080  * Job      :   computes the flux value in ADU per pixel in a given ring
00081  *              around a center (x_center, y_center) in a radius interval
00082  *              [rad_int, rad_ext]
00083  * Notice   :   pixels on the ring borders are included in the flux sum. 
00084  *              center coordinates are given in C notation, NOT FITS!
00085  *              first pixel at 0,0 in lower left corner, 
00086  *              last pixel at lx-1, ly-1 in upper right corner
00087  *
00088  *              BG_METHOD_AVERAGE averages the pixels on the ring
00089  *              BG_METHOD_MEDIAN  computes the median pixel on the ring
00090  *--------------------------------------------------------------------------*/
00091 double
00092 get_background_flux(
00093     OneImage    *   in,
00094     double          x_center,
00095     double          y_center,
00096     double          rad_int,
00097     double          rad_ext,
00098     int             method
00099 ) ;
00100 
00101 /*---------------------------------------------------------------------------
00102    Function :   estimate_background_standard()
00103    In       :   1 image, method parameters
00104    Out      :   1 double
00105                 returns 0.00 if cannot estimate the background
00106    Job      :   estimate the background in an image
00107    Notice   :   parameters to setup are
00108                 - rejection threshold: pixels are always rejected at
00109                   central + bias * rej_threshold
00110                 - max_iter: maximum # of iterations to perform
00111                 - stop_threshold: quit when improvements to the mean
00112                   are lower than this value
00113  ---------------------------------------------------------------------------*/
00114 
00115 double
00116 estimate_background_standard(
00117     OneImage    *   in,
00118     double          stop_threshold
00119 ) ;
00120 
00121 
00122 #endif
00123 /*------------------------------- end of file ------------------------------*/

Generated on Wed Oct 26 13:08:54 2005 for SINFONI Pipeline Reference Manual by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001