Skip to content

Commit

Permalink
Document multi-band coadd processing.
Browse files Browse the repository at this point in the history
Add documentation to multiBand.py and a high-level overview of multi-band
coadd processing.
  • Loading branch information
AstroVPK authored and jdswinbank committed Mar 16, 2016
1 parent f2cebfb commit ee03b53
Show file tree
Hide file tree
Showing 3 changed files with 680 additions and 70 deletions.
2 changes: 2 additions & 0 deletions doc/main.dox
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Data processing pipeline tasks.
Documentation for existing tasks is in \ref LSST_task_documentation.

Instructions for writing new tasks is in \ref pipeTasks_writeTask and \ref pipeTasks_writeCmdLineTask.

A high-level overview of multi-band coadd processing is in \ref pipeTasks_multiBand
*/

/**
Expand Down
108 changes: 108 additions & 0 deletions doc/multiBand.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
namespace lsst { namespace pipe { namespace tasks {
/**
\page pipeTasks_multiBand High-level Overview of Multi-Band Coadd Processing

The goal of the multi-band coadd measurement procedure is to consistently detect and measure sources across
coadds constructed in multiple filter bands in a consistent and reasonable manner i.e. measure the same
sources, with consistent centroids and shapes, across all the photometric bands. This is useful, for
example:

- When performing forced photometry of Lyman-break galaxies, which may disappear ('drop out') in bluer
filters;
- In obtaining consistent colors, which requires measuring model magnitudes based on identical model
parameters across all available bands.

Consider how this workflow contrasts with a simpler approach in which detection and measurement is carried
out in each band independently.

Our strategy for is broken up into a number of simple steps:
<DL>
<DT> i. \ref DetectCoaddSourcesTask_ "DetectCoaddSourcesTask": Detect Sources in Individual Coadds</DT>
<DD> Begin by detecting sources on each coadd. After scaling the variance plane in a coadd to correct for
the effects of warping, sources are detected using the \ref SourceDetectionTask_ "SourceDetectionTask"
subtask. This step produces sources with footprints in each band.
<DT> ii. \ref MergeDetectionsTask_ "MergeDetectionsTask": Merge Footprints and Peaks from Multiple Coadds
</DT>
<DD> Footprints and peaks from all the bands are merged together while keeping track of the band(s) that
each source comes from. This produces a cross-band master source catalog. During the merging process, we
cull garbage peaks around bright sources using the criteria described in \ref CullPeaksConfig_
"CullPeaksConfig".
<DT> iii. \ref MeasureMergedCoaddSourcesTask_ "MeasureMergedCoaddSourcesTask": Deblend & Measure Sources
</DT>
<DD> The master catalog is used to deblend & measure sources in each coadd. This ensures that all bands
will have the same sources. First, the \ref SourceDeblendTask_ "SourceDeblendTask" subtask is used to
deblend sources. The deblender has to retain all peaks from the master catalog, deblending peaks that do not
correspond to sources in the given coadd (dropouts) as PSFs. Next, the
\ref SingleFrameMeasurementTask_ "SingleFrameMeasurementTask" subtask is used to measure the properties of
the deblended children. After this, the \ref SetPrimaryFlagsTask_ "SetPrimaryFlagsTask" subtask
is run to set 'is-primary' (i.e. source to select for a self-consistent catalog) and related flags. The
\ref PropagateVisitFlagsTask_ "PropagateVisitFlagsTask" subtask is used to propagate flags from individual
visits to the coadd (e.g. was the source used for PSF determination in the original visit etc). At this
point, the \ref ANetAstrometryTask_ "ANetAstrometryTask" subtask can be run (optional, not run by default)
to match the sources to an external reference catalog such as from PanSTARRS etc.
<DT> iv. \ref MergeMeasurementsTask_ "MergeMeasurementsTask" Merge Deblended Peaks</DT>
<DD> Deblended peaks from each band are merged. A 'reference' band for each peak is tracked. This reference
band is the first band from a priority-sorted list of bands (e.g. `["HSC-I", "HSC-R", "HSC-Z", "HSC-Y",
"HSC-G",]` in the case of HSC). Every source must have a centroid, shape, and CModel fit in every
band, even if the object was not detected in the canonical band.
<DT> v. \ref ForcedPhotCoaddTask_ "ForcedPhotCoaddTask": Run Forced Photometry on Coadds</DT>
<DD> Forced photometry is run on the coadd for each band using reference centroids and shapes but using
footprints from the previous de-blending step i.e. the footprints are band specific.</DD>
<DT> vi. \ref ForcedPhotCcdTask_ "ForcedPhotCcdTask": Run Forced Photometry on Exposures</DT>
<DD> Forced photometry is run on the individual calibrated exposures for each band for each visit using the
reference measurements to provide centroids and shapes (but no deblending).</DD>
</DL>

We now provide a complete run through multiband processing using the
[ci_hsc](https://github.com/lsst/ci_hsc) package. We will process the HSC-I & -R band coadds generated from
HSC engineering test data provided in the ci_hsc package. To begin, assuming that the lsst stack has been
already set up, we must set up the obs_subaru and ci_hsc packages. This defines the environment variable
`$CI_HSC_DIR` which points at the location of the package on disc. The raw HSC exposures live in the
`$CI_HSC_DIR/raw` directory. Note that all the scons build commands are cumulative i.e. to build the coadd
in step 4, scons checks to see if the targets of step 3 exist. If not, it first builds step 3 etc. Stepwise,
we can process the data in ci_hsc as follows:

<DL>
<DT> 1. \ref ProcessCcdTask_ "Process each CCD"</DT>
<DD> Process the individual ccds in `$CI_HSC_RAW` to produce calibrated exposures.</DD>
<DT> 2. \ref MakeSkyMapTask_ "Make a SkyMap"</DT>
<DD> Create a skymap that covers the area of the sky present in the raw exposures.</DD>
<DT> 3. \ref MakeCoaddTempExpTask_ "Make coaddTempExps"</DT>
<DD> Warp the individual calibrated exposures to the tangent plane of the coadd.</DD>
<DT> 4. \ref SafeClipAssembleCoaddTask_ "Assemble Coadds"</DT>
<DD> Coadd the calibrated exposures.
\code
$CI_HSC_DIR scons coadd-HSC-R coadd-HSC-I
\endcode
</DD>
<DT> 5. \ref DetectCoaddSourcesTask_ "Detect Sources in Individual Coadds"</DT>
<DD> Detect peaks and generate footprints in each coadd individually.
\code
$CI_HSC_DIR scons detect-HSC-I detect-HSC-I
\endcode
</DD>
<DT> 6. \ref MergeDetectionsTask_ "Merge Footprints and Peaks from Multiple Coadds"</DT>
<DD> Merge the detected sources in each coadd by running
\code
$CI_HSC_DIR scons mergeDetections
\endcode
</DD>
<DT> 7. \ref MeasureMergedCoaddSourcesTask_ "Deblend & Measure Sources"</DT>
<DD> Perform deblending and measure sources in each coadd by running
\code
$CI_HSC_DIR scons measure-HSC-I measure-HSC-R
\endcode
</DD>
<DT> 8. \ref MergeMeasurementsTask_ "Merge Deblended Peaks"</DT>
<DD> Create the catalog for driving forced photometry by running
\code
$CI_HSC_DIR scons mergeMeasurements
\endcode
</DD>
</DL>

Having done this, we can run forced photometry on the coadds and individual visits using the master
catalog generated by step 8.

*/
}}} // namespace lsst::pipe::tasks

0 comments on commit ee03b53

Please sign in to comment.