Causes of measurement error: 'Quadrupole matrix cannot have negative determinant'

Hi,

At both the processCcd stage and later measureCoaddSources I am getting a ‘Quadrupole matrix cannot have negative determinant.’ error (full traceback below). For the later stages the throwing of this error depends on config parameters for the detection stage. Can anyone suggest likely problems that would cause this error? Is it likely a problem with the detection catalogues produced or configuration for the measurement?

For reference I am trying to process VISTA NIR imaging with the stack using:

Many thanks,

Raphael.

Full traceback:

measureCoaddSources.py data --rerun coaddPhot --id filter=VISTA-Y tract=8524 patch=3,6
root INFO: Loading config overrride file ‘/Users/rs548/GitHub/lsst_stack/stack/miniconda3-py37_4.8.2-1a1d771/DarwinX86/obs_vista/20.0.0-1/config/measureCoaddSources.py’
CameraMapper INFO: Loading exposure registry from /Users/rs548/GitHub/lsst-ir-fusion/dmu4/data/registry.sqlite3
root INFO: Running: /Users/rs548/GitHub/lsst_stack/stack/miniconda3-py37_4.8.2-1a1d771/DarwinX86/pipe_tasks/20.0.0/bin/measureCoaddSources.py data --rerun coaddPhot --id filter=VISTA-Y tract=8524 patch=3,6
measureCoaddSources INFO: Read 44249 detections: DataId(initialdata={‘filter’: ‘VISTA-Y’, ‘tract’: 8524, ‘patch’: ‘3,6’}, tag=set())
measureCoaddSources.measurement INFO: Measuring 44249 sources (10204 parents, 34045 children)
measureCoaddSources FATAL: Failed on dataId=DataId(initialdata={‘filter’: ‘VISTA-Y’, ‘tract’: 8524, ‘patch’: ‘3,6’}, tag=set()): InvalidParameterError:
File “src/geom/ellipses/Quadrupole.cc”, line 45, in virtual void lsst::afw::geom::ellipses::Quadrupole::normalize()
Quadrupole matrix cannot have negative determinant. {0}
lsst::pex::exceptions::InvalidParameterError: ‘Quadrupole matrix cannot have negative determinant.’

Traceback (most recent call last):
File “/Users/rs548/GitHub/lsst_stack/stack/miniconda3-py37_4.8.2-1a1d771/DarwinX86/pipe_base/20.0.0/python/lsst/pipe/base/cmdLineTask.py”, line 388, in call
result = self.runTask(task, dataRef, kwargs)
File “/Users/rs548/GitHub/lsst_stack/stack/miniconda3-py37_4.8.2-1a1d771/DarwinX86/pipe_base/20.0.0/python/lsst/pipe/base/cmdLineTask.py”, line 447, in runTask
return task.runDataRef(dataRef, **kwargs)
File “/Users/rs548/GitHub/lsst_stack/stack/miniconda3-py37_4.8.2-1a1d771/DarwinX86/pipe_tasks/20.0.0/python/lsst/pipe/tasks/multiBand.py”, line 1033, in runDataRef
exposureId=self.getExposureId(patchRef))
File “/Users/rs548/GitHub/lsst_stack/stack/miniconda3-py37_4.8.2-1a1d771/DarwinX86/pipe_tasks/20.0.0/python/lsst/pipe/tasks/multiBand.py”, line 1078, in run
self.measurement.run(sources, exposure, exposureId=exposureId)
File “/Users/rs548/GitHub/lsst_stack/stack/miniconda3-py37_4.8.2-1a1d771/DarwinX86/pipe_base/20.0.0/python/lsst/pipe/base/timer.py”, line 150, in wrapper
res = func(self, *args, **keyArgs)
File “/Users/rs548/GitHub/lsst_stack/stack/miniconda3-py37_4.8.2-1a1d771/DarwinX86/meas_base/20.0.0/python/lsst/meas/base/sfm.py”, line 258, in run
self.runPlugins(noiseReplacer, measCat, exposure, beginOrder, endOrder)
File “/Users/rs548/GitHub/lsst_stack/stack/miniconda3-py37_4.8.2-1a1d771/DarwinX86/meas_base/20.0.0/python/lsst/meas/base/sfm.py”, line 306, in runPlugins
self.blendPlugin.cpp.measureChildPixels(exposure.getMaskedImage(), measChildRecord)
lsst.pex.exceptions.wrappers.InvalidParameterError:
File “src/geom/ellipses/Quadrupole.cc”, line 45, in virtual void lsst::afw::geom::ellipses::Quadrupole::normalize()
Quadrupole matrix cannot have negative determinant. {0}
lsst::pex::exceptions::InvalidParameterError: ‘Quadrupole matrix cannot have negative determinant.’

This seems to arise from it trying to use the “base_Blendedness” measurement plugin.

I’m not well-placed to know what “blendedness” does nor why you’re getting this specific error (I’d be interested in knowing this myself), but if it’s just a case of getting the stack working, then you could try just turning off that plugin (see the obs_goto config files - we’ve switched off most plugins in the interest of speed).

You may find that you’re not much interested in blendedness anyway.

1 Like

Hi @raphaelshirley, I was just reviewing some older Support posts and was wondering if @jrmullaney’s suggestion was helpful, and/or if you were able to resolve this issue?

Hi, Yes switching off the base_Blendedness measurement certainly fixed the error. As far as I am aware turning it off hasn’t had any negative consequences.

1 Like