-
Type:
Story
-
Status: Done (View Workflow)
-
Priority:
Normal
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
The findAndTraceApertures function consumes a lot of time in constructFiberFlat.py and constructFiberTrace.py. I ran a profile on it, and found the following under the call graph:
32.7 ......... 309.79 / 320.70 pfs::drp::stella::FiberTraceSet<float, int, float> pfs::drp::stella::math::findAndTraceApertures<float, int, float>(lsst::afw::image::MaskedImage<float, int, float> const&, pfs::drp::stella::DetectorMap const&, pfs::drp::stella::FiberTraceFindingControl const&, pfs::drp::stella::FiberTraceFunctionControl const&, pfs::drp::stella::FiberTraceProfileFittingControl const&) [123]
[124] 32.7 309.79 62.12 / 247.66 pfs::drp::stella::math::FindCenterPositionsOneTraceResult pfs::drp::stella::math::findCenterPositionsOneTrace<float, float>(lsst::afw::image::Image<float>&, lsst::afw::image::Image<float> const&, pfs::drp::stella::FiberTraceFindingControl const&, lsst::geom::Point<int, 2> const&)
16.1 ......... 153.05 / 153.05 std::_Rb_tree_increment(std::_Rb_tree_node_base const*) [154]
6.3 ......... 59.61 / 59.62 ndarray::ArrayBase<ndarray::Array<float, 2, 1> >::end() const [208]
1.2 ......... 11.60 / 34.37 boost::intrusive_ptr<ndarray::detail::Core<1> const>::~intrusive_ptr() [215]
I think there's some low-hanging fruit for making this go faster.