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

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.6 $ $Name: rel12 $
00009  *  @date $Date: 2006/06/03 01:02:08 $
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  * EXT (floating parameter) and PSF (fixed parameter) model fits to each of the
00026  * sources modelEXT 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    *modelEXT;               ///< 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 typedef 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_EXT_FAIL = 0x02,        ///< 2: ext 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 (psArray *sources, char *modelName, bool poissonErrors);
00081 
00082 /** pmPSFtryModel()
00083  * 
00084  * This function takes the input collection of sources and performs a complete
00085  * analysis to determine a PSF model of the given type (specified by model name).
00086  * The result is a pmPSFtry with the results of the analysis.
00087  * 
00088  */
00089 pmPSFtry *pmPSFtryModel (psArray *sources, char *modelName, float RADIUS, bool poissonErrors);
00090 
00091 /** pmPSFtryMetric()
00092  * 
00093  * This function is used to measure the PSF model metric for the set of
00094  * results contained in the pmPSFtry structure.
00095  * 
00096  */
00097 bool pmPSFtryMetric(
00098     pmPSFtry *psfTry,                  ///< Add comment.
00099     float RADIUS                       ///< Add comment.
00100 );
00101 
00102 /** pmPSFtryMetric_Alt()
00103  *
00104  * This function is used to measure the PSF model metric for the set of
00105  * results contained in the pmPSFtry structure (alternative implementation).
00106  *
00107  */
00108 bool pmPSFtryMetric_Alt(
00109     pmPSFtry *try
00110     ,                      ///< Add comment.
00111     float RADIUS                        ///< Add comment.
00112 );
00113 
00114 # endif

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