Ticket #643 (closed: duplicate)

Opened 11 years ago

Last modified 5 years ago

MantidPlot: No easy way of viewing which detectors contribute to a spectrum if > 1

Reported by: Russell Taylor Owned by:
Priority: minor Milestone: Iteration 18
Component: Keywords:
Cc: Blocked By:
Blocking: Tester:

Description

The "copy detectors to table" output gives no indication that a spectrum has more that one detector (a DetectorGroup) contributing to it. The detector ID given is just that of the first detector in the group. It would be useful to have a way of getting at the full list of IDs.

Options: Does IDetector::getID() have to return an int, or could it be a string containing more information. Or perhaps we should add another method to IDetector for this.

Here are all the places getID is used:

Algorithms/src/CreateCalFileByNames.cpp: instrcalib[currentDet->getID()]=std::make_pair<int,int>(number++,top_group); Algorithms/src/CreateCalFileByNames.cpp: instrcalib[number++]=std::make_pair<int,int>(currentDet->getID(),top_group);

API/src/Instrument.cpp: if ( !_detectorCache.insert( std::map<int, Geometry::IDetector*>::value_type(det->getID(), det) ).second ) API/src/Instrument.cpp: convert << det->getID(); DataHandling/src/FindDetectorsInShape.cpp: g_log.debug()<<"Detector contained in shape " << detector_sptr->getID() << std::endl; DataHandling/src/FindDetectorsInShape.cpp: foundDets.push_back(detector_sptr->getID()); DataHandling/src/LoadInstrument.cpp: convert << detector->getID(); DataHandling/src/MoveInstrumentComponent.cpp: if (det && det->getID() == id) return comp; DataHandling/src/SetScalingPSD.cpp: if (det) idet=det->getID(); Geometry/src/Detector.cpp:int Detector::getID() const Geometry/src/DetectorGroup.cpp: g_log.warning() << "Adding a detector (ID:" << det->getID() << ") that is flagged as masked." << std::endl; Geometry/src/DetectorGroup.cpp: if ( m_detectors.empty() ) m_id = det->getID(); Geometry/src/DetectorGroup.cpp: if ( m_detectors.insert( DetCollection::value_type(det->getID(), det) ).second ) Geometry/src/DetectorGroup.cpp: g_log.debug() << "Detector with ID " << det->getID() << " added to group." << std::endl; Geometry/src/DetectorGroup.cpp: g_log.warning() << "Detector with ID " << det->getID() << " is already in group." << std::endl; Geometry/src/DetectorGroup.cpp:int DetectorGroup::getID() const Geometry/src/ParDetector.cpp:int ParDetector::getID() const Geometry/src/ParDetector.cpp: return dynamic_cast<const Detector*>(m_base)->getID(); PythonAPI/src/PythonWrapper.cpp: int getID() const { PythonAPI/src/PythonWrapper.cpp: return call_method< int >(py_self, "getID"); PythonAPI/src/PythonWrapper.cpp: .def("getID", pure_virtual(&Mantid::Geometry::IDetector::getID))

Change History

comment:1 Changed 11 years ago by Russell Taylor

  • Status changed from new to closed
  • Resolution set to duplicate

comment:2 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 1491

Note: See TracTickets for help on using tickets.