[LSST|dm-users 620] Re: Error when Running Chris Walter's: Introduction to the DM AFW packages ipython notebook

Jim Bosch jbosch at astro.princeton.edu
Thu May 7 14:13:37 PDT 2015


On Thu, May 7, 2015 at 4:35 PM, Will Dawson <will at dawsonresearch.com> wrote:

> Dominique,
>
> Thank you for translating the error. The problem then seems to be with an
> inconsistent DM functions default parameter settings. From the notebook the
> schema and measurement configuration is set by
>
> schema = lsst.afw.table.SourceTable.makeMinimalSchema()
> measureSourcesConfig  = lsst.meas.algorithms.SourceMeasurementConfig()
>
> So it appears that makeMinimialSchema() and SourceMeasurementConfig() need
> to be made compatible (perhaps is has been in v10_1). Should I be using
> v10_1 instead of v10_0?
>
>
> Try replacing

lsst.meas.algorithms.SourceMeasurement[Config/Task]

with

lsst.meas.base.SingleFrameMeasurement[Config/Task]

throughout the example.

That may just solve the problem.  SourceMeasurementTask is deprecated in
favor of SingleFrameMeasurementTask, and some of the other code now expects
that you're using SingleFrameMeasurementTask unless you set some other
configuration options stating that you're using the old one.


Jim




> Yes, the schema has changed in the latest stack versions and
> "flux.sinc_flux" is not any more in the source table schema. Something
> directly replacing sinc_flux was present  in the v10_0 but this has been
> completely replaced in the latest stack_v10_1. There are now 10 Aperture
> flux corresponding to 10 different radii.
>
> You can have a look to
> http://nbviewer.ipython.org/github/DarkEnergyScienceCollaboration/CFHTLS-Reprocess/tree/master/notebooks/
> to get notebook examples with the most recent stack.
>
> I can have a look to Chris' notebooks if you wish.
>
> Best,
>
> Dominique
>
> On 05/07/2015 11:52 AM, Will Dawson wrote:
>
> I encountered an error when running Chris Walter’s Introduction to the DM
> AFW packages
> <http://nbviewer.ipython.org/github/DarkEnergyScienceCollaboration/DataManagementWorkbook/blob/master/Basic%20DM%20AFW%20Introduction.ipynb> ipython
> notebook. In the second to last step when I run the command:
>
>  # Apply the measurement routines to the exposure using the sources as
> input
> measure.run(exposure, sources)
>
>  I get the following error:
>
>  ---------------------------------------------------------------------------NotFoundError                             Traceback (most recent call last)<ipython-input-19-77c6eca8bda0> in <module>()     16      17 # Apply the measurement routines to the exposure using the sources as input---> 18 measure.run(exposure, sources)     19      20 # Now let's look at the output from some of the measurment algorithms.
> /Users/dawson/lsst/DarwinX86/pipe_base/10.0+2/python/lsst/pipe/base/timer.pyc in wrapper(self, *args, **keyArgs)    116         logInfo(obj = self, prefix = func.__name__ + "Start")    117         try:--> 118             res = func(self, *args, **keyArgs)    119         finally:    120             logInfo(obj = self, prefix = func.__name__ + "End")
> /Users/dawson/lsst/DarwinX86/meas_algorithms/10.0+2/python/lsst/meas/algorithms/measurement.pyc in measure(self, exposure, sources, noiseImage, noiseMeanVar, references, refWcs)    422     423         self.log.info("Measuring %d sources" % len(sources))--> 424         self.config.slots.setupTable(sources.table, prefix=self.config.prefix)    425     426         self.preMeasureHook(exposure, sources)
> /Users/dawson/lsst/DarwinX86/meas_algorithms/10.0+2/python/lsst/meas/algorithms/measurement.pyc in setupTable(self, table, prefix)     57         if self.centroid is not None: table.defineCentroid(prefix + self.centroid)     58         if self.shape is not None: table.defineShape(prefix + self.shape)---> 59         if self.apFlux is not None: table.defineApFlux(prefix + self.apFlux)     60         if self.modelFlux is not None: table.defineModelFlux(prefix + self.modelFlux)     61         if self.psfFlux is not None: table.definePsfFlux(prefix + self.psfFlux)
> /Users/dawson/lsst/DarwinX86/afw/10.0+3/python/lsst/afw/table/tableLib.pyc in defineApFlux(self, *args)   9869     def defineApFlux(self, *args):   9870         """defineApFlux(SourceTable self, std::string const & name)"""-> 9871         return _tableLib.SourceTable_defineApFlux(self, *args)   9872    9873     def getApFluxDefinition(self):
> NotFoundError:
>   File "src/table/Schema.cc <http://schema.cc/>", line 239, in SchemaItem<T> lsst::afw::table::detail::SchemaImpl::find(const std::string &) const [T = double]
>     Field or subfield withname 'flux.sinc_flux' not found with type 'D'. {0}
> lsst::pex::exceptions::NotFoundError: 'Field or subfield withname 'flux.sinc_flux' not found with type 'D'.'
>
>
>  Perhaps this is related to the fact that the notebook was written in
> 2013 and I am using v10.0 of the stack. As I am new to the stack, and given
> the surprisingly complex error message for such a seemingly simple command,
> I am hoping that the experts can shed some light on the matter.
>
>  Thanks,
> Will Dawson
>
>
>
>
>
> _______________________________________________
> dm-users mailing listdm-users at lists.lsst.orghttps://lists.lsst.org/mailman/listinfo/dm-users
>
>
> --
> Dominique Boutigny  -  CNRS / CC-IN2P3
> Now at SLAC National Accelerator Laboratory
>
> Kavli Building - Room 221
> Mail     : boutigny at in2p3.fr -  boutigny at slac.stanford.edu
> Office   : +1 650-926-5759   -  Cellular : +1 774-232-0912
>
>  _______________________________________________
> dm-users mailing list
> dm-users at lists.lsst.org
> https://lists.lsst.org/mailman/listinfo/dm-users
>
>
>
> _______________________________________________
> dm-users mailing list
> dm-users at lists.lsst.org
> https://lists.lsst.org/mailman/listinfo/dm-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lsst.org/pipermail/dm-users/attachments/20150507/a9a337a2/attachment.html>


More information about the dm-users mailing list