pmPSFtry.h

Go to the documentation of this file.
00001 /** @file  pmPSFtry.h
00002  *
00003  * This file contains code that allows the user to try to fit several
00004  * PSF models to an image.
00005  *
00006  *  @author EAM, IfA
00007  *
00008  *  @version $Revision: 1.1.8.1 $ $Name: rel9_1 $
00009  *  @date $Date: 2005/12/12 21:52:22 $
00010  *
00011  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
00012  *
00013  */
00014 
00015 # ifndef PM_PSF_TRY_H
00016 # define PM_PSF_TRY_H
00017 
00018 
00019 /**
00020  * 
00021  * This structure contains a pointer to the collection of sources which will
00022  * be used to test the PSF model form. It lists the pmModelType type of model
00023  * being tests, and contains an element to store the resulting psf
00024  * representation. In addition, this structure carries the complete collection of
00025  * FLT (floating parameter) and PSF (fixed parameter) model fits to each of the
00026  * sources modelFLT and modelPSF. It also contains a mask which is set by the
00027  * model fitting and psf fitting steps. For each model, the value of the quality
00028  * metric is stored in the vector metric and the fitted instrumental magnitude is
00029  * stored in fitMag. The quality metric for the PSF model is the aperture
00030  * magnitude minus the fitted magnitude for each source. This collection of
00031  * aperture residuals is examined in the analysis process, and a linear trend of
00032  * the residual with the inverse object flux (ie, 100:4his structure contains a
00033  * pointer to the collection of sources which will be used to test the PSF model
00034  * form. It lists the pmModelType type of modmag) is fitted. The result of this
00035  * fit is a measured sky bias (systematic error in the sky measured by the fits),
00036  * an effective infinite-magnitude aperture correction (ApResid), and the scatter
00037  * of the aperture correction for the ensemble of PSF stars (dApResid). The
00038  * ultimate metric to intercompare multiple types of PSF models is the value of
00039  * the aperture correction scatter.
00040  * 
00041  * XXX: There are many more members in the SDRS then in the prototype code.
00042  * I stuck with the prototype code.
00043  * 
00044  * 
00045  */
00046 typedef struct
00047 {
00048     pmPSF      *psf;                    ///< Add comment.
00049     psArray    *sources;                ///< pointers to the original sources
00050     psArray    *modelFLT;               ///< model fits, floating parameters
00051     psArray    *modelPSF;               ///< model fits, PSF parameters
00052     psVector   *mask;                   ///< Add comment.
00053     psVector   *metric;                 ///< Add comment.
00054     psVector   *fitMag;                 ///< Add comment.
00055 }
00056 pmPSFtry;
00057 
00058 
00059 /** pmPSFtryMaskValues
00060  * 
00061  * The following datatype defines the masks used by the pmPSFtry analysis to
00062  * identify sources which should or should not be included in the analysis.
00063  * 
00064  */
00065 enum {
00066     PSFTRY_MASK_CLEAR    = 0x00,        ///< Add comment.
00067     PSFTRY_MASK_OUTLIER  = 0x01,        ///< 1: outlier in psf polynomial fit (provided by psPolynomials)
00068     PSFTRY_MASK_FLT_FAIL = 0x02,        ///< 2: flt model failed to converge
00069     PSFTRY_MASK_PSF_FAIL = 0x04,        ///< 3: psf model failed to converge
00070     PSFTRY_MASK_BAD_PHOT = 0x08,        ///< 4: invalid source photometry
00071     PSFTRY_MASK_ALL      = 0x0f,        ///< Add comment.
00072 } pmPSFtryMaskValues;
00073 
00074 
00075 /** pmPSFtryAlloc()
00076  * 
00077  * Allocate a pmPSFtry data structure.
00078  * 
00079  */
00080 pmPSFtry *pmPSFtryAlloc(
00081     psArray *stars,                     ///< Add comment.
00082     char *modelName                     ///< Add comment.
00083 );
00084 
00085 
00086 /** pmPSFtryModel()
00087  * 
00088  * This function takes the input collection of sources and performs a complete
00089  * analysis to determine a PSF model of the given type (specified by model name).
00090  * The result is a pmPSFtry with the results of the analysis.
00091  * 
00092  */
00093 pmPSFtry *pmPSFtryModel(
00094     psArray *sources,                   ///< Add comment.
00095     char *modelName,                    ///< Add comment.
00096     float radius                        ///< Add comment.
00097 );
00098 
00099 
00100 /** pmPSFtryMetric()
00101  * 
00102  * This function is used to measure the PSF model metric for the set of
00103  * results contained in the pmPSFtry structure.
00104  * 
00105  */
00106 bool pmPSFtryMetric(
00107     pmPSFtry *psfTry,                  ///< Add comment.
00108     float RADIUS                       ///< Add comment.
00109 );
00110 
00111 # endif

Generated on Tue Dec 13 13:38:22 2005 for Pan-STARRS Module Library by  doxygen 1.4.5