Changeset 6006 for trunk/doc/modules/ModulesSDRS.tex
- Timestamp:
- Jan 15, 2006, 2:26:17 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/doc/modules/ModulesSDRS.tex (modified) (21 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/modules/ModulesSDRS.tex
r5937 r6006 1 %%% $Id: ModulesSDRS.tex,v 1. 69 2006-01-07 02:53:15 price Exp $1 %%% $Id: ModulesSDRS.tex,v 1.70 2006-01-16 00:26:17 eugene Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 53 53 54 54 \tableofcontents 55 \pagebreak 56 57 \listoffigures 55 58 \pagebreak 56 59 \pagenumbering{arabic} … … 1632 1635 \subsection{Structures to Describe Sources} 1633 1636 1634 \subsubsection{pmSource and pmPeak}1635 1636 We start by defining a single source detected in a single band:1637 \begin{datatype}1638 typedef struct {1639 pmPeak *peak; // description of peak pixel1640 psImage *pixels; // rectangular region including object pixels1641 psImage *mask; // mask to mark pixels associated with object in region1642 pmMoments *moments; // basic moments measure for the object1643 pmModel *modelPSF; // PSF model parameters and type1644 pmModel *modelFLT; // FLT model parameters and type1645 pmSourceType type; // best identification of object1646 } pmSource;1647 \end{datatype}1648 1649 1637 In the object analysis process, we will use specific mask values to 1650 1638 mark the image pixels. The following structure defines the relevant 1651 1639 mask values. 1652 1640 \begin{datatype} 1653 enum {1641 typedef enum { 1654 1642 PSPHOT_MASK_CLEAR = 0x00, 1655 1643 PSPHOT_MASK_INVALID = 0x01, … … 1657 1645 PSPHOT_MASK_MARKED = 0x08, 1658 1646 } psphotMaskValues; 1647 \end{datatype} 1648 1649 \subsubsection{pmSource and pmPeak} 1650 1651 We define the following structure to represent a single source 1652 detected in a single image. 1653 \begin{datatype} 1654 typedef struct { 1655 pmPeak *peak; // description of peak pixel 1656 psImage *pixels; // rectangular region including object pixels 1657 psImage *weight; // Image variance. 1658 psImage *mask; // Mask which marks pixels associated with objects. 1659 pmMoments *moments; // basic moments measure for the object 1660 pmModel *modelPSF; // PSF model parameters and type 1661 pmModel *modelEXT; // FLT model parameters and type 1662 pmSourceType type; // Best identification of object 1663 pmSourceMode mode; // flags describing the model quality 1664 psArray *blends; // array of other sources blended with this source 1665 float apMag; // measured aperture magnitude for source 1666 float fitMag; // measured model magnitude for source 1667 psRegion region; // area on image covered by selected pixels 1668 } pmSource; 1659 1669 \end{datatype} 1660 1670 … … 1684 1694 PM_PEAK_EDGE, // peak on edge 1685 1695 PM_PEAK_FLAT // peak has equal-value neighbors 1696 PM_PEAK_UNDEF // Undefined. 1686 1697 } pmPeakType; 1687 1698 \end{datatype} … … 1689 1700 \subsubsection{pmMoments and source description} 1690 1701 1691 The pixels which contain the source may be specified with the 1692 \code{psImage *pixels} element, and the mask image may be used to 1693 exclude any pixels which are not considered part of the source. Note 1694 that the source image may be simply a subimage of the main image or a 1695 separate copy if the pixels are modified (eg, by subtracting flux from 1696 other sources, etc). 1702 The pixels which contain the source are specified with the 1703 \code{psImage *pixels} element, a subimage of the image being 1704 analysed. Similarly, the \code{mask} element is a subimage of the 1705 corresponding mask image and the \code{weight} element is a subimage 1706 of the corresponding weight image (image varience). Since these are 1707 subimages, a collection of many objects may include overlapping 1708 pixels; care must be taken that pixel manipulations for one source do 1709 not unintentionally interfere with the other source pixels. The 1710 \code{mask} may be used to exclude any pixels which are not considered 1711 part of the source. Along with these pixel structures, we include the 1712 \code{psRegion region} element which defines the boundaries of the 1713 current associated subimages. 1697 1714 1698 1715 One of the simplest measurements which can be made quickly for an … … 1732 1749 A given source may be identified as most-likely to be one of several 1733 1750 source types. The \code{pmSource} entry \code{pmSourceType} defines 1734 the current best-guess for this source. \tbd{The values given below 1735 are currently illustrative and will require some modification as the 1736 source classification code is developed.} 1751 the current best-guess for this source. 1737 1752 1738 1753 \begin{datatype} 1739 1754 typedef enum { 1740 PM_SOURCE_DEFECT, // a cosmic-ray 1741 PM_SOURCE_SATURATED, // random saturated pixels 1742 1743 PM_SOURCE_SATSTAR, // a saturated star 1744 PM_SOURCE_PSFSTAR, // a PSF star 1745 PM_SOURCE_GOODSTAR, // a good-quality star 1746 1747 PM_SOURCE_POOR_FIT_PSF, // poor quality PSF fit 1748 PM_SOURCE_FAIL_FIT_PSF, // failed to get a good PSF fit 1749 PM_SOURCE_FAINTSTAR, // below S/N cutoff 1750 1751 PM_SOURCE_GALAXY, // an extended object (galaxy) 1752 PM_SOURCE_FAINT_GALAXY, // a galaxy below S/N cutoff 1753 PM_SOURCE_DROP_GALAXY, // ? 1754 PM_SOURCE_FAIL_FIT_GAL, // failed on the galaxy fit 1755 PM_SOURCE_POOR_FIT_GAL, // poor quality galaxy fit 1756 1757 PM_SOURCE_OTHER // unidentified 1758 } pmSourceType; 1755 PM_SOURCE_UNKNOWN, ///< no guess yet made 1756 PM_SOURCE_DEFECT, ///< a cosmic-ray 1757 PM_SOURCE_SATURATED, ///< random saturated pixels 1758 PM_SOURCE_STAR, ///< a good-quality star 1759 PM_SOURCE_EXTENDED, ///< an extended object (eg, galaxy) 1760 } pmSourceType; 1761 \end{datatype} 1762 1763 The related element, \code{pmSourceMode mode}, holds a collection of flags which 1764 are used to indicate the status of the analysis for a source. These 1765 are defined below: 1766 \begin{datatype} 1767 typedef enum { 1768 PM_SOURCE_DEFAULT = 0x0000, ///< no flags are set 1769 PM_SOURCE_PSFMODEL = 0x0001, ///< flags refer to the PSF model 1770 PM_SOURCE_EXTMODEL = 0x0002, ///< flags refer to the EXT model 1771 PM_SOURCE_SUBTRACTED = 0x0004, ///< the model has been subtracted from the image 1772 PM_SOURCE_FITTED = 0x0008, ///< the source has been fitted with a model 1773 PM_SOURCE_FAIL = 0x0010, ///< the model fit failed 1774 PM_SOURCE_POOR = 0x0020, ///< the model fit was poor (low S/N, etc) 1775 PM_SOURCE_PAIR = 0x0040, ///< the model fit is one of a paired source 1776 PM_SOURCE_PSFSTAR = 0x0080, ///< the source was used to construct the image PSF model 1777 PM_SOURCE_SATSTAR = 0x0100, ///< the source is saturated 1778 PM_SOURCE_BLEND = 0x0200, ///< the source is a blend with another source 1779 PM_SOURCE_LINEAR = 0x0400, ///< the source was fitted with the linear PSF model 1780 PM_SOURCE_TEMPSUB = 0x0800, ///< the source has been subtracted, but should be replaced 1781 } pmSourceMode; 1759 1782 \end{datatype} 1760 1783 … … 1777 1800 \end{itemize} 1778 1801 1779 Every source may have two types of models: a PSF model and a FLT 1780 (floating) model. The PSF model represents the best fit of the image 1781 PSF to the specific object. In this case, the PSF-dependent 1782 parameters are specified for the object by the PSF, not by the fit. 1783 The FLT model represents the best fit of the given model to the 1784 object, with all parameters floating in the fit. 1785 1802 \tbd{should be include utility pointers to these parameters so that 1803 functions do not need to know the parameter sequence?} 1804 1805 The structure which carries the information about a given source model 1806 is defined below: 1786 1807 \begin{datatype} 1787 1808 typedef struct { … … 1792 1813 psS32 nDOF; // number of degrees of freedom 1793 1814 psS32 nIter; // number of iterations 1815 pmModelStatus status; // fit status 1794 1816 float radius; // fit radius actually used 1795 1817 } pmModel; 1796 1818 \end{datatype} 1819 1820 The \code{status} element carries the resulting success/failure status 1821 of an attempt to fit the model to the source: 1822 \begin{datatype} 1823 typedef enum { 1824 PM_MODEL_UNTRIED, ///< model fit not yet attempted 1825 PM_MODEL_SUCCESS, ///< model fit succeeded 1826 PM_MODEL_NONCONVERGE, ///< model fit did not converge 1827 PM_MODEL_OFFIMAGE, ///< model fit drove out of range 1828 PM_MODEL_BADARGS ///< model fit called with invalid args 1829 } pmModelStatus; 1830 \end{datatype} 1831 1832 We distinguish several ways in which an analytical model may be 1833 applied to a source. The PSF model represents the best fit of the 1834 image PSF to the specific object. In this case, the PSF-dependent 1835 parameters are specified for the object by the PSF, not by the fit. 1836 The EXT model represents the best fit of the given model to the 1837 object, with all parameters floating in the fit. Such a model would 1838 typically be used to represent and extended object, hence the 1839 abbreviation EXT. In some circumstances, a source may be fitted with 1840 a PSF model in which the position is held fixed, and not allowed to 1841 vary in the model fitting process. We identify such a model as FIX. 1842 Finally, we allow for the case in which two nearly-merged PSFs are 1843 fitted with a single 2-PSF model. We identify such a model as DBL. 1844 The \code{pmSource} structure contains a pointer to both a PSF and an 1845 EXT model, allowing any source to carry information about both 1846 possible fitting modes \tbd{not clear that we actually use this 1847 information; we might be better off simply distinguishing with one of 1848 the pmSourceMode flags}. The value of the model at a specific 1849 coordinate can be determined by calling the function: 1850 \begin{prototype} 1851 psF32 pmModelEval(pmModel *model, psImage *image, psS32 col, psS32 row); 1852 \end{prototype} 1853 For this function, the values of \code{col,row} are in the 1854 \code{image} coordinates, which may be a subimage, while the reference 1855 coordinate for the model is in the parent image coordinates. 1856 1857 In the \code{pmSource} structure, the elements \code{apMag} and 1858 \code{fitMag} are used to carry the measured magnitude of the source 1859 determined either from aperture photometry or from the integral of the 1860 fitted model function. The element \code{blends} is used to carry 1861 pointers to the collection of sources which were found to be blended 1862 with this source. Only the primary source of a blend group carries 1863 this information (see Section~\ref{blends}). 1797 1864 1798 1865 Every model instance belongs to a class of models, defined by the … … 1893 1960 should be used to transfer models between programs or systems. 1894 1961 1962 \subsubsection{pmGrowthCurve} 1963 1964 When the photometry of source is measured in a fixed aperture, there 1965 is always a fraction of the source light which falls outside of the 1966 aperture. The resulting aperture magnitude is thus larger (ie, 1967 fainter) than the actual source. As the aperture is increased, the 1968 amount of loss decreases and the measured magnitude increases. This 1969 trend is the curve of growth for the source. We use the following 1970 structure to carry information about the curve of growth. We use the 1971 PSF model to measure the curve of growth for an image. 1972 1973 \begin{datatype} 1974 typedef struct { 1975 psVector *radius; 1976 psVector *apMag; 1977 psF32 refRadius; 1978 psF32 maxRadius; 1979 psF32 fitMag; 1980 psF32 apRef; // apMag[refRadius] 1981 psF32 apLoss; // fitMag - apRef 1982 } pmGrowthCurve; 1983 \end{datatype} 1984 In this structure, \code{radius} is a monotonically increasing 1985 sequence of radius values (in pixels). The \code{apMag} vector 1986 contains the measured magnitude at any of these radius: this is the 1987 curve-of-growth trend. The remaining entries summaries the 1988 relationship: \code{refRadius} is the global reference radius used for 1989 this image; \code{maxRadius} is the outermost radius at which the 1990 curve of growth was measured; \code{fitMag} is the fitted PSF model 1991 magnitude integrated to infinity; \code{apRef} is the aperture 1992 magnitude at the reference radius; \code{apLoss} is the difference 1993 between the aperture magnitude at the reference radius and the fitted 1994 model magnitude. A few related functions are specified to interact 1995 with the curve of growth: 1996 1997 \begin{prototype} 1998 pmGrowthCurve *pmGrowthCurveAlloc (psF32 minRadius, psF32 maxRadius, psF32 dRadius); 1999 \end{prototype} 2000 This function allocates a \code{pmGrowthCurve} structure and fills in 2001 the \code{radius} vector (see psLib SDRS \code{psVectorCreate}). It 2002 does {\em not} allocate the \code{apMag} vector. 2003 2004 \begin{prototype} 2005 psF32 pmGrowthCurveCorrect (pmGrowthCurve *growth, psF32 radius); 2006 \end{prototype} 2007 This function accepts a \code{growth} curve structure and returns the 2008 correction between the specified radius and the reference radius 2009 ($apMag(refRadius) - apMag(radius)$). 2010 2011 The following two functions are used to search the growth curve to the 2012 corresponding radius entry: 2013 \begin{prototype} 2014 int psVectorBracket (psVector *index, psF32 key, bool above); 2015 psF32 psVectorInterpolate (psVector *index, psVector *value, psF32 key); 2016 \end{prototype} 2017 2018 \subsubsection{Aperture Trends} 2019 2020 With PSF model fitting, there is always some discrepancy between the 2021 model of the PSF and the actual PSF. As a result, the measured flux 2022 from the model will not represent exactly the flux of the source. It 2023 is necessary to measure the correction between the model and the 2024 actual source flux. One way to perform this measurement is to compare 2025 the model flux with the flux measured for bright stars within a fixed 2026 aperture. The quantity to be measured is $dA = m_{\rm aperture} - 2027 m_{\rm fit}$. In practice, $dA$ exhibits variations as a function of 2028 the source position ($x,y$) and the source flux. The variations as a 2029 function of source position can be understood as a change in the PSF 2030 model error as a function of position due to the changing shape of the 2031 PSF (despite the varying PSF model, it is possible that the fitted 2032 model yields positional variations in the residual flux). The 2033 variations in $dA$ as a function of magnitude can be understood as the 2034 result of a bias in the local background measurement (for the fainter 2035 sources) and as a result of non-linearity in the detector setting on 2036 the bright end. We use a 4D polynomial to represent these trends. 2037 The first two dimensions of the polynomial represent the variation of 2038 $dA$ as a function of $x,y$; we provide helper functions to define 1st 2039 and 2nd order polynomials in $x,y$. The next two dimensions are 2040 fitted independently (no cross terms). The first represents the 2041 variation as a function of $r^2 / flux$, where $r$ is the aperture 2042 radius used to measure $dA$; this is the scaling of a magnitude error 2043 in the presence of a constant error in the sky level. The last 2044 dimension represents the variation of $dA$ as a function of the 2045 stellar flux. 2046 2047 The following forms of the aperture correction model may be selected 2048 by the user: 2049 \begin{datatype} 2050 typedef enum { 2051 PM_PSF_NONE, 2052 PM_PSF_CONSTANT, 2053 PM_PSF_SKYBIAS, 2054 PM_PSF_SKYSAT, 2055 PM_PSF_XY_LIN, 2056 PM_PSF_XY_QUAD, 2057 PM_PSF_SKY_XY_LIN, 2058 PM_PSF_SKYSAT_XY_LIN, 2059 PM_PSF_ALL 2060 } pmPSF_ApTrendOptions; 2061 \end{datatype} 2062 2063 The following utility function sets the aperture correction model 2064 coefficient masks to select the specific desired coefficients: 2065 \begin{prototype} 2066 bool pmPSF_MaskApTrend (pmPSF *psf, pmPSF_ApTrendOptions option); 2067 \end{prototype} 2068 1895 2069 \subsubsection{pmPSF, pmPSFtry, and PSF model} 1896 2070 … … 1902 2076 of all of the source parameters, except the first four PSF-independent 1903 2077 parameters, are represented as polynomial, stored in a \code{psArray}. 2078 The structure also contains the aperture correction model 2079 (\code{ApTrend}) and the curve-of-growth model (\code{growth}). The 2080 additional elements are: \code{ApResid}, the constant term in the 2081 aperture correction model; \code{dApResid}, the residual scatter for 2082 bright sources ($S/N > 100$) after applying the aperture correction; 2083 \code{skyBias}, the measured average bias in the sky measurement; 2084 \code{skySat}, the scaling of the flux-dependent portion of the 2085 correction. 2086 1904 2087 The other elements of the structure define the quality of the PSF 1905 determination. 2088 determination. 1906 2089 1907 2090 \begin{datatype} 1908 2091 typedef struct { 1909 psS32 type; ///< PSF Model in use 1910 psArray *params; ///< Model parameters (psPolynomial2D) 1911 psF32 chisq; ///< PSF goodness statistic 1912 psS32 nPSFstars; ///< number of stars used to measure PSF 2092 pmModelType type; ///< PSF Model in use 2093 psArray *params; ///< Model parameters (psPolynomial2D) 2094 psPolynomial4D *ApTrend; ///< ApResid vs (x,y,rflux) (rflux = ten(0.4*mInst) 2095 pmGrowthCurve *growth; ///< apMag vs Radius 2096 float ApResid; ///< ??? 2097 float dApResid; ///< ??? 2098 float skyBias; ///< ??? 2099 float skySat; ///< ??? 2100 float chisq; ///< PSF goodness statistic 2101 int nPSFstars; ///< number of stars used to measure PSF 2102 int nApResid; ///< number of stars used to measure ApResid 1913 2103 } pmPSF; 1914 2104 \end{datatype} 1915 2105 1916 2106 \begin{prototype} 1917 pmModel *pmModelFromPSF (pmModel *model, pmPSF *psf);2107 pmModel *pmModelFromPSF (pmModel *model, pmPSF *psf); 1918 2108 \end{prototype} 1919 2109 This function constructs a \code{pmModel} instance based on the … … 1925 2115 1926 2116 \begin{prototype} 1927 bool pmPSFFromModels (pmPSF *psf, psArray *models, psVector *mask);2117 bool pmPSFFromModels (pmPSF *psf, psArray *models, psVector *mask); 1928 2118 \end{prototype} 1929 2119 This function takes a collection of \code{pmModel} fitted models from … … 1937 2127 mask value (1 == \code{PSFTRY_MASK_OUTLIER}). 1938 2128 2129 We definet he following two functions to convert the PSF model 2130 parameters into a collection of elements on a metadata structure, and 2131 vice versa. These can be used to read and write PSFs to a file and or 2132 a database. 2133 \begin{prototype} 2134 psMetadata *pmPSFtoMD (psMetadata *metadata, pmPSF *psf); 2135 pmPSF *pmPSFfromMD (psMetadata *metadata); 2136 \end{prototype} 2137 1939 2138 We have the capability to test several different model functions in an 1940 2139 attempt to build an accurate PSF for an image. The complete set of … … 1946 2145 pmPSF *psf; 1947 2146 psArray *sources; // pointers to the original sources 1948 psArray *model FLT; // model fits, floating parameters2147 psArray *modelEXT; // model fits, floating parameters 1949 2148 psArray *modelPSF; // model fits, PSF parameters 1950 2149 psVector *mask; 1951 2150 psVector *metric; 1952 2151 psVector *fitMag; 1953 float ApResid;1954 float dApResid;1955 float skyBias;1956 2152 } pmPSFtry; 1957 2153 \end{datatype} … … 1967 2163 the fitted instrumental magnitude is stored in \code{fitMag}. The 1968 2164 quality metric for the PSF model is the aperture magnitude minus the 1969 fitted magnitude for each source. This collection of aperture 1970 residuals is examined in the analysis process, and a linear trend of 1971 the residual with the inverse object flux (ie, $10^{0.4*mag}$) is 1972 fitted. The result of this fit is a measured sky bias (systematic 1973 error in the sky measured by the fits), an effective 1974 infinite-magnitude aperture correction (\code{ApResid}), and the 1975 scatter of the aperture correction for the ensemble of PSF stars 1976 (\code{dApResid}). The ultimate metric to intercompare multiple types 1977 of PSF models is the value of the aperture correction scatter. 2165 fitted magnitude for each source. 2166 2167 This collection of aperture residuals is examined in the analysis 2168 process, and a linear trend of the residual with the inverse object 2169 flux (ie, $10^{0.4*mag}$) is fitted. The result of this fit is a 2170 measured sky bias (systematic error in the sky measured by the fits), 2171 an effective infinite-magnitude aperture correction (\code{ApResid}), 2172 and the scatter of the aperture correction for the ensemble of PSF 2173 stars (\code{dApResid}). The ultimate metric to intercompare multiple 2174 types of PSF models is the value of the aperture correction scatter. 1978 2175 1979 2176 The following functions are used to try out a single PSF model. … … 1999 2196 PSFTRY_MASK_CLEAR = 0x00, 2000 2197 PSFTRY_MASK_OUTLIER = 0x01, // 1: outlier in psf polynomial fit (provided by psPolynomials) 2001 PSFTRY_MASK_ FLT_FAIL = 0x02, // 2: flt model failed to converge2198 PSFTRY_MASK_EXT_FAIL = 0x02, // 2: ext model failed to converge 2002 2199 PSFTRY_MASK_PSF_FAIL = 0x04, // 3: psf model failed to converge 2003 2200 PSFTRY_MASK_BAD_PHOT = 0x08, // 4: invalid source photometry … … 2005 2202 } pmPSFtryMaskValues; 2006 2203 \end{datatype} 2204 2007 2205 2008 2206 \begin{datatype} … … 2079 2277 psF32 y, 2080 2278 psF32 Radius) 2081 \end{prototype} 2082 2083 Define \code{psImage} subarrays for the source located at coordinates 2084 \code{x,y} on the image set defined by \code{readout}. The pixels 2085 defined by this operation consist of a square window (of full width $2 2086 Radius + 1$) centered on the pixel which contains the given 2087 coordinate, in the frame of the readout. The window is defined to 2088 have limits which are valid within the boundary of the \code{readout} 2089 image, thus if the radius would fall outside the image pixels, the 2090 subimage is truncated to only consist of valid pixels. If 2091 \code{readout->mask} or \code{readout->weight} are not \code{NULL}, 2092 matching subimages are defined for those images as well. This 2093 function fails if no valid pixels can be defined (x or y less than 2094 Radius, for example). This function should be used to define a region 2095 of interest around a source, including both source and sky pixels. 2279 2280 bool pmSourceRedefinePixels(pmSource *mySource, 2281 pmReadout *readout, 2282 psF32 x, 2283 psF32 y, 2284 psF32 Radius) 2285 \end{prototype} 2286 2287 The first form defines \code{psImage} subarrays (pixel, weight, and 2288 mask) for the source located at coordinates \code{x,y} on the image 2289 set defined by \code{readout}. The pixels defined by this operation 2290 consist of a square window (of full width $2 Radius + 1$) centered on 2291 the pixel which contains the given coordinate, in the frame of the 2292 readout. The window is defined to have limits which are valid within 2293 the boundary of the \code{readout} image, thus if the radius would 2294 fall outside the image pixels, the subimage is truncated to only 2295 consist of valid pixels. If \code{readout->mask} or 2296 \code{readout->weight} are not \code{NULL}, matching subimages are 2297 defined for those images as well. This function fails if no valid 2298 pixels can be defined (x or y less than Radius, for example). This 2299 function should be used to define a region of interest around a 2300 source, including both source and sky pixels. The second form accepts 2301 an existing source and redefines the pixels if the requested radius 2302 encompasses more pixels than the existing images. 2096 2303 2097 2304 \begin{prototype} 2098 2305 pmSource *pmSourceLocalSky(pmSource *source, 2099 2306 psStatsOptions statsOptions, 2100 psF32Radius)2307 float Radius) 2101 2308 \end{prototype} 2102 2309 … … 2124 2331 source is returned. The moments are measured within the given 2125 2332 circular radius of the \code{source.peak} coordinates. The return 2126 value indicates the success (TRUE) of the operation. 2333 value indicates the success (TRUE) of the operation. This function 2334 also measures the approximate signal-to-noise ratio of the source 2335 (\code{source.SN}) based on the total number of source counts divided 2336 by the square-root of the total source variance, as determined from 2337 the weight image. 2127 2338 2128 2339 \begin{prototype} … … 2172 2383 type for these parameters are \code{psF32}. 2173 2384 2174 The following rules are used to make the classification. Sources with 2175 peak pixel above the value of \code{SATURATE} are identified as type 2176 \code{PM_SOURCE_SATURATED}. For the remaining sources, the signal to 2177 noise of the detection is approximated by: 2178 \[ 2179 SN = \frac{S \sqrt{g}}{\sqrt{S + A B + \frac{A R_e^2}{\sqrt{g}}}} 2180 \] 2181 where 2182 \[ 2183 A = \pi \sigma_x \sigma_y 2184 \] 2185 and $\sigma_x$ is \code{pmMoment.Sx}, $\sigma_y$ is 2186 \code{pmMoment.Sy}, $B$ is \code{pmMoment.Sky} and $S$ is 2187 \code{pmMoment.Sum}. The two parameters, $g$ and $R_e$ are the gain, 2188 stored with the metadata keyword \code{GAIN} and the read-noise in 2189 electrons, stored with the metadata keyword \code{READ_NOISE}. 2190 2191 All sources with: 2192 \[ |\sigma_x - \mbox{CLUMP}_x| < \mbox{CLUMP}_{dx}\] 2193 and 2194 \[ |\sigma_y - \mbox{CLUMP}_y| < \mbox{CLUMP}_{dy}\] 2195 should be identified as type \code{PM_SOURCE_PSFSTAR}. Sources with 2196 \[ \sigma_x < \mbox{CLUMP}_{x} - \mbox{CLUMP}_{dx}\] 2385 The following rules are used to make the classification. The number 2386 of saturated pixels are counted, based on the mask having the 2387 \code{PSPHOT_MASK_SATURATED} bit set. Sources which are greater than 2388 1$\sigma$ larger than the \code{pmPSFClump} center in both dimensions 2389 and which have more than a single saturated pixel are identified as 2390 being a likely saturated star (\code{type = PM_SOURCE_STAR, mode = 2391 PM_SOURCE_SATSTAR}). Sources which are not so large but which have 2392 multiple saturated pixels are identified as saturated regions, ie 2393 bleed trails or hot columns (\code{type = PM_SOURCE_SATURATED}). 2394 2395 Sources with 2396 \[ \sigma_x < 0.05 \] 2397 or 2398 \[ \sigma_y < 0.05\] 2399 should be identified as type \code{PM_SOURCE_DEFECT} (likely cosmic 2400 ray pixel). 2401 2402 Sources with 2403 \[ \sigma_x > \mbox{CLUMP}_{x} + 3\mbox{CLUMP}_{dx}\] 2197 2404 and 2198 \[ \sigma_y < \mbox{CLUMP}_{y} - \mbox{CLUMP}_{dy}\] 2199 should be identified as type \code{PM_SOURCE_DEFECT}. Sources with 2200 \[ \sigma_x > \mbox{CLUMP}_{x} + \mbox{CLUMP}_{dx}\] 2201 and 2202 \[ \sigma_y > \mbox{CLUMP}_{y} + \mbox{CLUMP}_{dy}\] 2203 should be identified as type \code{PM_SOURCE_GALAXY}. All other 2204 sources should be identified as type \code{PM_SOURCE_OTHER}. 2205 \tbd{need to exclude stars outside valid data region}. 2206 2207 Sources with $SN$ less than \code{FAINT_SN_LIM} are identified as type 2208 \code{PM_SOURCE_FAINTSTAR}. Sources with $SN$ greater than 2209 \code{PSF_SN_LIM} are then selected as possible PSF stars. These 2210 sources are used to determine a guess at the shape of the PSF, based 2211 on the collection of $\sigma_x$ and $\sigma_y$ values. 2212 2213 \tbd{this discussion needs to be adjusted to match the implementation} 2405 \[ \sigma_y > \mbox{CLUMP}_{y} + 3\mbox{CLUMP}_{dy}\] 2406 should be identified as type \code{PM_SOURCE_EXTENDED}. 2407 2408 All other sources should be identified as type \code{PM_SOURCE_STAR}. 2409 Of these sources, the mode should be set to \code{PM_SOURCE_PSFSTAR} 2410 for any sources with $SN$ greater than \code{PSF_SN_LIM} which are 2411 within 1.5$\sigma$ of the PSF clump center. These sources are used to 2412 determine a guess at the shape of the PSF, based on the collection of 2413 $\sigma_x$ and $\sigma_y$ values. 2214 2414 2215 2415 \subsection{Object Fitting} … … 2245 2445 function allocates a \code{pmModel} entry for the \code{pmSource} 2246 2446 structure based on the provided model selection. The method of 2247 defining the model parameter guesses are specified for each model 2248 below. The guess values are placed in the model parameters. The 2249 function returns \code{TRUE} on success or \code{FALSE} on failure. 2447 defining the model parameter guesses are determined by using 2448 \code{pmModelGuessFunc_GetFunction} to determine the guess function 2449 for the model of interest. The returned function is called and the 2450 guess values are used to set the model parameters. The function 2451 returns \code{TRUE} on success or \code{FALSE} on failure. 2250 2452 2251 2453 \begin{prototype}
Note:
See TracChangeset
for help on using the changeset viewer.
