IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39973


Ignore:
Timestamp:
Feb 3, 2017, 6:36:35 PM (9 years ago)
Author:
watersc1
Message:

Update that contains more detail for diff/fullforce, and a brief start on addstar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/release.2015/ps1.datasystem/datasystem.tex

    r39964 r39973  
    13721372Traditionally, projects which use multiple exposures to increase the
    13731373depth and sensitivity of the observations have generated something
    1374 equivalent to the stack images produced by the IPP analysis (c.f, CFHT
    1375 Legacy survey, COSMOS, etc).  In theory, the photometry of the stack
    1376 images produces the `best' photometry catalog, with best sensitivity
    1377 and the best data quality at all magnitudes.  In practice, the stack
    1378 images have some significant limitations due to the difficulty of
    1379 modelling the PSF variations.  This difficulty is particularly severe
    1380 for the Pan-STARRS $3\pi$ survey stacks due to the combination of the
    1381 substantial mask fraction of the individual exposures, the large
    1382 instrinsic image quality variations within a single exposure, and the
    1383 wide range of image quality conditions under which data were obtained
    1384 and used to generate the $3\pi$ PV3 stacks.
     1374equivalent to the \ippstage{stack} images produced by the IPP analysis
     1375(c.f, CFHT Legacy survey, COSMOS, etc).  In theory, the photometry of
     1376the \ippstage{stack} images produces the ``best'' photometry catalog,
     1377with best sensitivity and the best data quality at all magnitudes.  In
     1378practice, these images have some significant limitations due to the
     1379difficulty of modelling the PSF variations.  This difficulty is
     1380particularly severe for the Pan-STARRS $3\pi$ survey stacks due to the
     1381combination of the substantial mask fraction of the individual input
     1382exposures, the large instrinsic image quality variations within a
     1383single exposure, and the wide range of image quality conditions under
     1384which data were obtained and used to generate the $3\pi$ PV3 stacks.
    13851385
    13861386For any specific stack, the point spread function at a particular
     
    13891389that point.  Because of the high mask fraction, the exposures which
    13901390contributed to pixels at one location may be somewhat different just a
    1391 few tens of pixels away.  Because of the intrinsic variations in the
    1392 PSF across an exposure and because of the variations from exposure to
    1393 exposure, the distribution of point spread functions of the images
    1394 used at one position may be quite different from those at a nearby
    1395 location.  In the end, the stack images have a effective point spread
    1396 function which is not just variable, but changing significantly on
    1397 small scales in a highly textured fashion.  \note{duplicates previous paragraph?}
     1391few tens of pixels away.  In the end, the \ippstage{stack} images have
     1392a effective point spread function which is not just variable, but
     1393changing significantly on small scales in a highly textured fashion.
    13981394
    13991395Any measurement which relies on a good knowledge of the PSF at the
    14001396location of an object either needs to determine the PSF variations
    1401 present in the stack, or the measurement will be somewhat degraded.
    1402 The highly textured PSF variations make this a very challenging
    1403 problem: not only would such a PSF model require an unusually fine-grained
    1404 PSF model, there would likely not be enough PSF stars in an given
    1405 stack to determine the model at the resolution required.  The IPP
    1406 photometry analysis code uses a PSF model with 2D variations using a
    1407 grid of at most $6\times 6$ samples per skycell, a number reasonably
    1408 well-matched to the density of stars at most moderate Galactic
    1409 latitudes.  This scale is far too large to track the fine-grained
    1410 changes apparent in the stack images.
     1397present in the \ippstage{stack} image, or the measurement will be
     1398somewhat degraded.  The highly textured PSF variations make this a
     1399very challenging problem: not only would such a PSF model require an
     1400unusually fine-grained PSF model, there would likely not be enough PSF
     1401stars in a given \ippstage{stack} image to determine the model at the
     1402resolution required.  The IPP photometry analysis code uses a PSF
     1403model with 2D variations using a grid of at most $6\times 6$ samples
     1404per skycell, a number reasonably well-matched to the density of stars
     1405at most moderate Galactic latitudes.  This scale is far too large to
     1406track the fine-grained changes apparent in the stack images.
    14111407
    14121408Thus PSF photometry as well as convolved galaxy models in the stack
     
    14211417The PV3 $3\pi$ analysis solves this problem by using the sources
    14221418detected in the stack images and performing forced photometry on the
    1423 individual warp images used to generate the stack.  This analysis is
    1424 performed on all warps for a single filter as a single job, though
    1425 this is more of a bookkeeping aid as it is not necessary for the
    1426 analysis of the different warps to know about the results of the other
    1427 warps.
    1428 
    1429 In the forced warp photometry, the positions of sources are loaded
    1430 from the stack outputs.  PSF stars are pre-identified and a PSF model
    1431 generated for each warp based on those stars, using the same stars for
    1432 all warps to the extent possible (PSF stars which are excessively
    1433 masked on a particular image are not used to model the PSF).  The PSF
    1434 model is fitted to all of the known source positions in the warp
    1435 images.  Aperture magnitudes, Kron magnitudes, and moments are also
    1436 measured at this stage for each warp.  Note that the flux measurement
    1437 for a faint, but significant, source from the stack image may be at a
    1438 low significance ($< 5\sigma$) in any individual warp image; the flux
    1439 may even be negative for specific warps.  When combined together,
    1440 these low-significance measurements will result in a signficant
    1441 measurement as the signal-to-noise increases by $\sqrt{N}$. 
     1419individual warp images used to generate the stack.  This
     1420\ippstage{fullforce} analysis is performed on all warps for a single
     1421skycell and filter as a single unit, as this matches the arrangement
     1422of the input source catalog from the \ippstage{skycal} stage.  When
     1423processing is queued for this stage, an entry is added to the
     1424\ippdbtable{fullForceRun} primary database table linking to the
     1425specific \ippdbcolumn{skycal\_id} entry that will be used as the
     1426catalog for the photometry.  The \ippdbcolumn{warp\_id} values for the
     1427input \ippstage{warp} stage images that contributed to the
     1428\ippstage{stack} associated with that \ippdbcolumn{skycal\_id} are
     1429then added to the \ippdbtable{fullForceInput} table, linked to the
     1430primary table by the \ippdbcolumn{ff\_id} identifier.  The individual
     1431jobs for each warp are then run, which passes the \ippstage{warp}
     1432stage image products along with the \ippstage{skycal} catalog to the
     1433\ippprog{psphotFullForce} program.
     1434
     1435In this program, the positions of sources are loaded from the input
     1436catalog.  PSF stars are pre-identified \note{how?} and a PSF model
     1437generated for each \ippstage{warp} image based on those stars, using
     1438the same stars for all warps to the extent possible (PSF stars which
     1439are excessively masked on a particular image are not used to model the
     1440PSF).  \note{this doesn't seem correct, as each warp is run
     1441  independently.}  The PSF model is fitted to all of the known source
     1442positions in the warp images.  Aperture magnitudes, Kron magnitudes,
     1443and moments are also measured at this stage for each warp.  Note that
     1444the flux measurement for a faint, but significant, source from the
     1445stack image may be at a low significance (less than the $5\sigma$
     1446criterion used when the photometry is not run in this forced mode) in
     1447any individual warp image; the flux may even be negative for specific
     1448warps.  When combined together, these low-significance measurements
     1449will result in a signficant measurement as the signal-to-noise
     1450increases by $\sqrt{N}$.
     1451
     1452Upon completion of the forced photometry (for point sources as well as
     1453galaxies, discussed below), an entry is added to the
     1454\ippdbtable{fullForceResult} table with the processing statistics for
     1455that combination of \ippdbcolumn{ff\_id} and \ippdbcolumn{warp\_id}.
     1456Once all of the entries in the \ippdbtable{fullForceInput} table have
     1457finished, a summary operation is run to generate an appropriate
     1458average value for each measurement, by combining the measurements from
     1459each of the inputs.  The output catalogs listed in the
     1460\ippdbtable{fullForceResult} table are passed to the
     1461\ippprog{psphotFullForceSummary} to do this averaging.  \note{describe
     1462  what is done} When this completes, an entry is added to the
     1463\ippdbtable{fullForceSummary}, and the \ippdbtable{fullForceRun} entry
     1464is marked as completed.
    14421465
    14431466\subsubsection{Forced Galaxy Models}
    1444 
    1445 The convolved galaxy models are also re-measured on the warp images by
    1446 the forced photometry analysis stage.  In this analysis, the galaxy
    1447 models determined by the stack photometry analysis are used to seed
    1448 the analysis in the individual warps.  The purpose of this analysis is
    1449 the same as the forced PSF photometry: the PSF of the stack is poorly
    1450 determined due to the masking and PSF variations in the inputs.
    1451 Without a good PSF model, the PSF-convolved galaxy models are of
    1452 limited accuracy. 
    1453 
    1454 In the forced galaxy model analysis, we assume that the galaxy
    1455 position and position angle, along with the Sersic index if
    1456 appropriate, have been sufficiently well determined in the stack
    1457 analysis.  In this case, the goal is to determine the best values for
    1458 the major and minor axis of the elliptical contour and at the same
    1459 time the best normalization corresponding to the best elliptical shape
    1460 (and thus the best galaxy magnitude value).
    1461 
    1462 For each warp image, the stack value for the major and minor axis are
    1463 used as the center of a $7\times 7$ grid search of the major and minor
    1464 axis parameter values.  The grid spacing is defined as a function of
    1465 the signal-to-noise of the galaxy in the stack image so that bright
    1466 galaxies are measured with a much finer grid spacing that faint
    1467 galaxies \note{need to quantify this}.  For each grid point, the major
    1468 and minor axis values at that point are determined for the model.  The
    1469 model is then generated and convolved with the PSF model for the warp
    1470 image at that point.  The resulting model is then compared to the warp
    1471 pixel data values and the best fit normalization value is defined.
    1472 The normalization and the $\chi^2$ value for each grid point is
    1473 recorded. 
     1467\note{CZW: is this the appropriate place for this section?}
     1468
     1469The convolved galaxy models are also re-measured on the
     1470\ippstage{warp} images by the \ippstage{fullforce} stage analysis.  In
     1471this analysis, the galaxy models determined by the
     1472\ippstage{staticsky} photometry analysis are used to seed the analysis
     1473in the individual \ippstage{warp} images.  The purpose of this
     1474analysis is the same as the \ippstage{fullforce} PSF photometry: the
     1475PSF of the \ippstage{stack} image is poorly determined due to the
     1476masking and PSF variations in the inputs.  Without a good PSF model,
     1477the PSF-convolved galaxy models are of limited accuracy.
     1478
     1479In the \ippstage{fullforce} galaxy model analysis, we assume that the
     1480galaxy position and position angle, along with the Sersic index if
     1481appropriate, have been sufficiently well determined in the
     1482\ippstage{staticsky} analysis.  In this case, the goal is to determine
     1483the best values for the major and minor axis of the elliptical contour
     1484and at the same time the best normalization corresponding to the best
     1485elliptical shape, and thus the best galaxy magnitude value.
     1486
     1487For each \ippstage{warp} image, the \ippstage{staticsky} value for the
     1488major and minor axis are used as the center of a $7\times{} 7$ grid
     1489search of the major and minor axis parameter values.  The grid spacing
     1490is defined as a function of the signal-to-noise of the galaxy in the
     1491stack image so that bright galaxies are measured with a much finer
     1492grid spacing that faint galaxies \note{need to quantify this}.  For
     1493each grid point, the major and minor axis values at that point are
     1494determined for the model.  The model is then generated and convolved
     1495with the PSF model for the \ippstage{warp} image at that point.  The
     1496resulting model is then compared to the \ippstage{warp} pixel data
     1497values and the best fit normalization value is defined.  The
     1498normalization and the $\chi^2$ value for each grid point is recorded.
    14741499
    14751500For a given galaxy, the result is a collection of $\chi^2$ values for
    1476 each of the grid points spanning all warp images.  A single $\chi^2$
    1477 grid can then be made from all warps by combining each grid point
    1478 across the warps.  The combined $\chi^2$ for a single grid point is
    1479 simply the sum of all $\chi^2$ values at that point.  If, for a single
    1480 warp image, the galaxy model is excessively masked, then that image
    1481 will be dropped for all grid points for that galaxy.  The reduced
    1482 $\chi^2$ values can be determined by tracking the total number of warp
    1483 pixels used across all warps to generate the combined $\chi^2$ values.
    1484 From the combined grid of $\chi^2$ values, the point in the grid with
    1485 the minimum $\chi^2$ is found.  Quadratic interpolation is used to
     1501each of the grid points spanning all \ippstage{warp} images.  A single
     1502$\chi^2$ grid can then be made by combining each grid point across the
     1503inputs.  The combined $\chi^2$ for a single grid point is simply the
     1504sum of all $\chi^2$ values at that point.  If, for a single \ippstage{warp}
     1505image, the galaxy model is excessively masked, then that image will be
     1506dropped for all grid points for that galaxy.  The reduced $\chi^2$
     1507values can be determined by tracking the total number of pixels
     1508used across all inputs to generate the combined $\chi^2$ values.  From
     1509the combined grid of $\chi^2$ values, the point in the grid with the
     1510minimum $\chi^2$ is found.  Quadratic interpolation is used to
    14861511determine the major, minor axis values for the interpolated minimum
    14871512$\chi^2$ value.  The errors on these two parameters is then found by
    14881513determining the contour at which the \note{reduced?} $\chi^2$
    1489 increases by 1. 
    1490 
    1491 Thus the Forced Galaxy Model analysis uses the PSF information from
    1492 each warp to determine a best set of convovled galaxy models for each
    1493 object in the stack images.  \note{discuss the subset of galaxy models
    1494   and objects}.
     1514increases by 1.
     1515
     1516Thus the \ippstage{fullforce} galaxy analysis uses the PSF information
     1517from each \ippstage{warp} to determine a best set of convovled galaxy
     1518models for each object in the \ippstage{skycal} catalog.
     1519\note{discuss the subset of galaxy models and objects}.
    14951520
    14961521\subsection{Difference Images}
     
    15101535
    15111536In the \ippstage{diff} stage, the IPP generates diffferece images for
    1512 appropriately specified pairs of images.  It is possible for the difference image to
    1513 be generated from a pair of warp images, from a warp and a stack of
    1514 some variety, or from a pair of stacks.  During the PS1 survey, pairs
    1515 of exposures, call TTI pairs (see~\note{Survey Strategy}), were
    1516 obtained for each pointing within a $\approx$ 1 hour period in the
    1517 same filter, and to the extent possible with the same orientation and
    1518 boresite position.  The standard PS1 nightly processing generated
    1519 difference images from the resulting warp pairs (`warp-warp diffs').
    1520 
    1521 The nightly stacks generated for the Medium Deep fields were combined
    1522 with a template reference stack image to generate `stack-stack diffs'
    1523 for these fields each night. 
    1524 
    1525 For the PV3 $3\Pi$ processing, the entire collection of warps for the
    1526 survey were combined with the $3\pi$ stacks to generate `warp-stack
    1527 diffs'. 
     1537appropriately specified pairs of images.  It is possible for the
     1538difference image to be generated from a pair of \ippstage{warp} stage
     1539images, from a \ippstage{warp} and a \ippstage{stack} of some variety,
     1540or from a pair of \ippstage{stack} stage images.  During the PS1
     1541survey, pairs of exposures, call TTI pairs (see~\note{Survey
     1542  Strategy}), were obtained for each pointing within a $\approx$ 1
     1543hour period in the same filter, and to the extent possible with the
     1544same orientation and boresite position.  The standard PS1 nightly
     1545processing generated difference images from the resulting pairs of
     1546\ippstage{warp} images.  The nightly processing generated
     1547\ippstage{stack} images for the Medium Deep fields, and these were
     1548combined with a template reference \ippstage{stack} image to generate
     1549``stack-stack diffs'' each night they were observed.  For the PV3
     1550$3\pi$ processing, the entire collection of \ippstage{warp} stage
     1551images for the survey were combined with images generated by the
     1552\ippstage{stack} processing to generate ``warp-stack diffs''.
     1553
     1554When a \ippstage{diff} processing is defined, an entry is added to the
     1555\ippdbtable{diffRun} table, and the appropriate input images are added
     1556to the \ippdbtable{diffInputSkyfile} table, with one entry for each
     1557skycell that are covered by the images.  For a \ippstage{diff}
     1558generated from two \ippstage{warp} stage products, the input images
     1559have their \ippdbcolumn{warp\_id} values recorded in the
     1560\ippdbcolumn{warp1} and \ippdbcolumn{warp2} for each skycell that
     1561overlaps.  If two \ippstage{stack} stages are to be used in the
     1562difference, their \ippdbcolumn{stack\_id} entries are recorded in the
     1563\ippdbcolumn{stack1} and \ippdbcolumn{stack2} fields.  As each
     1564\ippstage{stack} only covers a single skycell, the \ippstage{diff} is
     1565usually defined indirectly, using other information from the
     1566\ippdbtable{stackRun} table to select appropriate
     1567\ippdbcolumn{stack\_id} values.  Similarly, \ippstage{diff} processing
     1568is defined for the mixed case by creating entries that populate one of
     1569\ippdbcolumn{warp1} and \ippdbcolumn{stack1} and populating one of
     1570\ippdbcolumn{warp2} and \ippdbcolumn{stack2}.  In all cases, the
     1571minuend of the subtraction to be performed is the ``1'' entry, and the
     1572subtrahend is the ``2'' entry.
     1573
     1574Jobs are created based on the entries of
     1575\ippdbtable{diffInputSkyfile}, with the appropriate images and
     1576catalogs passed to the \ippprog{ppSub} program.  This does the
     1577subtraction, as well as the photometry of any sources detected in the
     1578\ippstage{diff} image.  The algorithm used for PSF matching is
     1579described in \citet{waters2017}.  Upon completion of these jobs,
     1580statistics about the processing are written to an entry in the
     1581\ippdbtable{diffSkyfile} table.  An \ippmisc{advance} checks for the
     1582completion of all of the components listed in
     1583\ippdbtable{diffInputSkyfile}, and marks the \ippdbtable{diffRun}
     1584entry as such.
    15281585
    15291586\subsection{Addstar : DVO Ingest}
    15301587\label{subsec: addstar}
     1588\note{CZW: This should be reviewed.}
     1589
     1590Upon completion of the processing of each stage, the results of the
     1591photometry analysis are isolated in a large number of individual
     1592catalogs, with little connection between the separate measurements of
     1593astronomical sources.  Unifying these measurements in a DVO database
     1594is the purpose of the \ippstage{addstar} processing.  The catalogs for
     1595the \ippstage{camera}, \ippstage{staticsky}, \ippstage{skycal},
     1596\ippstage{fullforce}, and \ippstage{diff} are processed in this
     1597fashion, although not every measurement in each catalog are included
     1598in the final DVO that is constructed.
     1599
     1600The construction of this final DVO is performed in a hierarchical
     1601process.  The individual catalogs are added to a \ippmisc{minidvo},
     1602which is simply a DVO database defined over some subset of possible
     1603inputs.  These \ippmisc{minidvos} are then merged into larger
     1604databases to construct the final completely catalog.  \note{describe
     1605  database tables}
     1606
     1607Each catalog that is to be added to DVO has an entry created in the
     1608\ippdbtable{addRun} database table.  This entry notes which
     1609\ippdbcolumn{stage} is the source of the catalog, and links to the
     1610appropriate database table with the \ippdbcolumn{stage\_id} field.  As
     1611some stages, such as the \ippstage{diff} stage, create more than a
     1612single catalog, multiple entries with the \ippdbcolumn{stage\_id} are
     1613created, with the \ippdbcolumn{stage\_extra1} field containing an
     1614index to the individual components.  The catalog specified by the
     1615entry is added to the target \ippmisc{minidvo} by the
     1616\ippprog{addstar} program, \note{describe what's done?}.  When this
     1617completes, an entry containing the statistics of the job is added to
     1618the \ippdbtable{addProcessedExp} table.
    15311619
    15321620\subsection{Calibration Operations}
Note: See TracChangeset for help on using the changeset viewer.