Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-23049

Fix association of flag columns to forced_src catalogs

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: pipe_analysis
    • Labels:
      None
    • Story Points:
      10
    • Epic Link:
    • Sprint:
      DRP S20-2 (Jan), DRP S20-3 (Feb)
    • Team:
      Data Release Production

      Description

      The coaddAnalysis.py script distinguishes between "unforced" (i.e. the *_meas dataset type) and "forced" (i.e the *_forced_src dataset type). The latter table does not include some of the flag columns that are useful for sample sub-selection. The desired columns are thus copied to the "forced" catalog within the script.   Most of these columns should be coming from the *_ref dataset, as it is those that are appropriate for the forced catalogs.  Some of those that should be coming from *_ref are coming from *_meas and thus can have the wrong value (it's quite rare but, for example, for two random patches, the detect_isPatchInner is different for 1 and 6 sources).  However, we want the various "calib*" columns to come from the *_meas catalog as these reflect what actually occurred during SFM per band (which is always what we want for the calib* columns rather than assigning the specific value associated with the forced filter to all other filters).  Here we should make the column copying more explicit and in accordance with the above desiderata.

       

        Attachments

          Activity

          Hide
          lauren Lauren MacArthur added a comment -

          This is finally ready to go. As usual, there was a fair amount of scope-creep and a slight change in the philosophy of the initial description (which I have now updated to reflect the current needs). Namely (and see commit descriptions for details):

          • I significantly restricted the culling-based-on-flags (particularly for calib-used subsets) in favor of just “effectively” culling on the quantities being plotted (as they must be finite in order to get included) and adding highlighting any points with any of the flags we were originally blanket culling on (if any are present, the highlight pattern is added to the legends…which have also been streamlines so as to be less overwhelming/data-hiding).
          • I removed altogether the flagCatalog option to the plotting functions. This was, in hindsight, a flawed and user-error prone thing to use/allow
          • I took the opportunity to add the CircAp - PSF vs. CircAp plots that proved so useful in highlighting and debuging issues related to the aperture correction measurement (see DM-23071).
          • I fixed a bug whereby the identification of objects as star/galaxy failed to account for a failed classification (and added an “unknown” object type for any plots where these objects get plotted).

          I have tested all the changes by running examples of all the scripts on —rerun RC/w_2019_38/DM-21386 using both the master and this ticket branch of pipe_analysis. For most of the plots, the differences are small and largely involve objects not included in the computation of the statistics. You can compare outputs by looking at
          https://lsst-web.ncsa.illinois.edu/~lauren/lauren/DM-23049/master/plots/
          https://lsst-web.ncsa.illinois.edu/~lauren/lauren/DM-23049/plots/

          Here are a few specific examples:
          Master:

          New:

          Master:

          New:

          Here’s an example of the added CircAp - PSF vs. CircAp plot (also shows the “unknown” object type and the flag highlighting):
          New:

          Show
          lauren Lauren MacArthur added a comment - This is finally ready to go. As usual, there was a fair amount of scope-creep and a slight change in the philosophy of the initial description (which I have now updated to reflect the current needs). Namely (and see commit descriptions for details): I significantly restricted the culling-based-on-flags (particularly for calib-used subsets) in favor of just “effectively” culling on the quantities being plotted (as they must be finite in order to get included) and adding highlighting any points with any of the flags we were originally blanket culling on (if any are present, the highlight pattern is added to the legends…which have also been streamlines so as to be less overwhelming/data-hiding). I removed altogether the flagCatalog option to the plotting functions. This was, in hindsight, a flawed and user-error prone thing to use/allow I took the opportunity to add the CircAp - PSF vs. CircAp plots that proved so useful in highlighting and debuging issues related to the aperture correction measurement (see DM-23071 ). I fixed a bug whereby the identification of objects as star/galaxy failed to account for a failed classification (and added an “unknown” object type for any plots where these objects get plotted). I have tested all the changes by running examples of all the scripts on —rerun RC/w_2019_38/ DM-21386 using both the master and this ticket branch of pipe_analysis . For most of the plots, the differences are small and largely involve objects not included in the computation of the statistics. You can compare outputs by looking at https://lsst-web.ncsa.illinois.edu/~lauren/lauren/DM-23049/master/plots/ https://lsst-web.ncsa.illinois.edu/~lauren/lauren/DM-23049/plots/ Here are a few specific examples: Master: New: Master: New: Here’s an example of the added CircAp - PSF vs. CircAp plot (also shows the “unknown” object type and the flag highlighting): New:
          Hide
          lauren Lauren MacArthur added a comment -

          With my apologies for dumping this on you (ahead of dumping DM-22266 on you...), could you give this a look when you get a chance?

          See the above comment and commit descriptions for details and comparisons of old vs. new with these changes. I should also mention that I've checked that this did not break processing DC2 datasets.

           

          Show
          lauren Lauren MacArthur added a comment - With my apologies for dumping this on you (ahead of dumping DM-22266 on you...), could you give this a look when you get a chance? See the above comment and commit descriptions for details and comparisons of old vs. new with these changes. I should also mention that I've checked that this did not break processing DC2 datasets.  
          Hide
          sophiereed Sophie Reed added a comment -

          I think some of the plots, particularly the last one shown here, could benefit from rearrangement so that the points are not obscured. This is probably out of scope for this ticket though and will probably be addressed in a future ticket to tidy up some of the plots.

          Show
          sophiereed Sophie Reed added a comment - I think some of the plots, particularly the last one shown here, could benefit from rearrangement so that the points are not obscured. This is probably out of scope for this ticket though and will probably be addressed in a future ticket to tidy up some of the plots.
          Hide
          lauren Lauren MacArthur added a comment -

          I agree. As a compromise in the meantime, I have decreased the font size in those legends and added an extra level of string-shrinking so they are now a bit less obstructive. The good news is that that last plot shown above is really the only plot where so many highlighted flagged sources make it into the plot (in the other plots, having CModel as one of the values plotted naturally selects against them).

          Show
          lauren Lauren MacArthur added a comment - I agree. As a compromise in the meantime, I have decreased the font size in those legends and added an extra level of string-shrinking so they are now a bit less obstructive. The good news is that that last plot shown above is really the only plot where so many highlighted flagged sources make it into the plot (in the other plots, having CModel as one of the values plotted naturally selects against them).
          Hide
          lauren Lauren MacArthur added a comment -

          Apologies for the long delay between review & response.  I've addressed all of your comments.  Let me know if things look better to you now.

          Show
          lauren Lauren MacArthur added a comment - Apologies for the long delay between review & response.  I've addressed all of your comments.  Let me know if things look better to you now.
          Hide
          lauren Lauren MacArthur added a comment -

          As we just discussed in person, I have added two bug-fix commits to this ticket.  In making an update to the application of external calibrations to the catalogs, I hit a snag where the updateCoords function was not available on the source records.  It turns out that this was fallout from an inadvertent SourceCatalog -> SimpleCatalog conversion when mag & magErr columns were added to the catalogs (in the context of facilitating the analysis plots for the data with fake sources added).  Both issues are fixed in those commits.

          Show
          lauren Lauren MacArthur added a comment - As we just discussed in person, I have added two bug-fix commits to this ticket.  In making an update to the application of external calibrations to the catalogs, I hit a snag where the updateCoords function was not available on the source records.  It turns out that this was fallout from an inadvertent SourceCatalog -> SimpleCatalog conversion when mag & magErr columns were added to the catalogs (in the context of facilitating the analysis plots for the data with fake sources added).  Both issues are fixed in those commits.
          Hide
          lauren Lauren MacArthur added a comment -

          Quick follow-up: just to err on the cautious, I reran all the scripts after the above two bug-fix commits and confirmed the results are identical (what you see above are now the latest versions).

          Show
          lauren Lauren MacArthur added a comment - Quick follow-up: just to err on the cautious, I reran all the scripts after the above two bug-fix commits and confirmed the results are identical (what you see above are now the latest versions).

            People

            Assignee:
            lauren Lauren MacArthur
            Reporter:
            lauren Lauren MacArthur
            Reviewers:
            Sophie Reed
            Watchers:
            Lauren MacArthur, Sophie Reed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.