Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

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  *
00009  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
00010  *
00011  */
00012 
00013 # ifndef PM_PSF_H
00014 # define PM_PSF_H
00015 
00016 /** pmPSF data structure
00017  * 
00018  * It is useful to generate a model to define the point-spread-function which
00019  * describes the flux distribution for unresolved sources in an image. In
00020  * general, the PSF varies with position in the image. We allow any of the source
00021  * models defined for the pmModel to represent the PSF. For a given source model,
00022  * the 2D spatial variation of all of the source parameters, except the first
00023  * four PSF-independent parameters, are represented as polynomial, stored in a
00024  * psArray. The other elements of the structure define the quality of the PSF
00025  * determination.
00026  * 
00027  */
00028 typedef struct
00029 {
00030     pmModelType type;   ///< PSF Model in use
00031     psArray *params;   ///< Model parameters (psPolynomial2D)
00032     psPolynomial1D *ChiTrend;  ///< Chisq vs flux fit (correction for systematic errors)
00033     psPolynomial4D *ApTrend;  ///< ApResid vs (x,y,rflux) (rflux = ten(0.4*mInst))
00034     //pmGrowthCurve *growth;  ///< apMag vs Radius // move to end as gdb is confused by it here
00035     float ApResid;   ///< apMag - psfMag (for PSF stars)
00036     float dApResid;   ///< scatter of ApResid
00037     float skyBias;   ///< implied residual sky offset from ApResid fit
00038     float skySat;   ///< roll-over of ApResid fit
00039     float chisq;   ///< PSF goodness statistic (unused??)
00040     int nPSFstars;   ///< number of stars used to measure PSF
00041     int nApResid;   ///< number of stars used to measure ApResid
00042     bool poissonErrors;
00043     pmGrowthCurve *growth;  ///< apMag vs Radius
00044 }
00045 pmPSF;
00046 
00047 typedef enum {
00048     PM_PSF_NONE,
00049     PM_PSF_CONSTANT,
00050     PM_PSF_SKYBIAS,
00051     PM_PSF_SKYSAT,
00052     PM_PSF_XY_LIN,
00053     PM_PSF_XY_QUAD,
00054     PM_PSF_SKY_XY_LIN,
00055     PM_PSF_SKYSAT_XY_LIN,
00056     PM_PSF_ALL
00057 } pmPSF_ApTrendOptions;
00058 
00059 /**
00060  * 
00061  * Allocator for the pmPSF structure.
00062  * 
00063  */
00064 pmPSF *pmPSFAlloc(
00065     pmModelType type,   // type of model for PSF
00066     bool poissonErrors   ///< use poissonian errors or not?
00067 );
00068 
00069 
00070 /**
00071  * 
00072  * This function takes a collection of pmModel fitted models from across a
00073  * single image and builds a pmPSF representation of the PSF. The input array of
00074  * model fits may consist of entries to be ignored (noted by a non-zero mask
00075  * entry). The analysis of the models fits a 2D polynomial for each parameter to
00076  * the collection of model parameters as a function of position (and
00077  * normalization?). In this process, some of the input models may be marked as
00078  * outliers and excluded from the fit. These elements will be marked with a
00079  * specific mask value (1 == PSFTRY_MASK_OUTLIER).
00080  * 
00081  */
00082 bool pmPSFFromModels(
00083     pmPSF *psf,                         ///< Add comment
00084     psArray *models,                    ///< Add comment
00085     psVector *mask                      ///< Add comment
00086 );
00087 
00088 
00089 /**
00090  * 
00091  * This function constructs a pmModel instance based on the pmPSF description
00092  * of the PSF. The input is a pmModel with at least the values of the centroid
00093  * coordinates (possibly normalization if this is needed) defined. The values of
00094  * the PSF-dependent parameters are specified for the specific realization based
00095  * on the coordinates of the object.
00096  * 
00097  */
00098 pmModel *pmModelFromPSF(
00099     pmModel *model,                     ///< Add comment
00100     pmPSF *psf                          ///< Add comment
00101 );
00102 
00103 bool pmPSF_MaskApTrend (psPolynomial4D *trend, pmPSF_ApTrendOptions option);
00104 
00105 # endif

Generated on Mon Jul 3 14:24:27 2006 for Pan-STARRS Module Library by  doxygen 1.4.4