Changeset 40705
- Timestamp:
- May 1, 2019, 11:52:08 AM (7 years ago)
- Location:
- trunk/doc/release.2015/ps1.analysis
- Files:
-
- 6 added
- 3 edited
-
analysis.tex (modified) (12 diffs)
-
examples/.mana (modified) (1 diff)
-
examples/moments.sh (modified) (1 diff)
-
pics/galaxy.dev.complete.png (added)
-
pics/galaxy.dev.params.png (added)
-
pics/galaxy.exp.complete.png (added)
-
pics/galaxy.exp.params.png (added)
-
pics/mag.resid.aper.png (added)
-
pics/mag.resid.psf.png (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/release.2015/ps1.analysis/analysis.tex
r40700 r40705 417 417 \end{itemize} 418 418 419 \section{ \nocode{psphot} Analysis Process}419 \section{Basic Analysis} 420 420 421 421 \subsection{Overview} 422 422 423 The \ippprog{psphot} analysis is divided into several major stages, as424 listed below. 423 The basic \ippprog{psphot} analysis is divided into several major 424 stages, as listed below. 425 425 426 426 \begin{enumerate} … … 441 441 properties (aperture or PSF) 442 442 443 \item {\bf Extended Source Analysis} Detailed measurements relevant to444 galaxies and/or other extended (non-PSF) sources.445 446 443 \item {\bf Aperture corrections} Measure the curve-of-growth, spatial 447 444 aperture variations, and background-error corrections. … … 450 447 difference image, variance image, etc, as selected. 451 448 \end{enumerate} 449 450 In addition to this basic sequence, additional analysis steps may be 451 performed. An ``extended source'' analysis mode is available to 452 measure photometry and morphology of galaxies and other resolved 453 sources. Forced photometry may be performed for both point-like and 454 extended sources. A special mode is available for the photometry of 455 sources detected in difference images. These different modes are 456 discussed in their own sections below. 452 457 453 458 Table~\ref{tab:measurements} lists the types of … … 1938 1943 \code{PM_SOURCE_MODE2_MATCHED} set. 1939 1944 1940 \subsection{Extended Source Analysis} 1945 \subsection{Aperture Correction and Total Aperture Fluxes} 1946 \label{sec:aperture.correction} 1947 1948 A PSF model will always fail to describe the flux of the stellar 1949 sources at some level. For high-precision photometry, we need to be 1950 able to correct for the difference between the PSF model fluxes and 1951 the total flux of the sources. In the end, all astronomical 1952 photometry is in some sense a relative measurement between two images. 1953 Whether the goal is calibration of a science image taken at one 1954 location to a standard star image at another location, or the goal is 1955 simply the repetitive photometry of the same star at the same location 1956 in the image, it is always necessary to compare the photometry between 1957 two images. If this measurement is to be consistent, then the 1958 measurement must represent the flux of the stars in the same way 1959 regardless of the conditions under which the images were taken, at 1960 least within some range of normal image conditions. So, for example, 1961 two images with different image quality, or with different tracking 1962 and focus errors, will have different PSF models. To the extent the 1963 PSF model is inaccurate, the measured flux of the same source in the 1964 two images will be different (even assuming all other atmospheric and 1965 instrumental effects have been corrected). The amplitude of the error 1966 will by determined by how inconsistently the models represent the 1967 actual source flux. 1968 1969 Aperture photometry attempts to avoid these problems, but introduces 1970 other difficulties. In aperture photometry, if a large enough 1971 aperture is chosen, the amount of flux which is lost will be a small 1972 fraction of the total source flux. Even more importantly, as the 1973 image conditions change, the amount lost will change by an even 1974 smaller fraction, at least for a large aperture. This can be seen by 1975 the fact that the dominant variations in the image quality are in the 1976 focus, tracking and seeing. All of these errors initially affect the 1977 cores of the stellar images, rather than the wide wings. The wide 1978 wings are largely dominated by scattering in the optics and scattering 1979 in the atmosphere. The amplitude and distribution of these two 1980 scattering functions do not change significantly or quickly for a 1981 single telescope and site. Aperture photometry can then be used to 1982 correct the PSF photometry. 1983 1984 The difficulty for aperture photometry is the need to make an accurate 1985 measurement of the local background for each source. As the aperture 1986 grows, errors in the measurement of the sky flux start to become 1987 dominant. If the aperture is too small, then variations in the image 1988 quality are dominant. The brighter is the source, the smaller is the 1989 error introduced by the large size of the aperture. However, the 1990 number of very bright stars is limited in any image, and of course the 1991 brighter stars are more likely to suffer from non-linearity or 1992 saturation. 1993 1994 \begin{figure*}[htbp] 1995 \begin{center} 1996 \includegraphics[width=\hsize,clip]{pics/{mag.resid.psf}.png} 1997 \caption{\label{fig:mag.resid.psf} PSF Photometry demonstration. 1998 The bottom panel shows the difference of the measured PSF 1999 photometry for stars in the first image of the STS sequence 2000 compared to the next 17 images, after correction for a relative 2001 zero point. Black dots are from stars for which both measurements 2002 have {\tt PSF\_QF} $> 0.95$, while grey dots have lower {\tt 2003 PSF\_QF} values. The top three panels show histograms in three 2004 instrumental magnitude ranges for the magnitude difference divided 2005 by the reported measurement error: $N\sigma = (m_0 - m_1) / 2006 \sqrt{\sigma_0^2 + \sigma_1^2}$. The red curves are Gaussian fits 2007 to these histograms, with the measured standard deviations in the 2008 upper-right corners of the plots. The instrumental magnitude 2009 ranges are listed in the upper-left corners of the three plots and 2010 the boundaries are marked as vertical red lines in the lower plot. 2011 } 2012 \end{center} 2013 \end{figure*} 2014 2015 \begin{figure*}[htbp] 2016 \begin{center} 2017 \includegraphics[width=\hsize,clip]{pics/{mag.resid.aper}.png} 2018 \caption{\label{fig:mag.resid.aper} Aperture Photometry 2019 demonstration. The plots show identical measurements to those in 2020 Figure~\ref{fig:mag.resid.psf}, but for aperture photometry, as discussed in 2021 Section~\ref{sec:aperture.correction}, rather than PSF photometry.} 2022 \end{center} 2023 \end{figure*} 2024 2025 In order to thread the needle between these effects, \ippprog{psphot} 2026 measures the aperture photometry on a modest-sized aperture, and then 2027 uses the PSF model to extrapolate to a large aperture. When the PSF 2028 fluxes are calculated, the aperture flux for the modest-sized aperture 2029 is also determined. The aperture is a circular aperture with radius 2030 set to a fixed multiple (\code{PSF_APERTURE_SCALE}) of $\sigma_w$, the 2031 width of the Gaussian window function determined based on the analysis 2032 of the second moments (see Section~\ref{sec:moments}). For the PV3 2033 $3\pi$ analysis, the aperture window radius is $4.5 \times \sigma_w$, 2034 while the large reference aperture radius is set to 25 pixels 2035 (\code{PSF_REF_RADIUS} = 6\farcs4). These corrected aperture 2036 magnitudes are saved in the output catalogs as \code{AP_MAG}, the 2037 uncorrected aperture magnitudes are saved as \code{AP_MAG_RAW}, and 2038 the radius used to measure the raw aperture flux is saved as 2039 \code{AP_MAG_RADIUS}. The corresponding flux and the flux error are 2040 saved as \code{AP_FLUX} and \code{AP_FLUX_SIG}. 2041 2042 With these aperture magnitudes in hand, it is now possible to make an 2043 average correction to the PSF magnitudes to bring the PSF and aperture 2044 magnitudes to the same system. This correction is measured using the 2045 same stars from which the PSF model is measured, as long as the PSF 2046 magnitude error for the star is less than 0.03 mag. The correction is 2047 calculated using the weighted average of the values $m_{\rm AP} - 2048 m_{\rm PSF}$. Since the PSF may vary across the image, the correction 2049 is determined as a function of position in the image. Like the PSF 2050 model, the 2D variations of the aperture correction may be modeled as 2051 a polynomial or via interpolation in a grid. For the $3\pi$ PV3 2052 analysis, a grid with a maximum of $6\times 6$ samples per GPC1 chip 2053 image was used. The reported PSF magnitudes for all objects have this 2054 aperture correction applied. 2055 2056 % growth curve analysis in psphot: 2057 % in psphotChoosePSF : call psphotMakeGrowthCurve 2058 % in psphotMakeGrowthCurve : boolean GROWTH_FROM_SOURCES, use 2059 %% pmGrowthCurveGenerateFromSources or 2060 %% pmGrowthCurveGenerate (uses PSF model only) 2061 %% GROWTH_FROM_SOURCES is set to TRUE for default recipe 2062 2063 %% ApTrend: 2064 %% in psphotApResid, called by psphotReadout near the end of the 2065 %% analysis 2066 %% ApTrend = f(x,y) for (apMag - psfMag) for psfMagErr <= 0.03 2067 %% apMag is growth curve corrected 2068 %% psfMag is raw 2069 2070 %% raw psfMag and raw apMag are measured 2071 %% apMag = apMagRaw + growth curve correction (from apRadius to 25 pix 2072 %% = PSF_REF_RADIUS) 2073 %% psfMag = psfMagRaw + aperture trend (<ap - psf> + growth curve) 2074 2075 % How important is this effect? Consider a typical bright source with a 2076 % flux of (say) 40,000 counts in an image of background 1000 counts per 2077 % pixel, with FWHM of 4 pixels. In principle, the flux of this source 2078 % should be measurable with an accuracy of roughly 0.57\% 2079 % ($\frac{\sqrt{40000 + 1000 \times 12}}{40000}$). However, the 2080 % measurement of the sky is limited at some finite level by Poisson 2081 % statistics. If we are required to use an aperture of (say) 25 pixels 2082 % in radius (eg, 5 arcseconds for an 0.2 arcsec / pixel detector), and 2083 % we have an annulus of twice this radius to measure the local sky, then 2084 % we will have an error of XXX. 2085 % 2086 % \note{outline the variation of {\em ApResid} as a function of 2087 % magnitude}. 2088 2089 %%% \ippprog{psphot} measures the aperture correction ({\em ApResid}) for every PSF 2090 %%% candidate source, then calculates the trend of this correction as a 2091 %%% function of the magnitude. This trend is fitted with a line. The 2092 %%% resulting function can be used to determine the effective aperture 2093 %%% correction for an infinite flux source and the average bias inherent 2094 %%% in the sky measurement for the image. The scatter of the 2095 %%% PSF-candidate source measurements about this trend is a measure of how 2096 %%% well we can measure photometry from the image by applying the specific 2097 %%% PSF model. The slope of this trend is a measure of the bias in the 2098 %%% local sky measurment for each source. In principal, the measured sky 2099 %%% levels could be modified by this bias. More generally, the measured 2100 %%% bias in a collection of images could be used to improve the model 2101 %%% fitting or sky fitting portion of the software the remove the bias 2102 %%% term. 2103 2104 \ippprog{psphot} allows a collection of PSF model functions to be tried on all 2105 PSF candidate sources. For each model test, the above corrected 2106 ApResid scatter is measured. The PSF model function with the smallest 2107 value for the ApResid scatter is then used by \ippprog{psphot} as the best PSF 2108 model for this image. The number of models to be tested is specified 2109 by the configuration keyword \code{PSF_MODEL_N}. The configuration 2110 variables \code{PSF_MODEL_0}, \code{PSF_MODEL_1}, through 2111 \code{PSF_MODEL_N - 1} specify the names of the models which should be 2112 tested. 2113 2114 \subsection{Stellar Photometry Example} 2115 2116 To illustrate the quality of the stellar photometry as measured with 2117 PSF and aperture magnitudes, we show the results of an analysis of a 2118 set of 18 images obtained by PS1 19 February 2010. These images were 2119 obtained for the stellar transit survey ``Pan-Planets'' 2120 \citep{2016A&A...587A..49O} and thus target a relatively dense 2121 Galactic plane field. The observations were obtained with 2122 approximately consistent pointing, reducing our sensitivity to 2123 small-scale variations in the flat-field structures. 2124 2125 Figures~\ref{fig:mag.resid.psf} and ~\ref{fig:mag.resid.aper} show 2126 comparisons of the PSF and aperture photometry measured for these 18 2127 images. In these figures, the photometry has been measured using the 2128 configuration for \ippprog{psphot} as used for the full PV3 2129 \ippstage{chip} analysis. The first image of the sequence is compared 2130 to the remaining 17 images. A relative zero point correction is 2131 applied, measured as the median of the photometry difference for stars 2132 with signal-to-noise greater than 50. The combined error is reported 2133 and used to generate the histograms shows in the figures. From these 2134 two figures, one can observe the trade-off between PSF and aperture 2135 photometry. For the brightest instrumental magnitudes, corresponding 2136 to signal-to-noise ratios greater than roughly 300, aperture 2137 magnitudes provide a more consistent measurement of the stellar 2138 fluxes, while the PSF magnitudes are more reliable for fainter 2139 sources. Catastophic failures or extreme outliers are also reduced 2140 for the PSF photometry. 2141 2142 We largely attribute the behavior on the bright end to systematic 2143 errors in the photometry due to our inability to perfectly represent 2144 the shape of the PSF. The PSF of stars at the bright end will depend 2145 on the brightness because of the ``Brighter-Fatter'' effect 2146 \citep[][]{2014JInst...9C3048A,2015JInst..10C5032G}, in which the 2147 charge already present in the pixels will force the newly arriving 2148 photoeletrons to be systematically pushed away from the accumulating 2149 stellar image, but we do not include a brightness term in our PSF 2150 model. Detector or electronic non-linearity may also affect the PSF 2151 shape and thus the PSF photometry, though non-linearity will affect 2152 the reported photometry for both PSF and aperture magnitudes. 2153 2154 We believe the observed behavior at the faint end is primarily a 2155 result of the increased crowding. Aperture photometry is more 2156 adversely affected by close neighbors than PSF photometry. Compared 2157 to the formal errors, the faint PSF photometry is the most reliable, 2158 with the aperture photometry degrading rapidly as the flux of the star 2159 decreases. 2160 2161 \section{Extended Source Analysis} 2162 \label{sec:extended.source} 1941 2163 1942 2164 After the initial, fast analysis of the image relying primarily on the … … 2013 2235 % if |b| > 20.0 + 15.0 exp(-long^2 / (2 * 50^2)) 2014 2236 2015 \subs ubsection{Radial Profiles}2237 \subsection{Radial Profiles} 2016 2238 \label{sec:radial.profile.v2} 2017 2239 … … 2082 2304 % \note{these profiles are not saved in PSPS} 2083 2305 2084 \subs ubsection{Petrosian Radii and Magnitudes}2306 \subsection{Petrosian Radii and Magnitudes} 2085 2307 \label{sec:petrosian} 2086 2308 … … 2141 2363 2142 2364 2143 \subs ubsection{Convolved Galaxy Model Fits}2365 \subsection{Convolved Galaxy Model Fits} 2144 2366 \label{sec:galaxy.conv.fit} 2145 2367 … … 2347 2569 any of the parameters. 2348 2570 2349 \subs ubsection{Fixed Aperture Photometry}2571 \subsection{Fixed Aperture Photometry} 2350 2572 \label{sec:fixed.aperture.photom} 2351 2573 … … 2397 2619 % last bin is first with inner radius >= skyRadius 2398 2620 2399 \subsection{Aperture Correction and Total Aperture Fluxes} 2400 \label{sec:aperture.correction} 2401 2402 A PSF model will always fail to describe the flux of the stellar 2403 sources at some level. For high-precision photometry, we need to be 2404 able to correct for the difference between the PSF model fluxes and 2405 the total flux of the sources. In the end, all astronomical 2406 photometry is in some sense a relative measurement between two images. 2407 Whether the goal is calibration of a science image taken at one 2408 location to a standard star image at another location, or the goal is 2409 simply the repetitive photometry of the same star at the same location 2410 in the image, it is always necessary to compare the photometry between 2411 two images. If this measurement is to be consistent, then the 2412 measurement must represent the flux of the stars in the same way 2413 regardless of the conditions under which the images were taken, at 2414 least within some range of normal image conditions. So, for example, 2415 two images with different image quality, or with different tracking 2416 and focus errors, will have different PSF models. To the extent the 2417 PSF model is inaccurate, the measured flux of the same source in the 2418 two images will be different (even assuming all other atmospheric and 2419 instrumental effects have been corrected). The amplitude of the error 2420 will by determined by how inconsistently the models represent the 2421 actual source flux. 2422 2423 Aperture photometry attempts to avoid these problems, but introduces 2424 other difficulties. In aperture photometry, if a large enough 2425 aperture is chosen, the amount of flux which is lost will be a small 2426 fraction of the total source flux. Even more importantly, as the 2427 image conditions change, the amount lost will change by an even 2428 smaller fraction, at least for a large aperture. This can be seen by 2429 the fact that the dominant variations in the image quality are in the 2430 focus, tracking and seeing. All of these errors initially affect the 2431 cores of the stellar images, rather than the wide wings. The wide 2432 wings are largely dominated by scattering in the optics and scattering 2433 in the atmosphere. The amplitude and distribution of these two 2434 scattering functions do not change significantly or quickly for a 2435 single telescope and site. Aperture photometry can then be used to 2436 correct the PSF photometry. 2437 2438 The difficulty for aperture photometry is the need to make an accurate 2439 measurement of the local background for each source. As the aperture 2440 grows, errors in the measurement of the sky flux start to become 2441 dominant. If the aperture is too small, then variations in the image 2442 quality are dominant. The brighter is the source, the smaller is the 2443 error introduced by the large size of the aperture. However, the 2444 number of very bright stars is limited in any image, and of course the 2445 brighter stars are more likely to suffer from non-linearity or 2446 saturation. 2447 2448 In order to thread the needle between these effects, \ippprog{psphot} 2449 measures the aperture photometry on a modest-sized aperture, and then 2450 uses the PSF model to extrapolate to a large aperture. When the PSF 2451 fluxes are calculated, the aperture flux for the modest-sized aperture 2452 is also determined. The aperture is a circular aperture with radius 2453 set to a fixed multiple (\code{PSF_APERTURE_SCALE}) of $\sigma_w$, the 2454 width of the Gaussian window function determined based on the analysis 2455 of the second moments (see Section~\ref{sec:moments}). For the PV3 2456 $3\pi$ analysis, the aperture window radius is $4.5 \times \sigma_w$, 2457 while the large reference aperture radius is set to 25 pixels 2458 (\code{PSF_REF_RADIUS} = 6\farcs4). These corrected aperture 2459 magnitudes are saved in the output catalogs as \code{AP_MAG}, the 2460 uncorrected aperture magnitudes are saved as \code{AP_MAG_RAW}, and 2461 the radius used to measure the raw aperture flux is saved as 2462 \code{AP_MAG_RADIUS}. The corresponding flux and the flux error are 2463 saved as \code{AP_FLUX} and \code{AP_FLUX_SIG}. 2464 2465 With these aperture magnitudes in hand, it is now possible to make an 2466 average correction to the PSF magnitudes to bring the PSF and aperture 2467 magnitudes to the same system. This correction is measured using the 2468 same stars from which the PSF model is measured, as long as the PSF 2469 magnitude error for the star is less than 0.03 mag. The correction is 2470 calculated using the weighted average of the values $m_{\rm AP} - 2471 m_{\rm PSF}$. Since the PSF may vary across the image, the correction 2472 is determined as a function of position in the image. Like the PSF 2473 model, the 2D variations of the aperture correction may be modeled as 2474 a polynomial or via interpolation in a grid. For the $3\pi$ PV3 2475 analysis, a grid with a maximum of $6\times 6$ samples per GPC1 chip 2476 image was used. The reported PSF magnitudes for all objects have this 2477 aperture correction applied. 2478 2479 % growth curve analysis in psphot: 2480 % in psphotChoosePSF : call psphotMakeGrowthCurve 2481 % in psphotMakeGrowthCurve : boolean GROWTH_FROM_SOURCES, use 2482 %% pmGrowthCurveGenerateFromSources or 2483 %% pmGrowthCurveGenerate (uses PSF model only) 2484 %% GROWTH_FROM_SOURCES is set to TRUE for default recipe 2485 2486 %% ApTrend: 2487 %% in psphotApResid, called by psphotReadout near the end of the 2488 %% analysis 2489 %% ApTrend = f(x,y) for (apMag - psfMag) for psfMagErr <= 0.03 2490 %% apMag is growth curve corrected 2491 %% psfMag is raw 2492 2493 %% raw psfMag and raw apMag are measured 2494 %% apMag = apMagRaw + growth curve correction (from apRadius to 25 pix 2495 %% = PSF_REF_RADIUS) 2496 %% psfMag = psfMagRaw + aperture trend (<ap - psf> + growth curve) 2497 2498 % How important is this effect? Consider a typical bright source with a 2499 % flux of (say) 40,000 counts in an image of background 1000 counts per 2500 % pixel, with FWHM of 4 pixels. In principle, the flux of this source 2501 % should be measurable with an accuracy of roughly 0.57\% 2502 % ($\frac{\sqrt{40000 + 1000 \times 12}}{40000}$). However, the 2503 % measurement of the sky is limited at some finite level by Poisson 2504 % statistics. If we are required to use an aperture of (say) 25 pixels 2505 % in radius (eg, 5 arcseconds for an 0.2 arcsec / pixel detector), and 2506 % we have an annulus of twice this radius to measure the local sky, then 2507 % we will have an error of XXX. 2508 % 2509 % \note{outline the variation of {\em ApResid} as a function of 2510 % magnitude}. 2511 2512 %%% \ippprog{psphot} measures the aperture correction ({\em ApResid}) for every PSF 2513 %%% candidate source, then calculates the trend of this correction as a 2514 %%% function of the magnitude. This trend is fitted with a line. The 2515 %%% resulting function can be used to determine the effective aperture 2516 %%% correction for an infinite flux source and the average bias inherent 2517 %%% in the sky measurement for the image. The scatter of the 2518 %%% PSF-candidate source measurements about this trend is a measure of how 2519 %%% well we can measure photometry from the image by applying the specific 2520 %%% PSF model. The slope of this trend is a measure of the bias in the 2521 %%% local sky measurment for each source. In principal, the measured sky 2522 %%% levels could be modified by this bias. More generally, the measured 2523 %%% bias in a collection of images could be used to improve the model 2524 %%% fitting or sky fitting portion of the software the remove the bias 2525 %%% term. 2526 2527 \ippprog{psphot} allows a collection of PSF model functions to be tried on all 2528 PSF candidate sources. For each model test, the above corrected 2529 ApResid scatter is measured. The PSF model function with the smallest 2530 value for the ApResid scatter is then used by \ippprog{psphot} as the best PSF 2531 model for this image. The number of models to be tested is specified 2532 by the configuration keyword \code{PSF_MODEL_N}. The configuration 2533 variables \code{PSF_MODEL_0}, \code{PSF_MODEL_1}, through 2534 \code{PSF_MODEL_N - 1} specify the names of the models which should be 2535 tested. 2621 \subsection{Galaxy Model Simulations} 2622 2623 To test the galaxy model analysis, we have generated a series of 2624 simulated images containing both stars and galaxies on which we have 2625 run the \ippprog{psphot} PSF-convolved galaxy model fitting analysis. 2626 The images generated for this analysis have dimensions of $4000 \times 2627 4000$ pixels with a spatial scale of 0.25 arcseconds per pixel. The 2628 images are generated using an effective exposure time of 30 seconds, 2629 with zero points matching the PS1 \rps-filter, and a realistic sky 2630 brightness of 20.86 magnitudes per square arcsecond. The stars are 2631 injected into these images with fluxes drawn from a realistic stellar 2632 luminosity function and random spatial locations. For each image, the 2633 same underlying simulated stellar population was used. Galaxies are 2634 injected into the image with positions on a regularly spaced grid with 2635 separation of 120 pixels. The galaxies are injected using Exponential 2636 and DeVaucouleur profiles in separate simulation runs. The major axis 2637 values are randomly distributed between 1 and 10 pixels (0.25 - 2.5 2638 arcseconds) while the aspect ratios are randomly chosen in a range 2639 from 0.25 to 1.0. The position angles are set by the sequence in the 2640 image and allowed to vary from 0 to 180 degrees. The images are then 2641 convolved with a PSF model using the \code{PS1_V1} profile ($\kappa = 2642 0.2$) and noise is added using Poisson statistics for the detected photons. 2643 2644 For the figures below, we present results as a function of the (input) 2645 instrumental magnitude of the galaxy minus the instrumental magnitude 2646 corresponding to the stellar $5 \sigma$ detection limit. We make the 2647 simplifying assumption that the stellar detection threshold 2648 encapsulates enough information about the sensitivity of the images 2649 that this magnitude difference may be used to compare the results 2650 shown here to images with other depths. Thus this and subsequent 2651 figures may be compared with the reported detection limits from the 2652 PS1 $3\pi$ survey. Note for reference that the typical stellar 2653 detection limits in the PS1 $3\pi$ stack images are (\grizy) = (23.3, 2654 23.2, 23.1, 22.3, 21.4). The minimum Kron magnitudes for which galaxy 2655 model fits were performed for the PV3 analysis 2656 (Section~\ref{sec:extended.source}) thus correspond to -1.6 to -1.8 in 2657 these plots. 2658 2659 Figure~\ref{fig:galaxy.complete} shows completeness for the detection 2660 of the Exponential and DeVaucouleur model galaxies. This analysis 2661 does not indicate if the galaxy was detected {\em as a galaxy} (\ie, 2662 was the extended nature of the source sufficiently clear), only if 2663 the source was detected by the peak-finding algorithm. As expected, 2664 the more compact galaxies are more likely to be detected; Exponential 2665 profile galaxies, with a broader light distribution for the same 2666 effective radius, are less likely to be detected for the same 2667 magnitude than DeVaucouleur profile galaxies. 2668 2669 \begin{figure}[htbp] 2670 \begin{center} 2671 \includegraphics[width=\hsize,clip]{pics/{galaxy.exp.complete}.png} 2672 \includegraphics[width=\hsize,clip]{pics/{galaxy.dev.complete}.png} 2673 \caption{\label{fig:galaxy.complete} Top: Completeness curves for 2674 simulated galaxies with Exponential profiles. Bottom: 2675 Completeness curves for simulated galaxies with DeVaucouleur 2676 profiles. The curves are shown as a function of the difference 2677 between the injected instrumental magnitude of the galaxy and the 2678 magnitude corresponding to the $5\sigma$ detection threshold for a 2679 PSF-like source. The black curves shows the compleness for all 2680 galaxies. The three colored curves show the completeness for 2681 three major axis ranges. Compact galaxies are more likely to be 2682 detected since peaks are detected after convolution with the 2683 PSF. } 2684 \end{center} 2685 \end{figure} 2686 2687 \begin{figure*}[htbp] 2688 \begin{center} 2689 \includegraphics[width=\hsize,clip]{pics/{galaxy.exp.params}.png} 2690 \caption{\label{fig:exp.complete} Parameter recovery for simulated 2691 galaxies with Exponential profiles. } 2692 \end{center} 2693 \end{figure*} 2694 2695 \begin{figure*}[htbp] 2696 \begin{center} 2697 \includegraphics[width=\hsize,clip]{pics/{galaxy.dev.params}.png} 2698 \caption{\label{fig:dev.complete} Parameter recovery for simulated 2699 galaxies with DeVaucouleur profiles. } 2700 \end{center} 2701 \end{figure*} 2536 2702 2537 2703 \section{Forced Photometry Modes} … … 2679 2845 \label{sec:lensing.params} 2680 2846 2681 \begin{verbatim}2682 * background : KSB, related (mention Deacon et al here or at the end?)2683 * second moments are discussed above (same values, including window function as given)2684 * write out the KSB formalism2685 * stellar parameters using PSF stars2686 * output parameters2687 * this is only done on warp -- move to ForceWarp section?2688 \end {verbatim}2689 2690 2847 Weak-lensing studies frequently use non-parametric measurements of the 2691 2848 ellipticities of galaxies to quantify the strength of gravitational … … 2706 2863 applied the techinique to PTF data to search for binary stars and 2707 2864 \cite{2017MNRAS.468.3499D} used the same technique to search for 2708 binary companions to known ultracool dwarfs using Pan-STARRS $ \3pi$2865 binary companions to known ultracool dwarfs using Pan-STARRS $3\pi$ 2709 2866 data. The work by \cite{2017MNRAS.468.3499D} used images and their 2710 2867 own analysis of the pixels with the program Sextractor 2711 2868 \citep{Bertin.ref}. 2712 2869 2713 For the Pan-STARRS $\3pi$ PV3 analysis, we have measured the full set 2714 of KSB lensing parameters for \note{which subset?} of the data to 2715 enable both lensing studies and binary / multiple star searches. Here 2716 we describe the measurements as performed within \ippprog{psphot}, 2717 reviewing the mathematical framework as described by 2718 \cite{1995ApJ...449..460K} and \cite{1998ApJ...504..636H}. 2870 For the Pan-STARRS $3\pi$ PV3 analysis, we have measured the full set 2871 of KSB lensing parameters for all objects with measured second moments 2872 (i.e.,, excluding saturated stars, suspected cosmic rays, and other 2873 likely defects) of the data to enable both lensing studies and binary 2874 / multiple star searches. Here we describe the measurements as 2875 performed within \ippprog{psphot}, reviewing the mathematical 2876 framework as described by \cite{1995ApJ...449..460K} and 2877 \cite{1998ApJ...504..636H}. 2719 2878 2720 2879 The goal of the KSB technique is to measure the intrinsic ellipticity 2721 2880 of objects (i.e., galaxies, in the case of weak lensing studies) as 2722 would be observed sky on the without instrumental effects. The 2723 analysis starts with the observed ellipticity of the object as 2724 represented by the two polarization components derived from the second 2725 moments (see Section~\ref{sec:moments}): 2881 would be observed sky on the without instrumental effects and to 2882 determine the impact weak graviational lensing would have on the 2883 observed shapes, after correction for the instrumental effects. The 2884 analysis starts with the observed ellipticity of objects as represented 2885 by the two polarization components derived from the second moments 2886 (see Section~\ref{sec:moments}): 2726 2887 \begin{eqnarray} 2888 \label{eqn:polarization} 2727 2889 e_1 = \frac{M_{xx} - M_{yy}}{M_{xx} + M_{yy}} \\ 2728 2890 e_2 = \frac{2 M_{xy}}{M_{xx} + M_{yy}}. \\ … … 2738 2900 $e_2$ and low absoluate values of $e_1$. 2739 2901 2740 \note{need for the window function}. 2741 2742 The observed ellipticity of an object observed in a real instrument 2902 Note that in our analysis of the second moments, we are applying a 2903 Gaussian window function to down-weight the noise contributions from 2904 pixels at high radii and low flux (see Section~\ref{sec:moments}). 2905 This type of window function is also assumed in the KSB formalism, and 2906 is represented in the equations below as $W$. 2907 2908 The measured ellipticity of an object observed in a real instrument 2743 2909 will be affected by the point spread function of the instrument. To 2744 2910 first order, the effect on the polarization components can be 2745 described as a combination of ``smear'', in which the observed shape 2746 is more circularized (driving $e_1,e_2$ to low absolute values) and 2747 ``shear'', in which the observed shape is stretched in one direction 2911 described as a combination of the circularly symmetric seeing disc, 2912 which smears the observed shapes (driving $e_1,e_2$ to low absolute 2913 values) and the shearing effect of the anisotropic component of the 2914 PSF, in which the observed shape is stretched in one direction 2748 2915 relative to the others (driving $e_1,e_2$ to larger absolute values). 2749 With sufficient understanding of the image PSF, both shear and smear 2750 terms can be corrected. 2751 2752 The change in the observed polarization of an object due to the 2753 2916 2917 KSB and HFK quantify the change in the observed polarization due to 2918 the smearing effect of the PSF with 2919 \begin{equation} 2920 \delta e^{\rm sm}_\alpha = P^{\rm sm}_{\alpha, \beta} p_{\beta} 2921 \end{equation} 2922 $p_\beta$ is a measurement of the 2923 anisotropy of the PSF (see below), and $P^{\rm sm}_{\alpha,\beta}$ is 2924 the ``Smear Polarizability'' of the object, defined as 2754 2925 \begin{eqnarray} 2755 X^{sh}_{1,1} = T^{-1} \sum f \left[ 2W(x^2 + y^2) + 2W^\prime (x^2 - y^2)^2 \\ 2756 X^{sh}_{1,2} = T^{-1} \sum f \left[ 4W^\prime(x^2 - y^2) x y \\ 2757 X^{sh}_{2,2} = T^{-1} \sum f \left[ 2W(x^2 + y^2) + 8W^\prime x^2 y^2 \\ 2926 P^{\rm sm}_{\alpha \beta} = X^{\rm sm}_{\alpha \beta} - e_\alpha e^{\rm sm}_\beta 2927 \end{eqnarray} 2928 where 2929 \begin{eqnarray} 2930 X^{\rm sm}_{1,1} &=& \frac{1}{T} \sum f \left[ W + 2W^\prime r^2 + W^{\prime \prime} (x^2 - y^2)^2 \right] \\ 2931 X^{\rm sm}_{1,2} &=& \frac{1}{T} \sum f \left[ 2W^{\prime\prime} (x^2 - y^2) x y \right] \\ 2932 X^{\rm sm}_{2,2} &=& \frac{1}{T} \sum f \left[ W + 2W^\prime r^2 + 4W^{\prime \prime} x^2 y^2 \right] 2758 2933 \end{eqnarray} 2759 2934 and 2760 2935 \begin{eqnarray} 2761 e^{ sh}_1 = 2 e_1 + 2 T^{-1} \sum f W^\prime (x^2 + y^2)(x^2 - y^2) \\2762 e^{ sh}_2 = 2 e_2 + 2 T^{-1} \sum f W^\prime (x^2 + y^2) 2 x y \\2936 e^{\rm sm}_1 &=& \frac{1}{T} \sum f \left[ 2W^\prime + W^{\prime \prime} (x^2 + y^2) \right] (x^2 - y^2) \\ 2937 e^{\rm sm}_2 &=& \frac{1}{T} \sum f \left[ 2W^\prime + W^{\prime \prime} (x^2 + y^2) \right] 2 x y. 2763 2938 \end{eqnarray} 2764 2939 In these equations, $T = M_{xx} + M_{yy}$ and $W$ is the window 2940 function applied when measuring the second moments. The terms 2941 $W^\prime$ and $W^{\prime \prime}$ are the derivatives of the window 2942 function with respect to $r^2 = x^2 + y^2$. Since the window function 2943 is a circularly-symmetric Gaussian with width $\sigma_w$, the 2944 derivatives are simply $W^\prime = -\frac{1}{2\sigma^2_w} W$ and 2945 $W^{\prime \prime} = \frac{1}{4\sigma^4_w} W$. 2946 2947 The elements of the equations above can be written in terms of the second and higher-order 2948 moments calculated in Section~\ref{sec:moments}: 2765 2949 \begin{eqnarray} 2766 X^{ sm}_{1,1} = T^{-1} \sum f \left[ W + 2W^\prime (x^2 + y^2) + W^{\prime \prime} (x^2 - y^2)^2 \\2767 X^{ sm}_{1,2} = T^{-1} \sum f \left[ 2W^{\prime\prime} (x^2 - y^2) x y \\2768 X^{ sm}_{2,2} = T^{-1} \sum f \left[ W + 2W^\prime (x^2 + y^2) + 4W^{\prime \prime} x^2 y^2 \\2950 X^{\rm sm}_{1,1} &=& \frac{1}{T} \left[ 1 - \frac{R_2}{\sigma^{2}} + \frac{(M_{xxxx} - 2 M_{xxyy} + M_{yyyy})}{4 \sigma^{4}} \right] \\[0.1in] 2951 X^{\rm sm}_{1,2} &=& \frac{1}{T} \left[ \frac{(M_{xyyy} - M_{xxxy})}{2 \sigma^{4}} \right] \\[0.1in] 2952 X^{\rm sm}_{2,2} &=& \frac{1}{T} \left[ 1 - \frac{R_2}{\sigma^{2}} + \frac{ M_{xxyy}}{\sigma^{4}} \right] 2769 2953 \end{eqnarray} 2770 2954 and 2771 2955 \begin{eqnarray} 2772 e^{ sm}_1 = T^{-1} \sum f \left[ 2W^\prime + W^{\prime \prime} (x^2 + y^2) \right] (x^2 - y^2) \\2773 e^{ sm}_2 = T^{-1} \sum f \left[ 2W^\prime + W^{\prime \prime} (x^2 + y^2) \right] 2 x y \\2956 e^{\rm sm}_1 &=& \frac{1}{T} \left[ \frac{M_{xx} - M_{yy}}{\sigma^{2}} + \frac{M_{xxxx} - M_{yyyy}}{4 \sigma^{4}} \right] \\[0.1in] 2957 e^{\rm sm}_2 &=& \frac{1}{T} \left[ \frac{(M_{xxxy} + M_{xyyy})}{2\sigma^{4}} - \frac{2 M_{xy}}{\sigma^{2}} \right] 2774 2958 \end{eqnarray} 2775 2776 2777 @ARTICLE{2017MNRAS.468.3499D, 2778 author = {{Deacon}, N.~R. and {Magnier}, E.~A. and {Best}, W.~M.~J. and 2779 {Liu}, M.~C. and {Dupuy}, T.~J. and {Chambers}, K.~C. and {Draper}, P.~W. and 2780 {Flewelling}, H. and {Metcalfe}, N. and {Tonry}, J.~L. and {Wainscoat}, R.~J. and 2781 {Waters}, C.}, 2782 title = "{Identification of partially resolved binaries in Pan-STARRS 1 data}", 2783 journal = {\mnras}, 2784 archivePrefix = "arXiv", 2785 eprint = {1702.05491}, 2786 primaryClass = "astro-ph.SR", 2787 keywords = {binaries: visual, brown dwarfs}, 2788 year = 2017, 2789 month = jul, 2790 volume = 468, 2791 pages = {3499-3515}, 2792 doi = {10.1093/mnras/stx440}, 2793 adsurl = {http://adsabs.harvard.edu/abs/2017MNRAS.468.3499D}, 2794 adsnote = {Provided by the SAO/NASA Astrophysics Data System} 2795 } 2796 2797 @ARTICLE{1995ApJ...449..460K, 2798 author = {{Kaiser}, N. and {Squires}, G. and {Broadhurst}, T.}, 2799 title = "{A Method for Weak Lensing Observations}", 2800 journal = {\apj}, 2801 eprint = {astro-ph/9411005}, 2802 keywords = {COSMOLOGY: OBSERVATIONS, COSMOLOGY: DARK MATTER, GALAXIES: FORMATION, COSMOLOGY: GRAVITATIONAL LENSING, COSMOLOGY: LARGE-SCALE STRUCTURE OF UNIVERSE}, 2803 year = 1995, 2804 month = aug, 2805 volume = 449, 2806 pages = {460}, 2807 doi = {10.1086/176071}, 2808 adsurl = {http://adsabs.harvard.edu/abs/1995ApJ...449..460K}, 2809 adsnote = {Provided by the SAO/NASA Astrophysics Data System} 2810 } 2811 @ARTICLE{1998ApJ...504..636H, 2812 author = {{Hoekstra}, H. and {Franx}, M. and {Kuijken}, K. and {Squires}, G. 2813 }, 2814 title = "{Weak Lensing Analysis of CL 1358+62 Using Hubble Space Telescope Observations}", 2815 journal = {\apj}, 2816 keywords = {GALAXIES: CLUSTERS: INDIVIDUAL ALPHANUMERIC: CL 1358+62, GALAXIES: FUNDAMENTAL PARAMETERS, COSMOLOGY: GRAVITATIONAL LENSING, galaxies: clusters: individual (Cl 1358 + 62), Galaxies: Fundamental Parameters, Cosmology: Gravitational Lensing}, 2817 year = 1998, 2818 month = sep, 2819 volume = 504, 2820 pages = {636-660}, 2821 doi = {10.1086/306102}, 2822 adsurl = {http://adsabs.harvard.edu/abs/1998ApJ...504..636H}, 2823 adsnote = {Provided by the SAO/NASA Astrophysics Data System} 2824 } 2825 @ARTICLE{2005ApJ...626.1070H, 2826 author = {{Hoekstra}, H. and {Wu}, Y. and {Udalski}, A.}, 2827 title = "{An Algorithm to Detect Blends with Eclipsing Binaries in Planet Transit Searches}", 2828 journal = {\apj}, 2829 eprint = {astro-ph/0501353}, 2830 keywords = {Stars: Binaries: Eclipsing, Stars: Planetary Systems}, 2831 year = 2005, 2832 month = jun, 2833 volume = 626, 2834 pages = {1070-1078}, 2835 doi = {10.1086/430299}, 2836 adsurl = {http://adsabs.harvard.edu/abs/2005ApJ...626.1070H}, 2837 adsnote = {Provided by the SAO/NASA Astrophysics Data System} 2838 } 2839 @ARTICLE{2013ApJS..206...18T, 2840 author = {{Terziev}, E. and {Law}, N.~M. and {Arcavi}, I. and {Baranec}, C. and 2841 {Bloom}, J.~S. and {Bui}, K. and {Burse}, M.~P. and {Chorida}, P. and 2842 {Das}, H.~K. and {Dekany}, R.~G. and {Kraus}, A.~L. and {Kulkarni}, S.~R. and 2843 {Nugent}, P. and {Ofek}, E.~O. and {Punnadi}, S. and {Ramaprakash}, A.~N. and 2844 {Riddle}, R. and {Sullivan}, M. and {Tendulkar}, S.~P.}, 2845 title = "{Millions of Multiples: Detecting and Characterizing Close-separation Binary Systems in Synoptic Sky Surveys}", 2846 journal = {\apjs}, 2847 archivePrefix = "arXiv", 2848 eprint = {1210.4550}, 2849 primaryClass = "astro-ph.SR", 2850 keywords = {binaries: close, methods: data analysis, stars: statistics, surveys, techniques: image processing }, 2851 year = 2013, 2852 month = jun, 2853 volume = 206, 2854 eid = {18}, 2855 pages = {18}, 2856 doi = {10.1088/0067-0049/206/2/18}, 2857 adsurl = {http://adsabs.harvard.edu/abs/2013ApJS..206...18T}, 2858 adsnote = {Provided by the SAO/NASA Astrophysics Data System} 2859 } 2959 where $R_2 = M_{xx} + M_{yy}$. 2960 2961 KSB and HFK use the observed ellipticities of stars and the smear 2962 polarizability of the stars to estimate the anisotropy due to the PSF: 2963 \begin{eqnarray} 2964 p_\alpha = \frac{e^*_{\alpha}}{P^{{\rm sm},*}_{\alpha \alpha}} 2965 \end{eqnarray} 2966 where the terms with the $*$ represent parameters measured on stars. 2967 2968 %% \begin{eqnarray} 2969 %% p_1 &=& M_{xx} - M_{yy} \\ 2970 %% p_2 &=& 2 M_{xy} 2971 %% \end{eqnarray} 2972 2973 Similarly, the impact of shear can be quantified by the ``Shear 2974 Polarizabilty'' in a similar fashion: 2975 \begin{equation} 2976 \delta e^{\rm sh}_\alpha = P^{\rm sh}_{\alpha, \beta} p_{\beta} 2977 \end{equation} 2978 where now the shear polarizability $P^{\rm sh}_{\alpha \beta}$ is 2979 defined as 2980 \begin{eqnarray} 2981 P^{\rm sh}_{\alpha \beta} = X^{\rm sh}_{\alpha \beta} - e_\alpha e^{\rm sh}_\beta 2982 \end{eqnarray} 2983 where 2984 \begin{eqnarray} 2985 X^{\rm sh}_{1,1} &=& \frac{1}{T} \sum f \left[ 2W(x^2 + y^2) + 2W^\prime (x^2 - y^2)^2 \right] \\ 2986 X^{\rm sh}_{1,2} &=& \frac{1}{T} \sum f \left[ 4W^\prime(x^2 - y^2) x y \right] \\ 2987 X^{\rm sh}_{2,2} &=& \frac{1}{T} \sum f \left[ 2W(x^2 + y^2) + 8W^\prime x^2 y^2 \right] 2988 \end{eqnarray} 2989 and 2990 \begin{eqnarray} 2991 e^{\rm sh}_1 &=& 2 e_1 + \frac{2}{T} \sum f W^\prime (x^2 + y^2) (x^2 - y^2) \\ 2992 e^{\rm sh}_2 &=& 2 e_2 + \frac{2}{T} \sum f W^\prime (x^2 + y^2) 2 x y. 2993 \end{eqnarray} 2994 2995 Re-writing in terms of the second and higher-order moments calculated 2996 in Section~\ref{sec:moments}, we find: 2997 \begin{eqnarray} 2998 X^{\rm sh}_{1,1} &=& \frac{1}{T} \left[ 2 R_2 - \frac{(M_{xxxx} - 2 M_{xxyy} + M_{yyyy})}{\sigma^{2}} \right] \\ 2999 X^{\rm sh}_{1,2} &=& \frac{1}{T} \left[ \frac{2(M_{xyyy} - M_{xxxy})}{\sigma^{2}} \right] \\ 3000 X^{\rm sh}_{2,2} &=& \frac{1}{T} \left[ 2 R_2 - \frac{4 M_{xxyy}}{\sigma^{2}} \right] 3001 \end{eqnarray} 3002 and 3003 \begin{eqnarray} 3004 e^{\rm sh}_1 &=& \frac{1}{T} \left[ 2 (M_{xx} - M_{yy}) + \frac{( M_{yyyy} - M_{xxxx})}{\sigma^{2}} \right] \\ 3005 e^{\rm sh}_2 &=& \frac{1}{T} \left[ 4 M_{xy} - \frac{2 (M_{xxxy} + M_{xyyy})}{\sigma^{2}} \right] 3006 \end{eqnarray} 3007 3008 In the Pan-STARRS PV3 analysis, we have measured the elements of the 3009 smear polarizability ($X^{\rm sm}_{\alpha \beta}$, $e^{\rm 3010 sm}_\alpha$) and the shear polarizability ($X^{\rm sh}_{\alpha 3011 \beta}$, $e^{\rm sh}_\alpha$) for all objects on each of the warp 3012 images. We have also selected only the PSF stars from the images and 3013 interpolated a smoothed version of these parameters to the location of 3014 the objects, using the grid described above to interpolate the PSF 3015 parameters. We also determine the interpolated PSF ellipticities 3016 ($e^*_1, e^*_2$) from the equivalent smooth grid. Thus, for every 3017 object in the $3\pi$ survey, we are able to report the PSF and object 3018 elements of the KSB analysis. These lensing parameters are measured 3019 for each of the warps, and then averaged over all warps for each of 3020 the filters. The average values are calculated by including only 3021 measurements from the same warp detection used in the average 3022 photometry (nominally, the primary skycell; see Paper V, Section 3023 5.4.4) and excluding any measurements for which the \code{PSF_QF} or 3024 \code{PSF_QF_PERFECT} is less than 0.85. 3025 3026 \note{example of using the lensing elements for binaries?} 2860 3027 2861 3028 \section{Difference Image Photometry} -
trunk/doc/release.2015/ps1.analysis/examples/.mana
r40693 r40705 197 197 set dMxy = Mxy_s - Mxy_o 198 198 lim -n 2 theta dMxy; clear; box; plot theta dMxy; line -c red 0 $Mxy_p to 360 $Mxy_p 199 input moments.sh 200 test.convolve 201 test.convolve 1 202 lim theta Mxx_s; clear; box; plot theta Mxx_s 203 lim theta Mxx_s; clear; box; plot theta Mxx_s; plot -c red theta Mxx_o 204 set dMxx = Mxx_s - Mxx_o 205 lim -n 1 theta dMxx; clear; box; plot theta dMxx 206 line 0 $Mxx_p to 360 $Mxx_p -c red 207 set dMyy = Myy_s - Myy_o 208 lim theta Myy_s; clear; box; plot theta Myy_s; plot -c red theta Myy_o 209 lim -n 0 theta 0 110; clear; box; plot theta Myy_s; plot -c red theta Myy_o 210 lim -n 0 theta 0 160; clear; box; plot theta Myy_s; plot -c red theta Myy_o 211 lim -n 0 theta 0 150; clear; box; plot theta Myy_s; plot -c red theta Myy_o 212 lim -n 1 theta dMyy; clear; box; plot theta dMyy 213 line 0 $Myy_p to 360 $Myy_p -c red 214 lim -n 1 theta 30 40; clear; box; plot theta dMyy; line 0 $Myy_p to 360 $Myy_p -c red 215 lim -n 1 theta 35 37; clear; box; plot theta dMyy; line 0 $Myy_p to 360 $Myy_p -c red 216 lim -n 1 theta 35.9 36.1; clear; box; plot theta dMyy; line 0 $Myy_p to 360 $Myy_p -c red 217 lim -n 1 theta 35.99 36.01; clear; box; plot theta dMyy; line 0 $Myy_p to 360 $Myy_p -c red 218 lim -n 0 theta -10 10; clear; box; plot theta Mxy_s; plot -c red theta Mxy_o 219 lim -n 0 theta Mxy_s; clear; box; plot theta Mxy_s; plot -c red theta Mxy_o 220 lim -n 0 theta Mxy_o; clear; box; plot theta Mxy_s; plot -c red theta Mxy_o 221 lim -n 0 theta Mxy_o; clear; box; plot theta Mxy_s; plot -c red theta Mxy_o -pt ocir -sz 2 222 input moments.sh 223 test.convolve 224 test.convolve 0 225 lim -n 0 theta 0 150; clear; box; plot theta Myy_s; plot -c red theta Myy_o 226 set dMyy = Myy_s - Myy_o 227 set dMxy = Mxy_s - Mxy_o 228 set dMxx = Mxx_s - Mxx_o 229 lim -n 1 theta dMxx; clear; box; plot theta dMxx 230 lim -n 1 theta dMxx; clear; box; plot theta dMxx; line 0 $Mxx_p to 360 $Mxx_p -c red 231 lim -n 0 theta 0 150; clear; box; plot theta Mxx_s; plot -c red theta Mxx_o 232 lim -n 0 theta 0 120; clear; box; plot theta Mxx_s; plot -c red theta Mxx_o 233 lim -n 0 theta 0 150; clear; box; plot theta Myy_s; plot -c red theta Myy_o 234 lim -n 1 theta dMyy; clear; box; plot theta dMyy; line 0 $Myy_p to 360 $Myy_p -c red 235 echo $Mxx_p $Myy_p 236 lim -n 0 theta Mxy_s; clear; box; plot theta Mxy_s; plot -c red theta Mxy_o 237 lim -n 1 theta dMxy; clear; box; plot theta dMxy; line 0 $Mxy_p to 360 $Mxy_p -c red 238 pwd -
trunk/doc/release.2015/ps1.analysis/examples/moments.sh
r40693 r40705 151 151 rotate fr 2 152 152 end 153 154 155 macro test.convolve 156 if ($0 != 2) 157 echo "USAGE: show.smear (sigma)" 158 break 159 end 160 161 mcreate z 512 512 162 set x = xramp(z) - z[][0]/2 163 set y = yramp(z) - z[0][]/2 164 165 # convolve psf (oriented along yy axis) with object (rotating) 166 # object 1: 167 set f0 = exp(-0.5*((x/2)^2 + (y/10)^2)) 168 169 set psf_r = exp(-0.5*((x/2)^2 + (y/6)^2)) 170 rotate psf_r 30.0 171 extract psf_r psf {psf_r[][0]/2 - 256} {psf_r[0][]/2 - 256} 512 512 0 0 512 512 172 173 # set psf = exp(-0.5*((x/2)^2 + (y/6)^2)) 174 star -q psf {psf[][0]/2} {psf[0][]/2} 128 175 $Mxx_p = ($SXg/2.355)^2 176 $Myy_p = ($SYg/2.355)^2 177 $Mxy_p = $SXYg 178 179 delete -q e1_s e2_s e1_o e2_o theta Mxx_s Mxy_s Myy_s Mxx_o Mxy_o Myy_o 180 for rot 0 360 5 181 set fr = f0 182 rotate fr $rot 183 concat $rot theta 184 185 delete -q frs 186 extract fr frs {fr[][0]/2 - 256} {fr[0][]/2 - 256} 512 512 0 0 512 512 187 188 imconvolve frs psf fs 189 190 star -q fs {fs[][0]/2} {fs[0][]/2} 128 191 192 $Mxx = ($SXg/2.355)^2 193 $Myy = ($SYg/2.355)^2 194 $Mxy = $SXYg 195 196 concat $Mxx Mxx_s 197 concat $Mxy Mxy_s 198 concat $Myy Myy_s 199 200 # fr is the rotated version of f0 201 star -q fr {fr[][0]/2} {fr[0][]/2} 128 202 203 $Mxx = ($SXg/2.355)^2 204 $Myy = ($SYg/2.355)^2 205 $Mxy = $SXYg 206 207 concat $Mxx Mxx_o 208 concat $Mxy Mxy_o 209 concat $Myy Myy_o 210 end 211 end
Note:
See TracChangeset
for help on using the changeset viewer.
