pmPSF.h

Go to the documentation of this file.
00001 /* @file  pmPSF.h
00002  *
00003  * This file contains typedefs for the Point-Spread Function and prototypes
00004  * for functions that calculate the PSF.
00005  *
00006  * @author EAM, IfA
00007  *
00008  * @version $Revision: 1.11 $ $Name:  $
00009  * @date $Date: 2007/01/24 02:54:15 $
00010  * Copyright 2004 Maui High Performance Computing Center, University of Hawaii
00011  */
00012 
00013 # ifndef PM_PSF_H
00014 # define PM_PSF_H
00015 
00016 /// @addtogroup Objects Object Detection / Analysis Functions
00017 /// @{
00018 
00019 typedef enum {
00020     PM_PSF_APTREND_ERROR = 0,
00021     PM_PSF_APTREND_NONE,
00022     PM_PSF_APTREND_CONSTANT,
00023     PM_PSF_APTREND_SKYBIAS,
00024     PM_PSF_APTREND_SKYSAT,
00025     PM_PSF_APTREND_XY_LIN,
00026     PM_PSF_APTREND_XY_QUAD,
00027     PM_PSF_APTREND_SKY_XY_LIN,
00028     PM_PSF_APTREND_SKYSAT_XY_LIN,
00029     PM_PSF_APTREND_ALL
00030 } pmPSFApTrendOptions;
00031 
00032 /** pmPSF data structure
00033  * 
00034  * It is useful to generate a model to define the point-spread-function which
00035  * describes the flux distribution for unresolved sources in an image. In
00036  * general, the PSF varies with position in the image. We allow any of the source
00037  * models defined for the pmModel to represent the PSF. For a given source model,
00038  * the 2D spatial variation of all of the source parameters, except the first
00039  * four PSF-independent parameters, are represented as polynomial, stored in a
00040  * psArray. The other elements of the structure define the quality of the PSF
00041  * determination.
00042  * 
00043  */
00044 typedef struct
00045 {
00046     pmModelType type;   ///< PSF Model in use
00047     psArray *params_NEW;   ///< Model parameters (psPolynomial2D)
00048     // XXXXX I am changing params: we will allocate elements for the
00049     // unfitted elements (So, Io, Xo, Yo) and leave them as NULL
00050     // I am using a new name to catch all refs to params with gcc
00051     psPolynomial1D *ChiTrend;  ///< Chisq vs flux fit (correction for systematic errors)
00052     psPolynomial4D *ApTrend;  ///< ApResid vs (x,y,rflux) (rflux = ten(0.4*mInst))
00053     //pmGrowthCurve *growth;  ///< apMag vs Radius // move to end as gdb is confused by it here
00054     float ApResid;   ///< apMag - psfMag (for PSF stars)
00055     float dApResid;   ///< scatter of ApResid
00056     float skyBias;   ///< implied residual sky offset from ApResid fit
00057     float skySat;   ///< roll-over of ApResid fit
00058     float chisq;   ///< PSF goodness statistic (unused??)
00059     int nPSFstars;   ///< number of stars used to measure PSF
00060     int nApResid;   ///< number of stars used to measure ApResid
00061     bool poissonErrors;
00062     pmGrowthCurve *growth;  ///< apMag vs Radius
00063 }
00064 pmPSF;
00065 
00066 /**
00067  * 
00068  * Allocator for the pmPSF structure.
00069  * 
00070  */
00071 pmPSF *pmPSFAlloc(
00072     pmModelType type,     // type of model for PSF
00073     bool poissonErrors,
00074     psPolynomial2D *psfTrendMask
00075 );
00076 
00077 /**
00078  * 
00079  * This function constructs a pmModel instance based on the pmPSF description
00080  * of the PSF. The input is a pmModel with at least the values of the centroid
00081  * coordinates (possibly normalization if this is needed) defined. The values of
00082  * the PSF-dependent parameters are specified for the specific realization based
00083  * on the coordinates of the object.
00084  * 
00085  */
00086 pmModel *pmModelFromPSF(
00087     pmModel *model,                     ///< Add comment
00088     pmPSF *psf                          ///< Add comment
00089 );
00090 
00091 bool pmPSFMaskApTrend (psPolynomial4D *trend, pmPSFApTrendOptions option);
00092 
00093 pmPSFApTrendOptions pmPSFApTrendOptionFromName (char *name);
00094 
00095 double pmPSF_SXYfromModel (psF32 *modelPar);
00096 double pmPSF_SXYtoModel (psF32 *fittedPar);
00097 
00098 bool pmGrowthCurveGenerate (pmReadout *readout, pmPSF *psf, bool ignore);
00099 pmPSF *pmPSFBuildSimple (char *typeName, float sxx, float syy, float sxy, ...);
00100 
00101 /// @}
00102 # endif

Generated on Fri Feb 2 22:35:28 2007 for Pan-STARRS Module Library by  doxygen 1.5.1