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

New ip_diffim algorithm breaks on macOS

    XMLWordPrintable

    Details

    • Story Points:
      1
    • Sprint:
      AP F22-1 (June)
    • Team:
      Alert Production
    • Urgent?:
      No

      Description

      The new image differencing algorithm from DM-33001 breaks on macOS ARM.

      $ pytest --log-level=DEBUG -x tests/test_subtractTask.py
      ==================================================================================== test session starts ====================================================================================
      platform darwin -- Python 3.10.4, pytest-7.1.2, pluggy-1.0.0
      rootdir: /Users/timj/work/lsstsw/build/ip_diffim, configfile: setup.cfg
      plugins: xdist-2.5.0, remotedata-0.3.3, forked-1.4.0, arraydiff-0.3, asdf-2.10.1, mock-3.7.0, hypothesis-6.46.7, flake8-1.1.1, astropy-0.10.0, session2file-0.1.11, filter-subpackage-0.1.1, openfiles-0.5.0, doctestplus-0.12.0, subtests-0.7.0, astropy-header-0.1.2, cov-3.0.0
      collected 16 items                                                                                                                                                                          
       
      tests/test_subtractTask.py s.F
       
      ========================================================================================= FAILURES ==========================================================================================
      _____________________________________________________________________ AlardLuptonSubtractTest.test_auto_convolveScience _____________________________________________________________________
       
      self = <test_subtractTask.AlardLuptonSubtractTest testMethod=test_auto_convolveScience>
       
          def test_auto_convolveScience(self):
              """Test that auto mode gives the same result as convolveScience when
              the science psf is the smaller.
              """
              noiseLevel = 1.
              science, sources = makeTestImage(psfSize=2.0, noiseLevel=noiseLevel, noiseSeed=6)
              scienceOrig = science.clone()
              template, _ = makeTestImage(psfSize=3.0, noiseLevel=noiseLevel, noiseSeed=7,
                                          templateBorderSize=20, doApplyCalibration=True)
              config = subtractImages.AlardLuptonSubtractTask.ConfigClass()
              config.doSubtractBackground = False
              config.mode = "convolveScience"
          
              task = subtractImages.AlardLuptonSubtractTask(config=config)
      >       output = task.run(template, science, sources)
       
      tests/test_subtractTask.py:219: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
      python/lsst/ip/diffim/subtractImages.py:234: in run
          subtractResults = self.runConvolveScience(template, science, kernelSources)
      python/lsst/ip/diffim/subtractImages.py:324: in runConvolveScience
          kernelResult = self.makeKernel.run(science, template, sources, preconvolved=False)
      python/lsst/ip/diffim/makeKernel.py:128: in run
          spatialSolution, psfMatchingKernel, backgroundModel = self._solve(kernelCellSet, basisList)
      ../../stack/lsst-scipipe-4.0.0/Darwin/utils/g894b03d5c6+82f6db4df0/python/lsst/utils/timer.py:345: in timeMethod_wrapper
          res = func(self, *args, **keyArgs)
      python/lsst/ip/diffim/psfMatch.py:1040: in _solve
          raise e
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       
      self = <lsst.ip.diffim.makeKernel.MakeKernelTask object at 0x1694392d0>, kernelCellSet = <lsst.afw.math.SpatialCellSet object at 0x16944a8f0>
      basisList = [<lsst.afw.math.FixedKernel object at 0x16945dab0>, <lsst.afw.math.FixedKernel object at 0x16945daf0>, <lsst.afw.math....x16945dc30>, <lsst.afw.math.FixedKernel object at 0x16945dbb0>, <lsst.afw.math.FixedKernel object at 0x16945dbf0>, ...]
      returnOnExcept = False
       
          @timeMethod
          def _solve(self, kernelCellSet, basisList, returnOnExcept=False):
              """Solve for the PSF matching kernel
          
              Parameters
              ----------
              kernelCellSet : `lsst.afw.math.SpatialCellSet`
                  a SpatialCellSet to use in determining the matching kernel
                   (typically as provided by _buildCellSet)
              basisList : `list` of `lsst.afw.math.kernel.FixedKernel`
                  list of Kernels to be used in the decomposition of the spatially varying kernel
                  (typically as provided by makeKernelBasisList)
              returnOnExcept : `bool`, optional
                  if True then return (None, None) if an error occurs, else raise the exception
          
              Returns
              -------
              psfMatchingKernel : `lsst.afw.math.LinearCombinationKernel`
                  Spatially varying Psf-matching kernel
              backgroundModel : `lsst.afw.math.Function2D`
                  Spatially varying background-matching function
          
              Raises
              ------
              RuntimeError :
                  If unable to determine PSF matching kernel and ``returnOnExcept==False``.
              """
          
              import lsstDebug
              display = lsstDebug.Info(__name__).display
          
              maxSpatialIterations = self.kConfig.maxSpatialIterations
              nStarPerCell = self.kConfig.nStarPerCell
              usePcaForSpatialKernel = self.kConfig.usePcaForSpatialKernel
          
              # Visitor for the single kernel fit
              ps = pexConfig.makePropertySet(self.kConfig)
              if self.useRegularization:
                  singlekv = diffimLib.BuildSingleKernelVisitorF(basisList, ps, self.hMat)
              else:
                  singlekv = diffimLib.BuildSingleKernelVisitorF(basisList, ps)
          
              # Visitor for the kernel sum rejection
              ksv = diffimLib.KernelSumVisitorF(ps)
          
              # Main loop
              trace_loggers = [getTraceLogger(self.log.getChild("_solve"), i) for i in range(5)]
              t0 = time.time()
              try:
                  totalIterations = 0
                  thisIteration = 0
                  while (thisIteration < maxSpatialIterations):
          
                      # Make sure there are no uninitialized candidates as active occupants of Cell
                      nRejectedSkf = -1
                      while (nRejectedSkf != 0):
                          trace_loggers[1].debug("Building single kernels...")
                          kernelCellSet.visitCandidates(singlekv, nStarPerCell)
                          nRejectedSkf = singlekv.getNRejected()
                          trace_loggers[1].debug(
                              "Iteration %d, rejected %d candidates due to initial kernel fit",
                              thisIteration, nRejectedSkf
                          )
          
                      # Reject outliers in kernel sum
                      ksv.resetKernelSum()
                      ksv.setMode(diffimLib.KernelSumVisitorF.AGGREGATE)
                      kernelCellSet.visitCandidates(ksv, nStarPerCell)
      >               ksv.processKsumDistribution()
      E               lsst.pex.exceptions.Exception: 
      E                 File "src/KernelSumVisitor.cc", line 130, in void lsst::ip::diffim::detail::KernelSumVisitor<float>::processKsumDistribution() [PixelT = float]
      E                   Unable to determine kernel sum; 0 candidates {0}
      E               lsst::pex::exceptions::Exception: 'Unable to determine kernel sum; 0 candidates'
       
      python/lsst/ip/diffim/psfMatch.py:948: Exception
      ------------------------------------------------------------------------------------- Captured log call -------------------------------------------------------------------------------------
      DEBUG    lsst.psfMatch.background:subtractBackground.py:255 Ignoring mask planes: BAD, EDGE, DETECTED, DETECTED_NEGATIVE, NO_DATA
      WARNING  lsst.psfMatch.background:subtractBackground.py:291 Too few points in grid to constrain fit: min(nx, ny) < approxOrder) [min(2, 2) < 6]
      WARNING  lsst.psfMatch.background:subtractBackground.py:301 Reducing approxOrder to 1
      DEBUG    timer.lsst.psfMatch.selectDetection:imagePsfMatch.py:806 runStartCpuTime=2.384572; runStartUserTime=1.994697; runStartSystemTime=0.389868; runStartMaxResidentSetSize=298434560; runStartMinorPageFaults=29968; runStartMajorPageFaults=20; runStartBlockInputs=0; runStartBlockOutputs=0; runStartVoluntaryContextSwitches=12; runStartInvoluntaryContextSwitches=877
      DEBUG    timer.lsst.psfMatch.selectDetection:detection.py:250 detectFootprintsStartCpuTime=2.384666; detectFootprintsStartUserTime=1.994788; detectFootprintsStartSystemTime=0.389877; detectFootprintsStartMaxResidentSetSize=298434560; detectFootprintsStartMinorPageFaults=29969; detectFootprintsStartMajorPageFaults=20; detectFootprintsStartBlockInputs=0; detectFootprintsStartBlockOutputs=0; detectFootprintsStartVoluntaryContextSwitches=12; detectFootprintsStartInvoluntaryContextSwitches=877
      DEBUG    lsst.psfMatch.selectDetection:detection.py:808 Detection threshold: VALUE value=1.4620134 (positive)
      DEBUG    lsst.psfMatch.selectDetection.tempLocalBackground:subtractBackground.py:255 Ignoring mask planes: BAD, EDGE, DETECTED, DETECTED_NEGATIVE, NO_DATA
      DEBUG    lsst.psfMatch.selectDetection:detection.py:808 Detection threshold: VALUE value=1.4879407 (positive)
      INFO     lsst.psfMatch.selectDetection:detection.py:586 Detected 20 positive peaks in 14 footprints to 10 sigma
      DEBUG    timer.lsst.psfMatch.selectDetection:detection.py:250 detectFootprintsEndCpuTime=2.392042; detectFootprintsEndUserTime=2.00193; detectFootprintsEndSystemTime=0.390109; detectFootprintsEndMaxResidentSetSize=298909696; detectFootprintsEndMinorPageFaults=30018; detectFootprintsEndMajorPageFaults=20; detectFootprintsEndBlockInputs=0; detectFootprintsEndBlockOutputs=0; detectFootprintsEndVoluntaryContextSwitches=12; detectFootprintsEndInvoluntaryContextSwitches=880
      DEBUG    timer.lsst.psfMatch.selectDetection:imagePsfMatch.py:806 runEndCpuTime=2.392137; runEndUserTime=2.002021; runEndSystemTime=0.39011399999999996; runEndMaxResidentSetSize=298909696; runEndMinorPageFaults=30018; runEndMajorPageFaults=20; runEndBlockInputs=0; runEndBlockOutputs=0; runEndVoluntaryContextSwitches=12; runEndInvoluntaryContextSwitches=880
      DEBUG    timer.lsst.psfMatch.selectMeasurement:imagePsfMatch.py:813 runStartCpuTime=2.392198; runStartUserTime=2.002082; runStartSystemTime=0.390115; runStartMaxResidentSetSize=298909696; runStartMinorPageFaults=30018; runStartMajorPageFaults=20; runStartBlockInputs=0; runStartBlockOutputs=0; runStartVoluntaryContextSwitches=12; runStartInvoluntaryContextSwitches=880
      DEBUG    lsst.psfMatch.selectMeasurement:noiseReplacer.py:169 Mask plane "THISDET": plane 9, bitmask 512 = 0x200
      DEBUG    lsst.psfMatch.selectMeasurement:noiseReplacer.py:169 Mask plane "OTHERDET": plane 10, bitmask 1024 = 0x400
      DEBUG    lsst.psfMatch.selectMeasurement:noiseReplacer.py:370 Measured from image: clipped mean = -5.0545e-05, stdev = 0.999856
      DEBUG    lsst.psfMatch.selectMeasurement:noiseReplacer.py:200 Using noise generator: FixedGaussianNoiseGenerator: mean=-5.0545e-05, std=0.999856
      INFO     lsst.psfMatch.selectMeasurement:sfm.py:298 Measuring 14 sources (14 parents, 0 children) 
      DEBUG    lsst.psfMatch.selectMeasurement.base_SdssCentroid:baseMeasurement.py:371 MeasurementError in base_SdssCentroid.measure on record 1: 
        File "src/SdssCentroid.cc", line 385, in std::pair<MaskedImageT, double> lsst::meas::base::(anonymous namespace)::smoothAndBinImage(std::shared_ptr<const afw::detection::Psf>, const int, const int, const MaskedImageT &, int, int, lsst::meas::base::FlagHandler) [MaskedImageT = lsst::afw::image::MaskedImage<float>]
          Object too close to edge {0}
      lsst::meas::base::MeasurementError: 'Object too close to edge'
       
      DEBUG    timer.lsst.psfMatch.selectMeasurement:imagePsfMatch.py:813 runEndCpuTime=2.427935; runEndUserTime=2.037612; runEndSystemTime=0.39032; runEndMaxResidentSetSize=299384832; runEndMinorPageFaults=30052; runEndMajorPageFaults=20; runEndBlockInputs=0; runEndBlockOutputs=0; runEndVoluntaryContextSwitches=12; runEndInvoluntaryContextSwitches=880
      DEBUG    lsst.psfMatch.background:subtractBackground.py:255 Ignoring mask planes: BAD, EDGE, DETECTED, DETECTED_NEGATIVE, NO_DATA
      WARNING  lsst.psfMatch.background:subtractBackground.py:291 Too few points in grid to constrain fit: min(nx, ny) < approxOrder) [min(2, 2) < 6]
      WARNING  lsst.psfMatch.background:subtractBackground.py:301 Reducing approxOrder to 1
      DEBUG    timer.lsst.psfMatch.selectDetection:imagePsfMatch.py:806 runStartCpuTime=2.454331; runStartUserTime=2.06373; runStartSystemTime=0.390596; runStartMaxResidentSetSize=300924928; runStartMinorPageFaults=30182; runStartMajorPageFaults=20; runStartBlockInputs=0; runStartBlockOutputs=0; runStartVoluntaryContextSwitches=12; runStartInvoluntaryContextSwitches=880
      DEBUG    timer.lsst.psfMatch.selectDetection:detection.py:250 detectFootprintsStartCpuTime=2.454405; detectFootprintsStartUserTime=2.0638009999999998; detectFootprintsStartSystemTime=0.390602; detectFootprintsStartMaxResidentSetSize=300941312; detectFootprintsStartMinorPageFaults=30183; detectFootprintsStartMajorPageFaults=20; detectFootprintsStartBlockInputs=0; detectFootprintsStartBlockOutputs=0; detectFootprintsStartVoluntaryContextSwitches=12; detectFootprintsStartInvoluntaryContextSwitches=880
      DEBUG    lsst.psfMatch.selectDetection:detection.py:808 Detection threshold: VALUE value=1.0181538 (positive)
      DEBUG    lsst.psfMatch.selectDetection.tempLocalBackground:subtractBackground.py:255 Ignoring mask planes: BAD, EDGE, DETECTED, DETECTED_NEGATIVE, NO_DATA
      DEBUG    lsst.psfMatch.selectDetection:detection.py:808 Detection threshold: VALUE value=1.1213353 (positive)
      INFO     lsst.psfMatch.selectDetection:detection.py:586 Detected 18 positive peaks in 12 footprints to 10 sigma
      DEBUG    timer.lsst.psfMatch.selectDetection:detection.py:250 detectFootprintsEndCpuTime=2.462878; detectFootprintsEndUserTime=2.072146; detectFootprintsEndSystemTime=0.39072999999999997; detectFootprintsEndMaxResidentSetSize=301694976; detectFootprintsEndMinorPageFaults=30238; detectFootprintsEndMajorPageFaults=20; detectFootprintsEndBlockInputs=0; detectFootprintsEndBlockOutputs=0; detectFootprintsEndVoluntaryContextSwitches=12; detectFootprintsEndInvoluntaryContextSwitches=880
      DEBUG    timer.lsst.psfMatch.selectDetection:imagePsfMatch.py:806 runEndCpuTime=2.462965; runEndUserTime=2.072231; runEndSystemTime=0.39073199999999997; runEndMaxResidentSetSize=301694976; runEndMinorPageFaults=30238; runEndMajorPageFaults=20; runEndBlockInputs=0; runEndBlockOutputs=0; runEndVoluntaryContextSwitches=12; runEndInvoluntaryContextSwitches=880
      DEBUG    timer.lsst.psfMatch.selectMeasurement:imagePsfMatch.py:813 runStartCpuTime=2.463024; runStartUserTime=2.07229; runStartSystemTime=0.390733; runStartMaxResidentSetSize=301694976; runStartMinorPageFaults=30238; runStartMajorPageFaults=20; runStartBlockInputs=0; runStartBlockOutputs=0; runStartVoluntaryContextSwitches=12; runStartInvoluntaryContextSwitches=880
      DEBUG    lsst.psfMatch.selectMeasurement:noiseReplacer.py:169 Mask plane "THISDET": plane 9, bitmask 512 = 0x200
      DEBUG    lsst.psfMatch.selectMeasurement:noiseReplacer.py:169 Mask plane "OTHERDET": plane 10, bitmask 1024 = 0x400
      DEBUG    lsst.psfMatch.selectMeasurement:noiseReplacer.py:370 Measured from image: clipped mean = -0.000105243, stdev = 1.00975
      DEBUG    lsst.psfMatch.selectMeasurement:noiseReplacer.py:200 Using noise generator: FixedGaussianNoiseGenerator: mean=-0.000105243, std=1.00975
      INFO     lsst.psfMatch.selectMeasurement:sfm.py:298 Measuring 12 sources (12 parents, 0 children) 
      DEBUG    timer.lsst.psfMatch.selectMeasurement:imagePsfMatch.py:813 runEndCpuTime=2.475278; runEndUserTime=2.084471; runEndSystemTime=0.390804; runEndMaxResidentSetSize=301711360; runEndMinorPageFaults=30239; runEndMajorPageFaults=20; runEndBlockInputs=0; runEndBlockOutputs=0; runEndVoluntaryContextSwitches=12; runEndInvoluntaryContextSwitches=880
      INFO     lsst.alardLuptonSubtract:subtractImages.py:486 template has 57600 good pixels (100.0%)
      DEBUG    lsst.ip.diffim.generateAlardLuptonBasisList:makeKernelBasisList.py:205 Generating matching bases for sigma 3.00 pix -> 2.00 pix
      DEBUG    lsst.ip.diffim.generateAlardLuptonBasisList:makeKernelBasisList.py:264 Target psf fwhm is the greater, deconvolution mode
      DEBUG    lsst.ip.diffim.generateAlardLuptonBasisList:makeKernelBasisList.py:313 basisSigmaGauss: 1.6,2.5,4.6 basisDegGauss: 3,3,3
      INFO     lsst.alardLuptonSubtract.makeKernel:makeKernel.py:329 Target psf fwhm is the greater, deconvolution mode
      INFO     lsst.alardLuptonSubtract.makeKernel:diffimTools.py:426 Growing 14 kernel candidate stars by 27 pixels
      INFO     lsst.alardLuptonSubtract.makeKernel:diffimTools.py:472 Selected 8 / 14 sources for KernelCandidacy
      INFO     lsst.alardLuptonSubtract:subtractImages.py:213 Science PSF size: 4.709595
      INFO     lsst.alardLuptonSubtract:subtractImages.py:214 Template PSF size: 7.064388
      INFO     lsst.alardLuptonSubtract:subtractImages.py:226 `convolveScience` is set: convolving science image.
      DEBUG    lsst.alardLuptonSubtract.makeKernel:makeKernel.py:378 Candidate 1 at 12463.579102, 67930.898438
      DEBUG    lsst.alardLuptonSubtract.makeKernel:makeKernel.py:378 Candidate 2 at 12489.073242, 67934.562500
      DEBUG    lsst.alardLuptonSubtract.makeKernel:makeKernel.py:378 Candidate 3 at 12396.318359, 67954.250000
      DEBUG    lsst.alardLuptonSubtract.makeKernel:makeKernel.py:378 Candidate 4 at 12443.049805, 67961.398438
      DEBUG    lsst.alardLuptonSubtract.makeKernel:makeKernel.py:378 Candidate 5 at 12411.178711, 67992.562500
      DEBUG    lsst.alardLuptonSubtract.makeKernel:makeKernel.py:378 Candidate 6 at 12466.421875, 68013.226562
      DEBUG    lsst.alardLuptonSubtract.makeKernel:makeKernel.py:378 Candidate 7 at 12435.289062, 68023.171875
      DEBUG    lsst.alardLuptonSubtract.makeKernel:makeKernel.py:378 Candidate 8 at 12388.328125, 68036.453125
      DEBUG    lsst.ip.diffim.generateAlardLuptonBasisList:makeKernelBasisList.py:205 Generating matching bases for sigma 2.00 pix -> 3.00 pix
      DEBUG    lsst.ip.diffim.generateAlardLuptonBasisList:makeKernelBasisList.py:227 Reference psf fwhm is the greater, normal convolution mode
      DEBUG    lsst.ip.diffim.generateAlardLuptonBasisList:makeKernelBasisList.py:313 basisSigmaGauss: 1.1,2.2,4.5 basisDegGauss: 4,2,2
      INFO     lsst.alardLuptonSubtract.makeKernel:makeKernel.py:327 Reference psf fwhm is the greater, normal convolution mode
      DEBUG    timer.lsst.alardLuptonSubtract.makeKernel:makeKernel.py:128 _solveStartCpuTime=2.530971; _solveStartUserTime=2.139767; _solveStartSystemTime=0.3912; _solveStartMaxResidentSetSize=303185920; _solveStartMinorPageFaults=30335; _solveStartMajorPageFaults=20; _solveStartBlockInputs=0; _solveStartBlockOutputs=0; _solveStartVoluntaryContextSwitches=12; _solveStartInvoluntaryContextSwitches=880
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:936 Building single kernels...
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:939 Iteration 0, rejected 0 candidates due to initial kernel fit
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:953 Iteration 0, rejected 2 candidates due to kernel sum
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:936 Building single kernels...
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:939 Iteration 0, rejected 0 candidates due to initial kernel fit
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:953 Iteration 0, rejected 0 candidates due to kernel sum
      DEBUG    TRACE2.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:997 Spatial kernel built with 4 candidates
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:1005 Iteration 0, rejected 4 candidates due to spatial kernel fit
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:1009 0 candidates used in fit
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:936 Building single kernels...
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:939 Iteration 1, rejected 0 candidates due to initial kernel fit
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:953 Iteration 1, rejected 0 candidates due to kernel sum
      DEBUG    TRACE2.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:997 Spatial kernel built with 2 candidates
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:1005 Iteration 1, rejected 2 candidates due to spatial kernel fit
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:1009 0 candidates used in fit
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:936 Building single kernels...
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:939 Iteration 2, rejected 0 candidates due to initial kernel fit
      ERROR    lsst.alardLuptonSubtract.makeKernel:psfMatch.py:1037 ERROR: Unable to calculate psf matching kernel
      DEBUG    TRACE1.lsst.alardLuptonSubtract.makeKernel._solve:psfMatch.py:1039 
        File "src/KernelSumVisitor.cc", line 130, in void lsst::ip::diffim::detail::KernelSumVisitor<float>::processKsumDistribution() [PixelT = float]
          Unable to determine kernel sum; 0 candidates {0}
      lsst::pex::exceptions::Exception: 'Unable to determine kernel sum; 0 candidates'
       
      DEBUG    timer.lsst.alardLuptonSubtract.makeKernel:makeKernel.py:128 _solveEndCpuTime=2.639458; _solveEndUserTime=2.247661; _solveEndSystemTime=0.391794; _solveEndMaxResidentSetSize=307216384; _solveEndMinorPageFaults=30588; _solveEndMajorPageFaults=20; _solveEndBlockInputs=0; _solveEndBlockOutputs=0; _solveEndVoluntaryContextSwitches=12; _solveEndInvoluntaryContextSwitches=880
      

      Eli Rykoff has determined that this is failing relatively early in determining the background values from https://github.com/lsst/ip_diffim/blob/ece46ecc3387e67bbf2a93f7fd24be2204ac7eb3/src/AssessSpatialKernelVisitor.cc#L103

        Attachments

          Issue Links

            Activity

            Hide
            sullivan Ian Sullivan added a comment -

            Further testing indicated that this was not coming from NaNs in the images, but was instead from the image size used in the tests. With 400x400 pixel test images all the tests pass, but with 200x200 pixel test images the tests pass on Linux and Intel Mac, but fail as reported above on a new ARM Mac.

            Show
            sullivan Ian Sullivan added a comment - Further testing indicated that this was not coming from NaNs in the images, but was instead from the image size used in the tests. With 400x400 pixel test images all the tests pass, but with 200x200 pixel test images the tests pass on Linux and Intel Mac, but fail as reported above on a new ARM Mac.
            Hide
            sullivan Ian Sullivan added a comment -

            This one-line change should fix the tests that are failing on ARM machines, but does not address the underlying bug. I have filed DM-35081 with details from the Slack thread for investigating and difference in KernelSolution.cc

            Jenkins with this change:
            https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/36747/pipeline/

            Show
            sullivan Ian Sullivan added a comment - This one-line change should fix the tests that are failing on ARM machines, but does not address the underlying bug. I have filed DM-35081 with details from the Slack thread for investigating and difference in KernelSolution.cc Jenkins with this change: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/36747/pipeline/
            Hide
            tjenness Tim Jenness added a comment -

            This fix works for me. Thanks.

            Show
            tjenness Tim Jenness added a comment - This fix works for me. Thanks.

              People

              Assignee:
              sullivan Ian Sullivan
              Reporter:
              tjenness Tim Jenness
              Reviewers:
              Tim Jenness
              Watchers:
              Eli Rykoff, Ian Sullivan, Nate Lust, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.