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

Check uses of darktime for NAN

    XMLWordPrintable

Details

    • 1
    • DRP S17-2
    • Data Release Production

    Description

      The darktime can be NaN if not set explicitly in the obs package's makeRawVisitInfo. Any scaling of an exposure by the darktime can therefore result in a useless image full of NaN values. We therefore need to catch the case isnan(darktime) wherever we use it: pipe_drivers for construction of the dark, and ip_isr for application of the dark.

      Attachments

        Activity

          price Paul Price added a comment -

          rowen, I hope you like this solution better than the solution from DM-8962.

          price@price-laptop:~/LSST/pipe/drivers (tickets/DM-9004=) $ git sub
          commit 4a0c73c86d258cf14632930a66ac618ace9eb91f
          Author: Paul Price <price@astro.princeton.edu>
          Date:   Mon Jan 16 13:16:31 2017 -0500
           
              constructCalibs: check for non-finite darktime
              
              Scaling by a non-finite darktime can destroy the image.
              This is important because the darktime defaults to NAN
              unless set explicitly by the obs package.
           
           python/lsst/pipe/drivers/constructCalibs.py | 9 ++++-----
           1 file changed, 4 insertions(+), 5 deletions(-)
           
           
          price@price-laptop:~/LSST/ip/isr (tickets/DM-9004=) $ git sub
          commit 2ed0dcfbcf1afdc8d3001575d8312119669b74b9
          Author: Paul Price <price@astro.princeton.edu>
          Date:   Mon Jan 16 13:19:22 2017 -0500
           
              IsrTask: check for non-finite darktime
              
              Scaling by a non-finite darktime can destroy the image.
              This is important because the darktime defaults to NAN
              unless set explicitly by the obs package.
           
           python/lsst/ip/isr/isrTask.py      | 10 ++++++++--
           tests/testBiasAndDarkCorrection.py | 41 ++++++++++++++++++++++++++++++++++++++
           2 files changed, 49 insertions(+), 2 deletions(-)
          

          price Paul Price added a comment - rowen , I hope you like this solution better than the solution from DM-8962 . price@price-laptop:~/LSST/pipe/drivers (tickets/DM-9004=) $ git sub commit 4a0c73c86d258cf14632930a66ac618ace9eb91f Author: Paul Price <price@astro.princeton.edu> Date: Mon Jan 16 13:16:31 2017 -0500   constructCalibs: check for non-finite darktime Scaling by a non-finite darktime can destroy the image. This is important because the darktime defaults to NAN unless set explicitly by the obs package.   python/lsst/pipe/drivers/constructCalibs.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)     price@price-laptop:~/LSST/ip/isr (tickets/DM-9004=) $ git sub commit 2ed0dcfbcf1afdc8d3001575d8312119669b74b9 Author: Paul Price <price@astro.princeton.edu> Date: Mon Jan 16 13:19:22 2017 -0500   IsrTask: check for non-finite darktime Scaling by a non-finite darktime can destroy the image. This is important because the darktime defaults to NAN unless set explicitly by the obs package.   python/lsst/ip/isr/isrTask.py | 10 ++++++++-- tests/testBiasAndDarkCorrection.py | 41 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-)
          price Paul Price added a comment -

          Additional commits in obs_subaru, found necessary during Jenkins:

          price@price-laptop:~/LSST/obs/subaru (tickets/DM-9004=) $ git sub
          commit f5d0813460465f6cfdb0d77f33486a92bb360377
          Author: Paul Price <price@astro.princeton.edu>
          Date:   Mon Jan 16 14:03:53 2017 -0500
           
              HSC: set darkTime
              
              It's not recorded in the header, so set it to the exposureTime.
              Unfortunately, that's the best we can do. It needs to be set
              explicitly, or it will be NAN.
           
           python/lsst/obs/hsc/hscMapper.py           | 2 +-
           python/lsst/obs/hsc/makeHscRawVisitInfo.py | 1 +
           2 files changed, 2 insertions(+), 1 deletion(-)
           
          commit 167c7eff8fe69b14137c7a480ea6fd0ad839b7fe
          Author: Paul Price <price@astro.princeton.edu>
          Date:   Tue Jan 10 14:26:20 2017 -0500
           
              Test that exposure time and dark time are set
           
           tests/testRepository.py | 3 +++
           1 file changed, 3 insertions(+)
          

          price Paul Price added a comment - Additional commits in obs_subaru, found necessary during Jenkins: price@price-laptop:~/LSST/obs/subaru (tickets/DM-9004=) $ git sub commit f5d0813460465f6cfdb0d77f33486a92bb360377 Author: Paul Price <price@astro.princeton.edu> Date: Mon Jan 16 14:03:53 2017 -0500   HSC: set darkTime It's not recorded in the header, so set it to the exposureTime. Unfortunately, that's the best we can do. It needs to be set explicitly, or it will be NAN.   python/lsst/obs/hsc/hscMapper.py | 2 +- python/lsst/obs/hsc/makeHscRawVisitInfo.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)   commit 167c7eff8fe69b14137c7a480ea6fd0ad839b7fe Author: Paul Price <price@astro.princeton.edu> Date: Tue Jan 10 14:26:20 2017 -0500   Test that exposure time and dark time are set   tests/testRepository.py | 3 +++ 1 file changed, 3 insertions(+)
          rowen Russell Owen added a comment -

          Looks very good.

          Initially I thought perhaps isr.darkCorrection should check for scaling being nan, instead of the code that calls it. But the way you implemented it gives a more useful error message so I think you made the right call.

          rowen Russell Owen added a comment - Looks very good. Initially I thought perhaps isr.darkCorrection should check for scaling being nan , instead of the code that calls it. But the way you implemented it gives a more useful error message so I think you made the right call.
          price Paul Price added a comment -

          Thanks Russell.

          Merged to master.

          price Paul Price added a comment - Thanks Russell. Merged to master.

          People

            price Paul Price
            price Paul Price
            Russell Owen
            Paul Price, Russell Owen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Jenkins

                No builds found.