Changeset 40588
- Timestamp:
- Dec 23, 2018, 7:41:43 AM (8 years ago)
- File:
-
- 1 edited
-
trunk/doc/release.2015/ps1.analysis/analysis.tex (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/release.2015/ps1.analysis/analysis.tex
r40586 r40588 112 112 % * add example for sky model 113 113 % * Kaiser optimal detection reference 114 % * find a brighter-fatter reference115 114 % * define more tests and generate examples 116 115 % * simulation example of background subtraction … … 119 118 % * check all references 120 119 % \end{verbatim} 120 121 \note{the beginning section needs to be updated to mention the DR1 and 122 DR2 releases, the PV0-PV3 analysis versions, and the basic idea of 123 the IPP stages). 121 124 122 125 This is the fourth in a series of seven papers describing the … … 258 261 stand-alone C program, or as a set of library functions which may be 259 262 integrated into other programs 263 264 \note{quick discussion of the IPP analysis stages; PV0-PV3; DR1 \& DR2} 260 265 261 266 Several variants of \code{psphot} have been used in the PS1 PV3 … … 764 769 artifacts) and (2) the brighter stars are themselves subject to 765 770 additional biases due to saturation and other non-linear effects 766 (c.f., ``the Brighter-Fatter'' effect, \note{REF}). To make a robust 767 choice for $\sigma_w$, we choose a value such that the measured value 768 of $\sigma^{\prime}_{\rm PSF}$ is 65\% of $\sigma_w$. The resulting second 769 moment values are biased somewhat low (\approx 75\% of the truth value 770 for the PS1 PSF profile), but are relatively unbiased as a function of 771 brightness. 771 \citep[c.f., ``the Brighter-Fatter'' 772 effect,][]{2014JInst...9C3048A,2015JInst..10C5032G}. To make a 773 robust choice for $\sigma_w$, we choose a value such that the measured 774 value of $\sigma^{\prime}_{\rm PSF}$ is 65\% of $\sigma_w$. The 775 resulting second moment values are biased somewhat low (\approx 75\% 776 of the truth value for the PS1 PSF profile), but are relatively 777 unbiased as a function of brightness. 772 778 773 779 To choose the value of $\sigma_w$, we try a sequence of values … … 787 793 an aperture with a radius of 4$\sigma_w$ to select the pixels for the 788 794 measurement of the moments. 795 796 %% comfirmed: PSF_MOMENTS_RADIUS = 4 * MOMENTS_GAUSS_SIGMA (\sigma_w) 797 %% factor of 4 is hard-wired in psphotSourceStats.c where MOMENTS_GAUSS_SIGMA is set. 798 %% PSF_MOMENTS_RADIUS used for: moments analysis, Kron analysis (starting radius), 799 %% radial profile wings (starting radius) 789 800 790 801 Once $\sigma_w$ has been determined, moments are measured as defined … … 917 928 some of the observed PSF variations in the images 918 929 919 \note{write up the fitting process to define the grid?}930 % \note{write up the fitting process to define the grid?} 920 931 921 932 Several analytical functions which are likely candidates to describe … … 980 991 interpolated to the center of the model pixel. 981 992 982 Pixels for a given star which are more than XX sigma993 Pixels for a given star which are more than a number of sigmas 983 994 (PSF.RESIDUALS.NSIGMA = 3.0) deviant from the median value of the 984 995 pixels from all stars are rejected. … … 1030 1041 ignored. 1031 1042 1032 % \note{is the pixel scale $0.1 \sigma_w$ or PSF_CLUMP_GRID_SCALE = 0.2?}1033 % psphotSourceStats sets PSF_CLUMP_GRID_SCALE to 0.1 \sigma_w^2, set1034 % to 0.2 by default (before \sigma_w is known).1035 % pmSource uses PSF_CLUMP_GRID_SCALE. note that the image is in Mxx1036 % (\sigma_x^2) not \sigma_x,\sigma_y)1037 1038 1043 Once a peak has been detected in this plane, the centroid and second 1039 1044 moments of this peak are measured. All sources which land within 2 … … 1112 1117 \end{table} 1113 1118 1114 1115 1119 All of the PSF-candidate sources are then re-fitted using the PSF 1116 1120 model to specify the PSF-dependent model parameter values for each … … 1122 1126 the PSF model for this particular image. 1123 1127 1124 The metric used by \code{psphot} to assess the PSF model is the scatter in 1125 the differences between the aperture and fit magnitudes for the PSF 1126 sources. This difference is a critical parameter for any PSF modeling 1127 software as it is a measurement of how well the PSF model captures the 1128 flux of the star. An approximate correction is measured here, with a 1129 more detailed correction measured after all source analysis is 1130 performed (see Section~\ref{sec:aperture.correction}). The PSF model 1131 with the best consistency of the aperture correction is judged to be 1132 the best model. \note{are we making a decision on the order or 1133 anything based on apresid?} 1128 The metric used by \code{psphot} to assess the PSF model is the 1129 scatter in the differences between the aperture and fit magnitudes for 1130 the PSF sources. This difference is a critical parameter for any PSF 1131 modeling software as it is a measurement of how well the PSF model 1132 captures the flux of the star. Aperture photometry is measured for a 1133 circular aperture with a radius of \code{PSF_APERTURE_SCALE} (= 4.5 1134 for the PV3 $3\pi$ analysis) times $\sigma_w$ 1135 (Section~\ref{sec:moments}). The average aperture correction ($m_{\rm 1136 AP} - m_{\rm PSF}$) is measured and, if multiple PSF model types are 1137 selected, the PSF model with the minimum clipped scatter in this 1138 statistic is chosen for the image. An approximate aperture correction 1139 is measured here, with a more detailed correction measured after all 1140 source analysis is performed (see 1141 Section~\ref{sec:aperture.correction}). 1134 1142 1135 1143 \subsection{Bright Source Analysis} … … 1314 1322 M_{\rm minor} = \frac{1}{2}(M_{xx} + M_{yy}) - \frac{1}{2}\sqrt{(M_{xx} - M_{yy})^2 + 4 M_{xy}^2} 1315 1323 \] 1316 If $M_{\rm minor} < 1.2$ pixels$^2$ and the instrumental Kron 1317 magnitude is $< -5.5$, then the source is identified as a cosmic ray 1318 and the associated pixels are masked. 1319 1320 \note{how are / were these parameters set?} 1324 If $M_{\rm minor} < 0.8$ pixels$^2$ and the signal-to-noise of the 1325 flux measured in the moments analysis $> 7$, then the source is 1326 identified as a cosmic ray and the associated pixels are masked. 1327 These values are tuned empirically for the PV3 analysis based on 1328 cosmic rays identified in the GPC1 images. 1329 1330 % Mminor < 0.8 && SN > 7 1331 1332 % for dynamic CR parameters, use object with Mminor < 1.2 and Mkron < 1333 % -5.5 to assess the distribution 1321 1334 1322 1335 \subsubsection{Full PSF Model Fitting} … … 1345 1358 For the PSF model fitting, only pixels within a circular aperture 1346 1359 scaled based on the seeing are used. The radius of the circular 1347 aperture is set to be a fixed multiple of $\sigma_w$, the width of the 1348 Gaussian window function determined based on the analysis of the 1349 second moments (see Section~\ref{sec:moments}). For the PV3 $3\pi$ 1350 analysis, the PSF fit window radius is $7 \times \sigma_w$. 1360 aperture is set to be a fixed multiple (\code{PSF_FIT_RADIUS_SCALE}) 1361 of $\sigma_w$, the width of the Gaussian window function determined 1362 based on the analysis of the second moments (see 1363 Section~\ref{sec:moments}). For the PV3 $3\pi$ analysis, the PSF fit 1364 window radius is $7 \times \sigma_w$. 1351 1365 1352 1366 Sources which are blended with other sources are fitted together as a … … 1854 1868 % \note{is the first convolution done with the Alard-Lupton technique?} 1855 1869 1856 \subsection{Aperture Correction }1870 \subsection{Aperture Correction and Total Aperture Fluxes} 1857 1871 \label{sec:aperture.correction} 1858 1872 … … 1871 1885 least within some range of normal image conditions. So, for example, 1872 1886 two images with different image quality, or with different tracking 1873 and focus errors, will have different PSF models. Since an analytical 1874 model will always fail to represent the flux of the star at some 1875 level, the measured flux of the same source in the two images will be 1876 different (even assuming all other atmospheric and instrumental 1877 effects have been corrected). The amplitude of the error will by 1878 determined by how inconsistently the models represent the actual 1879 source flux. 1887 and focus errors, will have different PSF models. To the extent the 1888 PSF model is inaccurate, the measured flux of the same source in the 1889 two images will be different (even assuming all other atmospheric and 1890 instrumental effects have been corrected). The amplitude of the error 1891 will by determined by how inconsistently the models represent the 1892 actual source flux. 1880 1893 1881 1894 Aperture photometry attempts to avoid these problems, but introduces … … 1891 1904 in the atmosphere. The amplitude and distribution of these two 1892 1905 scattering functions do not change significantly or quickly for a 1893 single telescope and site. 1906 single telescope and site. Aperture photometry can then be used to 1907 correct the PSF photometry. 1894 1908 1895 1909 The difficulty for aperture photometry is the need to make an accurate … … 1901 1915 number of very bright stars is limited in any image, and of course the 1902 1916 brighter stars are more likely to suffer from non-linearity or 1903 saturation. \code{psphot} measures the aperture correction ({\em ApResid}) 1904 for every PSF candidate source and applies this correction to the PSF 1905 model photometry. 1917 saturation. 1918 1919 In order to thread the needle between these effects, \code{psphot} 1920 measures the aperture photometry on a modest-sized aperture, and then 1921 uses the PSF model to extrapolate to a large aperture. When the PSF 1922 fluxes are calculated, the aperture flux for the modest-sized aperture 1923 is also determined. The aperture is a circular aperture with radius 1924 set to a fixed multiple (\code{PSF_APERTURE_SCALE}) of $\sigma_w$, the 1925 width of the Gaussian window function determined based on the analysis 1926 of the second moments (see Section~\ref{sec:moments}). For the PV3 1927 $3\pi$ analysis, the aperture window radius is $4.5 \times \sigma_w$, 1928 while the large reference aperture radius is set to 25 pixels 1929 (\code{PSF_REF_RADIUS} = 6\farcs4). These corrected aperture 1930 magnitudes are saved in the output catalogs as \code{AP_MAG}, the 1931 uncorrected aperture magnitudes are saved as \code{AP_MAG_RAW}, and 1932 the radius used to measure the raw aperture flux is saved as 1933 \code{AP_MAG_RADIUS}. The corresponding flux and the flux error are 1934 saved as \code{AP_FLUX} and \code{AP_FLUX_SIG}. 1935 1936 With these aperture magnitudes in hand, it is now possible to make an 1937 average correction to the PSF magnitudes to bring the PSF and aperture 1938 magnitudes to the same system. This correction is measured using the 1939 same stars from which the PSF model is measured, as long as the PSF 1940 magnitude error for the star is less than 0.03 mag. The correction is 1941 calculated using the weighted average of the values $m_{\rm AP} - 1942 m_{\rm PSF}$. Since the PSF may vary across the image, the correction 1943 is determined as a function of position in the image. Like the PSF 1944 model, the 2D variations of the aperture correction may be modeled as 1945 a polynomial or via interpolation in a grid. For the $3\pi$ PV3 1946 analysis, a grid with a maximum of $6\times 6$ samples per GPC1 chip 1947 image was used. The reported PSF magnitudes for all objects have this 1948 aperture correction applied. 1949 1950 % growth curve analysis in psphot: 1951 % in psphotChoosePSF : call psphotMakeGrowthCurve 1952 % in psphotMakeGrowthCurve : boolean GROWTH_FROM_SOURCES, use 1953 %% pmGrowthCurveGenerateFromSources or 1954 %% pmGrowthCurveGenerate (uses PSF model only) 1955 %% GROWTH_FROM_SOURCES is set to TRUE for default recipe 1956 1957 %% ApTrend: 1958 %% in psphotApResid, called by psphotReadout near the end of the 1959 %% analysis 1960 %% ApTrend = f(x,y) for (apMag - psfMag) for psfMagErr <= 0.03 1961 %% apMag is growth curve corrected 1962 %% psfMag is raw 1963 1964 %% raw psfMag and raw apMag are measured 1965 %% apMag = apMagRaw + growth curve correction (from apRadius to 25 pix 1966 %% = PSF_REF_RADIUS) 1967 %% psfMag = psfMagRaw + aperture trend (<ap - psf> + growth curve) 1906 1968 1907 1969 % How important is this effect? Consider a typical bright source with a … … 2012 2074 Any measurement which relies on a good knowledge of the PSF at the 2013 2075 location of an object either needs to determine the PSF variations 2014 present in the \ippstage{stack} image ,or the measurement will be2076 present in the \ippstage{stack} image or the measurement will be 2015 2077 somewhat degraded. The highly textured PSF variations make this a 2016 2078 very challenging problem: not only would such a PSF model require an … … 2032 2094 %% images for a given stack. 2033 2095 2034 The PV3 $3\pi$ analysis solves this problem by usingthe sources2096 The IPP analysis solves this problem by starting with the sources 2035 2097 detected in the stack images and performing forced photometry on the 2036 2098 individual warp images used to generate the stack. This 2037 \ippstage{fullforce} analysis is performed on all warps for a single 2038 skycell and filter as a single unit, as this matches the arrangement 2039 of the input source catalog from the \ippstage{skycal} stage. When 2040 processing is queued for this stage, an entry is added to the 2041 \ippdbtable{fullForceRun} primary database table linking to the 2042 specific \ippdbcolumn{skycal_id} entry that will be used as the 2043 catalog for the photometry. The \ippdbcolumn{warp_id} values for the 2044 input \ippstage{warp} stage images that contributed to the 2045 \ippstage{stack} associated with that \ippdbcolumn{skycal_id} are 2046 then added to the \ippdbtable{fullForceInput} table, linked to the 2047 primary table by the \ippdbcolumn{ff_id} identifier. The individual 2048 jobs for each warp are then run, which passes the \ippstage{warp} 2049 stage image products along with the \ippstage{skycal} catalog to the 2050 \ippprog{psphotFullForce} program. 2051 2052 In this program, the positions of sources are loaded from the input 2053 catalog. PSF stars are pre-identified \note{how?} and a PSF model 2054 generated for each \ippstage{warp} image based on those stars, using 2055 the same stars for all warps to the extent possible (PSF stars which 2056 are excessively masked on a particular image are not used to model the 2057 PSF). The PSF model is fitted to all of the known source positions in 2058 the warp images. Aperture magnitudes, Kron magnitudes, and moments 2059 are also measured at this stage for each warp. Note that the flux 2060 measurement for a faint, but significant, source from the stack image 2061 may be at a low significance (less than the $5\sigma$ criterion used 2062 when the photometry is not run in this forced mode) in any individual 2063 warp image; the flux may even be negative for specific warps. When 2064 combined together, these low-significance measurements will result in 2065 a signficant measurement as the signal-to-noise increases by the 2066 square root of the number of measurements. 2067 2068 Upon completion of the forced photometry (for point sources as well as 2069 galaxies, discussed below), an entry is added to the 2070 \ippdbtable{fullForceResult} table with the processing statistics for 2071 that combination of \ippdbcolumn{ff_id} and \ippdbcolumn{warp_id}. 2072 Once all of the entries in the \ippdbtable{fullForceInput} table have 2073 finished, a summary operation is run to generate an appropriate 2074 average value for each measurement, by combining the measurements from 2075 each of the inputs. The output catalogs listed in the 2076 \ippdbtable{fullForceResult} table are passed to the 2077 \ippprog{psphotFullForceSummary} to do this averaging. \note{describe 2078 what is done} When this completes, an entry is added to the 2079 \ippdbtable{fullForceSummary}, and the \ippdbtable{fullForceRun} entry 2080 is marked as completed. 2099 forced-photometry analysis is performed using the 2100 \ippprog{psphotFullForce} variant of \ippprog{psphot}. 2101 2102 In this program, the positions of sources are loaded from the output 2103 catalog of the stack photometry. Candidates PSF stars are 2104 pre-identified as those stars used to generate the PSF model in the 2105 stack photometry analysis. A PSF model is generated for each input 2106 warp image based on those stars; PSF stars which are excessively 2107 masked on a particular image are not used to model the PSF. The PSF 2108 model is fitted to all of the known source positions in the warp 2109 images. Aperture magnitudes, Kron magnitudes, and moments are also 2110 measured at this stage for each warp. Note that the flux measurement 2111 for a faint, but significant, source from the stack image may be at a 2112 low significance (less than the $5\sigma$ criterion used when the 2113 photometry is not run in this forced mode) in any individual warp 2114 image; the measured flux may even be negative due to statistical 2115 fluctuations. When combined together, these low-significance 2116 measurements will result in a signficant measurement as the 2117 signal-to-noise increases with the combination of more data. 2118 2119 Individual warp images are processed independently with separate 2120 executions of the \ippprog{psphotFullForce} program. Once all of the 2121 forced photometry measurements (for point sources as well as galaxies, 2122 discussed below) are completed for all of the warps which contributed 2123 to a stack image, the measurements are combined together by other 2124 portions of the IPP system. The PSF photometry measurements are 2125 combined in the context of the DVO database system 2126 \citep{magnier2017.datasystem}, including recalibration of the zero 2127 points for the individual warp. 2081 2128 2082 2129 \subsection{Forced Galaxy Models} … … 2087 2134 this analysis, the galaxy models determined by the 2088 2135 \ippstage{staticsky} photometry analysis are used to seed the analysis 2089 in the individual \ippstage{warp} images. The purposeof this2136 in the individual \ippstage{warp} images. The motivation of this 2090 2137 analysis is the same as the \ippstage{fullforce} PSF photometry: the 2091 2138 PSF of the \ippstage{stack} image is poorly determined due to the … … 2101 2148 elliptical shape, and thus the best galaxy magnitude value. 2102 2149 2103 For each \ippstage{warp} image, the \ippstage{staticsky} value for the2104 major and minor axis are used as the center of a $7\times{} 7$ grid2150 For each \ippstage{warp} image, the \ippstage{staticsky} values for 2151 the major and minor axis are used as the center of a $5 \times 5$ grid 2105 2152 search of the major and minor axis parameter values. The grid spacing 2106 2153 is defined as a function of the signal-to-noise of the galaxy in the 2107 2154 stack image so that bright galaxies are measured with a much finer 2108 grid spacing that faint galaxies \note{need to quantify this}. For 2109 each grid point, the major and minor axis values at that point are 2110 determined for the model. The model is then generated and convolved 2111 with the PSF model for the \ippstage{warp} image at that point. The 2112 resulting model is then compared to the \ippstage{warp} pixel data 2113 values and the best fit normalization value is defined. The 2114 normalization and the $\chi^2$ value for each grid point is recorded. 2115 2116 For a given galaxy, the result is a collection of $\chi^2$ values for 2117 each of the grid points spanning all \ippstage{warp} images. A single 2118 $\chi^2$ grid can then be made by combining each grid point across the 2119 inputs. The combined $\chi^2$ for a single grid point is simply the 2120 sum of all $\chi^2$ values at that point. If, for a single \ippstage{warp} 2121 image, the galaxy model is excessively masked, then that image will be 2122 dropped for all grid points for that galaxy. The reduced $\chi^2$ 2123 values can be determined by tracking the total number of pixels 2124 used across all inputs to generate the combined $\chi^2$ values. From 2125 the combined grid of $\chi^2$ values, the point in the grid with the 2126 minimum $\chi^2$ is found. Quadratic interpolation is used to 2127 determine the major, minor axis values for the interpolated minimum 2128 $\chi^2$ value. The errors on these two parameters is then found by 2129 determining the contour at which the \note{reduced?} $\chi^2$ 2130 increases by 1. 2131 2132 Thus the \ippstage{fullforce} galaxy analysis uses the PSF information 2133 from each \ippstage{warp} to determine a best set of convovled galaxy 2134 models for each object in the \ippstage{skycal} catalog. 2135 \note{discuss the subset of galaxy models and objects}. 2155 grid spacing than faint galaxies. For both the major and minor axis 2156 directions, values of ($1 - \frac{3.0}{S/N}$, $1 - \frac{1.5}{S/N}$, 2157 1.0, $1 + \frac{1.5}{S/N}$, $1 + \frac{3.0}{S/N}$) times the dimension 2158 are tested. For each grid point, the major and minor axis values at 2159 that point are used to generate the model. The model is then 2160 convolved with the PSF model for the \ippstage{warp} image at that 2161 point. The resulting convolved model is then compared to the 2162 \ippstage{warp} pixel data values and the best fit normalization value 2163 is determined. The integrated flux, flux error, and the $\chi^2$ 2164 value for each grid point are recorded. 2165 2166 For a given galaxy, the result is a collection of $\chi^2$ values, 2167 fluxes, and flux errors for each of the grid points spanning all 2168 \ippstage{warp} images. A single $\chi^2$ grid can then be made by 2169 combining each grid point across the inputs. The combined $\chi^2$ 2170 for a single grid point is simply the sum of all $\chi^2$ values at 2171 that point. If, for a single \ippstage{warp} image, the galaxy model 2172 is excessively masked, then that image will be dropped for all grid 2173 points for that galaxy. The reduced $\chi^2$ values can be determined 2174 by tracking the total number of pixels used across all inputs to 2175 generate the combined $\chi^2$ values. From the combined grid of 2176 $\chi^2$ values, the point in the grid with the minimum $\chi^2$ is 2177 found. Quadratic interpolation is used to determine the major, minor 2178 axis values for the interpolated minimum $\chi^2$ value. The errors 2179 on these two parameters is then found by determining the contour at 2180 which the \note{reduced?} $\chi^2$ increases by 1. 2181 2182 In this way, the \ippstage{fullforce} galaxy analysis uses the PSF 2183 information from each \ippstage{warp} to determine a best set of 2184 convolved galaxy models for each object in the \ippstage{skycal} 2185 catalog. 2186 2187 % galaxy model fits performed based on limits set in psphotChooseAnalysisOptions.c 2188 2189 % petrosian analysis performed on same objects as galaxy model fits 2190 % if EXTENDED_SOURCE_PETROSIAN == TRUE (TRUE for PV3 stack - STACKPHOT) 2191 2192 % galaxy model fits are performed on : 2193 % all if (PSPHOT.EXT.FIT.ALL.SOURCES == TRUE) (FALSE for PV3 stack) 2194 % (even so, if density is higher than PSPHOT.EXT.FIT.ALL.THRESH, skip) 2195 2196 % only extended sources (based on EXT.NSIGMA) if EXT.NSIGMA.LIMIT.USE 2197 % == TRUE (FALSE for PV3 stacks) 2198 2199 % fit sources / measure petrosian to fixed flux limit if limits are 2200 % defined (they are for PV3) 2201 2202 % mag limits by filter, e.g., : petro 25, extfit 21.5 2203 % are translated to flux in counts and compared to Kron flux 2204 2205 % SN limit is used only if fixed flux limits are not set 2206 % SN limit set to EXTENDED_SOURCE_SN_LIM (10.0 for PV3) 2207 % S/N limit for Kron flux, 2208 2209 % galaxy coordinate limits: 2210 % if |b| > 20.0 + 15.0 exp(-long^2 / (2 * 50^2)) 2136 2211 2137 2212 \section{Difference Image Photometry}
Note:
See TracChangeset
for help on using the changeset viewer.
