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

Default local background subtraction to False for safe coadd clipping

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: pipe_tasks
    • Labels:
      None
    • Story Points:
      0.5
    • Epic Link:
    • Sprint:
      DRP F16-6
    • Team:
      Data Release Production

      Description

      In RFC-212 we adopted turning on the "junk suppression" temporary local background subtraction by default: SourceDetectionConfig.doTempLocalBackground=True. Since the safe clipping coadd assembly (introduced in DM-2915) also performs object detection, this had the effect of turning on the junk suppression background there too. The safe clipping algorithm was designed and tuned with no extra background estimations, thus doTempLocalBackground should default to False for that task.

        Attachments

          Issue Links

            Activity

            No builds found.
            lauren Lauren MacArthur created issue -
            lauren Lauren MacArthur made changes -
            Field Original Value New Value
            Component/s pipe_tasks [ 10726 ]
            swinbank John Swinbank made changes -
            Epic Link DM-6172 [ 24685 ]
            swinbank John Swinbank made changes -
            Sprint DRP F16-6 [ 287 ]
            lauren Lauren MacArthur made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            lauren Lauren MacArthur made changes -
            Attachment safeClip_junkSuppression.png [ 28593 ]
            Hide
            lauren Lauren MacArthur added a comment -

            It turns out that turning of the junk suppression in coadd assembly is not the full solution (see LL panel of figure). On further investigation, the junk suppression temporary local background subtraction also needs to be defaulted to False in processCcd. This is because the safe clipping algorithm reverts to the footprints from single frame processing for very large footprints. Turning it off in processCcd does indeed result in the desired safe clipping behavior (see LR panel & compare with HSC run in UL panel.

            Show
            lauren Lauren MacArthur added a comment - It turns out that turning of the junk suppression in coadd assembly is not the full solution (see LL panel of figure). On further investigation, the junk suppression temporary local background subtraction also needs to be defaulted to False in processCcd. This is because the safe clipping algorithm reverts to the footprints from single frame processing for very large footprints. Turning it off in processCcd does indeed result in the desired safe clipping behavior (see LR panel & compare with HSC run in UL panel.
            Hide
            swinbank John Swinbank added a comment -

            Hey Lauren MacArthur — any chance we're going to get this in before the end of the cycle? It seems like the work has been done.

            Show
            swinbank John Swinbank added a comment - Hey Lauren MacArthur — any chance we're going to get this in before the end of the cycle? It seems like the work has been done.
            Hide
            lauren Lauren MacArthur added a comment -

            Ah, yes. I stalled on this when I realized I need to update some expected values for unittests and, presumably, the demo. I'll try to get to this today (and may bother you to get the updated OSX demo expected files...)

            Show
            lauren Lauren MacArthur added a comment - Ah, yes. I stalled on this when I realized I need to update some expected values for unittests and, presumably, the demo. I'll try to get to this today (and may bother you to get the updated OSX demo expected files...)
            Hide
            lauren Lauren MacArthur added a comment - - edited

            Would you mind giving this a review? I have updated the demo Linux expected files (having setup the latest weekly w_2016_49 on tiger here at Princeton)...would you also be able to update the Darwin ones using this ticket branch for pipe_tasks?

            Jenkins is running: https://ci.lsst.codes/job/stack-os-matrix/label=centos-7,python=py2/18651/console (but will certainly fail the demo, which I forgot to skip!)

            As expected, Jenkins failed at the demo (but passed all of lsst_sims lsst_distrib ci_hsc).

            Show
            lauren Lauren MacArthur added a comment - - edited Would you mind giving this a review? I have updated the demo Linux expected files (having setup the latest weekly w_2016_49 on tiger here at Princeton)...would you also be able to update the Darwin ones using this ticket branch for pipe_tasks ? Jenkins is running: https://ci.lsst.codes/job/stack-os-matrix/label=centos-7,python=py2/18651/console (but will certainly fail the demo, which I forgot to skip!) As expected, Jenkins failed at the demo (but passed all of lsst_sims lsst_distrib ci_hsc ).
            lauren Lauren MacArthur made changes -
            Reviewers John Swinbank [ swinbank ]
            Status In Progress [ 3 ] In Review [ 10004 ]
            Hide
            swinbank John Swinbank added a comment -

            Code changes look fine: no objections.

            Your commit message for the work in lsst_dm_stack_demo claims you are updating DarwinX86, but in fact you are updating Linux64. Oops. I'll push updated DarwinX86 results in a moment.

            Have you checked that the updated test values in testProcessCcd.py are valid for both Python 2 and Python 3? The current values/tolerance were set so that the test passes on both, despite there being a discrepancy (which there shouldn't be; see DM-8017 for details). I'm worried that your updated numbers might only work on Py2.

            Show
            swinbank John Swinbank added a comment - Code changes look fine: no objections. Your commit message for the work in lsst_dm_stack_demo claims you are updating DarwinX86, but in fact you are updating Linux64. Oops. I'll push updated DarwinX86 results in a moment. Have you checked that the updated test values in testProcessCcd.py are valid for both Python 2 and Python 3? The current values/tolerance were set so that the test passes on both, despite there being a discrepancy (which there shouldn't be; see DM-8017 for details). I'm worried that your updated numbers might only work on Py2.
            swinbank John Swinbank made changes -
            Status In Review [ 10004 ] Reviewed [ 10101 ]
            Hide
            swinbank John Swinbank added a comment -

            (Actually, I'll just squash my DarwinX86 changes into your Linux64 changes, so no need for you to worry about the commit message.)

            Show
            swinbank John Swinbank added a comment - (Actually, I'll just squash my DarwinX86 changes into your Linux64 changes, so no need for you to worry about the commit message.)
            Hide
            lauren Lauren MacArthur added a comment -

            How do I do the python3 test? I tried running Jenkins having selected py3, but it bombed at oorb: https://ci.lsst.codes/job/stack-os-matrix/label=centos-7,python=py3/18652/console

            I also just tried using python3 tests/testProcessCcd.py on tiger, but it bombed with

            ImportError: No module named 'numpy'

            Show
            lauren Lauren MacArthur added a comment - How do I do the python3 test? I tried running Jenkins having selected py3, but it bombed at oorb: https://ci.lsst.codes/job/stack-os-matrix/label=centos-7,python=py3/18652/console I also just tried using python3 tests/testProcessCcd.py on tiger, but it bombed with ImportError: No module named 'numpy'
            Hide
            swinbank John Swinbank added a comment -

            How do I do the python3 test?

            Hah. You ask all the difficult questions.

            I believe the only way to do this is to build the stack using lsstsw. I think it's probably easier for me to do that than you (I have all the machinery set up), so let me give it a go and I'll let you know.

            Show
            swinbank John Swinbank added a comment - How do I do the python3 test? Hah. You ask all the difficult questions. I believe the only way to do this is to build the stack using lsstsw. I think it's probably easier for me to do that than you (I have all the machinery set up), so let me give it a go and I'll let you know.
            Hide
            lauren Lauren MacArthur added a comment -

            Actually, Yusra AlSayyad just gave me the tip that Jenkins should build with py3 if I just include lsst_apps in the product list and skip the demo...trying now.

            Show
            lauren Lauren MacArthur added a comment - Actually, Yusra AlSayyad just gave me the tip that Jenkins should build with py3 if I just include lsst_apps in the product list and skip the demo...trying now.
            Hide
            lauren Lauren MacArthur added a comment -

            https://ci.lsst.codes/job/stack-os-matrix/label=centos-7,python=py3/18691/console

            Just got past pipe_tasks (on my branch), so I think we should be good to go (I'll let it finish before merging though).

            Show
            lauren Lauren MacArthur added a comment - https://ci.lsst.codes/job/stack-os-matrix/label=centos-7,python=py3/18691/console Just got past pipe_tasks (on my branch), so I think we should be good to go (I'll let it finish before merging though).
            Hide
            swinbank John Swinbank added a comment -

            The downside of that is that you can't use it to check if the demo passes on both Py2 & Py3.

            However, it looks as if the demo hasn't actually been considered as part of the Py3 porting process, so chances are nobody currently knows if it passes on Py3.

            Given that, I guess just checking that lsst_apps works through Jenkins is fine. Good thinking, Yusra.

            Show
            swinbank John Swinbank added a comment - The downside of that is that you can't use it to check if the demo passes on both Py2 & Py3. However, it looks as if the demo hasn't actually been considered as part of the Py3 porting process, so chances are nobody currently knows if it passes on Py3. Given that, I guess just checking that lsst_apps works through Jenkins is fine. Good thinking, Yusra.
            Hide
            lauren Lauren MacArthur added a comment -

            Can't check the demo regardless...it won't pull a branch!

            Show
            lauren Lauren MacArthur added a comment - Can't check the demo regardless...it won't pull a branch!
            Hide
            swinbank John Swinbank added a comment -

            Right: to check the demo you'd need to build against Python 3 yourself. I think we maybe ought to do that, except that I bet the demo will just fail to run with Py 3 so it's not worth the effort.

            Show
            swinbank John Swinbank added a comment - Right: to check the demo you'd need to build against Python 3 yourself. I think we maybe ought to do that, except that I bet the demo will just fail to run with Py 3 so it's not worth the effort.
            Hide
            lauren Lauren MacArthur added a comment -

            Ah, yes, I suppose that would be the way to go as of now. Just to be sure, are you advising that I don't bother checking the demo against py3?

            Show
            lauren Lauren MacArthur added a comment - Ah, yes, I suppose that would be the way to go as of now. Just to be sure, are you advising that I don't bother checking the demo against py3?
            Hide
            swinbank John Swinbank added a comment -

            I satisfied myself that nobody has actually run the demo with Py3. Therefore, I think not bothering to check against it is fine.

            Show
            swinbank John Swinbank added a comment - I satisfied myself that nobody has actually run the demo with Py3. Therefore, I think not bothering to check against it is fine.
            Hide
            tjenness Tim Jenness added a comment -

            The problem is we can't run the demo on Jenkins because running the demo has been conflated with running lsst_ci.

            Show
            tjenness Tim Jenness added a comment - The problem is we can't run the demo on Jenkins because running the demo has been conflated with running lsst_ci .
            Hide
            lauren Lauren MacArthur added a comment -

            Merged to master.

            Show
            lauren Lauren MacArthur added a comment - Merged to master.
            lauren Lauren MacArthur made changes -
            Resolution Done [ 10000 ]
            Status Reviewed [ 10101 ] Done [ 10002 ]
            lauren Lauren MacArthur made changes -
            Link This issue relates to DM-14935 [ DM-14935 ]

              People

              Assignee:
              lauren Lauren MacArthur
              Reporter:
              lauren Lauren MacArthur
              Reviewers:
              John Swinbank
              Watchers:
              John Swinbank, Lauren MacArthur, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.