I often want to know who set a configuration parameter. If you just want to know its value then --show config is your friend (you’ll need backslashes \ if you still use [t]csh):
$ runFoo --show config=*apFlux* ...
config.calibrate.initialMeasurement.slots.apFlux='base_CircularApertureFlux_3_0'
config.calibrate.measurement.slots.apFlux='base_CircularApertureFlux_3_0'
config.measurement.slots.apFlux='base_CircularApertureFlux_2'
But if you want to know where it’s set I don’t know a better way than:
-
Create a file “foo.py” containing
import lsst.pex.config.history as pcHist
import pdb
pdb.set_trace() -
Say
runFoo -C foo.py ...
-
At the pdb prompt type
(pdb) print pcHist.format(root.measurement.slots, ‘apFlux’)
measurement.slots.apFlux
base_CircularApertureFlux_3_0 /Users/rhl/LSST/processFile/bin/processFile.py:324 config = ProcessFileConfig()
/Users/rhl/LSST/processFile/bin/processFile.py:82 doc=SingleFrameMeasurementTask.ConfigClass.doc)
meas/base/baseMeasurement.py:191 doc="Mapping from algorithms to special aliases in Source."
meas/base/baseMeasurement.py:159 doc=“the name of the algorithm used to set the source aperture flux slot”)
base_CircularApertureFlux_2 /Users/rhl/LSST/processFile/bin/processFile.py:335 args = parser.parse_args(namespace=args)
pex/config/config.py:533 execfile(filename, {}, local)
ptfConfig.py:10 root.measurement.slots.apFlux = ‘base_CircularApertureFlux_2’
which (in this case) tells me that I set the offending value in ptfConfig.py line 10