Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meas_base DM-1954: HeavyFootprints in forced coadd photometry #23

Merged
merged 27 commits into from
Aug 13, 2015

Commits on Aug 13, 2015

  1. forcedPhotImage: allow schema to be specified in constructor

    When these Tasks are run in their own stand-alone scripts, the schema
    is loaded through the butler.  However, when they are run as part of a
    common operation, the Tasks are instantiated before the schemas are
    written out, and so they need to be given the schemas at construction
    time.  This change makes both possible: the schema is used if provided,
    otherwise loaded from the butler.
    
    Note: this is essentially a cherry-pick from HSC-1063 except that
    we still refer to Coadd_src_schema instead of Coadd_ref_schema.
    This will likely change once we have the multiband processing
    working on the LSST stack.
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    346bea9 View commit details
    Browse the repository at this point in the history
  2. CoaddSrcReferencesTask: make the dataset suffix a class variable

    While we may want to load from deepCoadd_src, under the multiband
    processing scheme it's deepCoadd_ref, so that suffix needs to be
    customisable.  Have NOT gone to deepCoadd_ref exclusively yet, so the
    old forced photometry should still work.
    PaulPrice authored and laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    4b14967 View commit details
    Browse the repository at this point in the history
  3. Use IDs from reference catalog in coadd forced photometry

    Now that we have consistent source IDs across all coadd measurement catalogs
    (because we're merging at the Footprint/Peak level before deblending), those
    catalogs can all have consistent IDs, instead of generating their own.  That means
    we want to use the reference catalog ID as the source ID in forced photometry.
    
    This is essentially a cherry-pick from HSC-1062's commit:
    HyperSuprime-Cam/pipe_tasks@d85a382
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    aaa5ba4 View commit details
    Browse the repository at this point in the history
  4. ForcedPhot tasks are now responsible for attaching Footrints to sources

    Forced photometry previously relied on the MeasureSources class to
    transform reference Footprints and attach them to sources, but we've
    moved that responsibility here so we can override it at the Python
    level in the future.
    
    This is essentially a cherry-pick from HSC-1062's commit:
    HyperSuprime-Cam/pipe_tasks@0f29c18
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    0e1d0eb View commit details
    Browse the repository at this point in the history
  5. Use (Heavy)Footprints from post-merge measurements in forced photometry

    This allows us to use deblend results from the single-band measurement phase
    to replace neighbors with noise in forced photometry.
    
    This is essentially a cherry-pick from HSC-1062's commit:
    HyperSuprime-Cam/pipe_tasks@2218b2e
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    bff4677 View commit details
    Browse the repository at this point in the history
  6. MultiBandReferences doesn't require coaddName=chisq

    MultiBandReferences can't delegate its config validation
    directly to CoaddSrcReferences, because that includes a
    check for chi-squared coadd that we don't want.
    
    This is essentially a cherry-pick from HSC-1062's commit:
    HyperSuprime-Cam/pipe_tasks@14efa55
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    a23d0b5 View commit details
    Browse the repository at this point in the history
  7. Switch default forced phot references to multi-band

    This is essentially a cherry-pick from HSC-1062's commit:
    HyperSuprime-Cam/pipe_tasks@814036b
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    5d5c6f2 View commit details
    Browse the repository at this point in the history
  8. Improve log messages in forced photometry

    Printing out the number of sources isn't as useful as printing
    the data ID, especially when we already have other log messages
    that print the same number
    
    This is essentially a cherry-pick from HSC-1062's commit:
    HyperSuprime-Cam/pipe_tasks@da5a18d
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    07429f0 View commit details
    Browse the repository at this point in the history
  9. Don't attempt to remove patch overlaps in coadd forced photometry

    Now that we're trying to use deblended HeavyFootprints here, we
    can't afford to have parent footprints rejected as being in the
    overlap region if their children might not be rejected, because
    the ReplaceWithNoiseTask requires all sources to have a parent.
    
    In order to change this back, we'd need more intelligent handling
    of the overlaps.  But once this is loaded into the database,
    we should be able to join with the main measurement catalog and
    just use the "primary" flags there to handle overlaps.
    
    This is essentially a cherry-pick from HSC-1062's commit:
    HyperSuprime-Cam/pipe_tasks@681422d
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    9b6b652 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e9bdc6a View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5ecb41b View commit details
    Browse the repository at this point in the history
  12. Put reference object IDs in regular "id" field in CCD forced photometry.

    Instead of having a separate ID for each forced source, we'll just have
    the foreign key to the coadd-based references.  We'll do the same with
    the deblender fields (since there isn't any deblending in CCD forced
    photometry anyway).
    
    This is essentially a cherry-pick from HSC-1218's commit:
    HyperSuprime-Cam/pipe_tasks@9e72537
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    c091ea9 View commit details
    Browse the repository at this point in the history
  13. Filter reference sources in forced photometry by deblend family

    The ReplaceWithNoise procedure in measurement requires all child sources
    to have their parents present, so we can't do any kind of filtering that
    could cut a parent but not one or more of its children.
    
    This is essentially a cherry-pick of the changes to reference.py
    from HSC-1218's commit (i.e. the changes to forcedPhotImage.py were
    not made as they are not appropriate):
    HyperSuprime-Cam/pipe_tasks@c442bc9
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    8832527 View commit details
    Browse the repository at this point in the history
  14. Move reference filtering from forcedPhotImage to forcedPhotCcd.

    This is essentially a cherry-pick of the changes to forcedPhotCcd.py
    from HSC-1256's commit (i.e. the changes to forcedPhotImage.py were
    not made as they are not appropriate):
    HyperSuprime-Cam/pipe_tasks@d369520
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    de7de8e View commit details
    Browse the repository at this point in the history
  15. Fix trivial bugs in forced photometry from HSC-1256

    A broken, pre-review version of HSC-1256 was accidentally merged to
    master.
    
    This is essentially a cherry-pick of the changes to forcedPhotCcd.py
    from HSC's stand-alone commit (i.e. the changes to forcedPhotImage.py
    were not made as they are not appropriate):
    HyperSuprime-Cam/pipe_tasks@d6d652b
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    e44735b View commit details
    Browse the repository at this point in the history
  16. Raise error if reference list contains parent-less children

    Check that the reference catalog does not contain any children for which
    any member of their parent chain is not within the list.  This can occur at
    boundaries when the parent is outside and one of the children is within.
    Currently, the parent chain is always only one deep, but just in case, this
    code checks for any case where when the parent chain to a child's topmost
    parent is broken and raises an exception if it occurs.
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    6c11b31 View commit details
    Browse the repository at this point in the history
  17. Remove footprint attachment from generateSources()

    Footprints are now attached to the sources using the class's
    implementation of attachFootprints().
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    b97dcc7 View commit details
    Browse the repository at this point in the history
  18. Move call to generateSources() to ProcessImageForcedTask

    Moving the source generation from ForcedMeasurementTask in
    forcedMeasurement.py to ProcessImageForcedTask in forcedPhotImage.py
    is required so that we can pass the sources to attachFootprints()
    before measurement of forced photometry.
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    c9d69ec View commit details
    Browse the repository at this point in the history
  19. Add ${PRODUCT_DIR}/bin to PATH in meas_base.table

    Needed to access forcedPhotCcd.py and forcedPhotCoadd.py command
    line tasks.
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    edbb044 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    def7c24 View commit details
    Browse the repository at this point in the history
  21. Do not convert reference catalog to a list

    In doing so we would lose the attributes of the SourceCatalog
    (e.g. getChildren()) which are required by the measurement.
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    622f3e7 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    2d7b35a View commit details
    Browse the repository at this point in the history
  23. Move default Footprint attachment to ForcedMeasurementTask

    This is required so that Footprints can be attached to the generated
    sources prior to forced measurement.  ForcedPhotImageTask inherits
    this default method (which downgrades HeavyFootprints into regular
    Footprints).  Subclasses for ForcedPhotImageTask must implement their
    own version of this method to define how those Footprints should be
    generated.
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    086321b View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    4224f62 View commit details
    Browse the repository at this point in the history
  25. Update exposure name for forced coadd photometry

    We need to do forced measurement using the exposure that has
    had it's background fields updated in the multi-band measurement
    stage.
    
    See lsst/pipe_tasks@7901922
    laurenam committed Aug 13, 2015
    Configuration menu
    Copy the full SHA
    aeac5aa View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    fd6fdb3 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    a354455 View commit details
    Browse the repository at this point in the history