Skip to content

Commit

Permalink
Merge branch 'feature/6651_calibrate_ef' into develop
Browse files Browse the repository at this point in the history
refs #6651

Conflicts:
	Code/Mantid/Framework/Algorithms/src/CalibrateToElasticLine.cpp
  • Loading branch information
stuartcampbell committed Mar 4, 2013
2 parents b59f6f1 + a8231b6 commit 1f4465d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Code/Mantid/Framework/Algorithms/src/CalibrateToElasticLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ namespace Algorithms
Geometry::ParameterMap& pmap = outputWS->instrumentParameters();

// Get the number of spectra
const std::size_t numberOfChannels = inputWS->blocksize();
//const std::size_t numberOfChannels = inputWS->blocksize();
//const int numberOfSpectra = static_cast<int>(inputWS->size() / numberOfChannels);


Expand Down Expand Up @@ -189,6 +189,9 @@ namespace Algorithms
Geometry::IDetector_const_sptr det = outputWS->getDetectorByID(detectorId[i]);
if (!det->isMonitor())
{
// TODO: what to do if detector pixel is masked (or doesn't exist)


// Get secondary flight path (L2)
double l2 = det->getDistance(*sample);
// Get scattering angle (radians)
Expand All @@ -201,14 +204,13 @@ namespace Algorithms
/ (PhysicalConstants::meV * 1e-12);
double energy = factor / (peakCentre[i]*peakCentre[i]);

g_log.warning() << "det(" << i << ") = " << det->getFullName() << std::endl;
g_log.warning() << " Ef = " << det->getNumberParameter("Efixed").at(0) << std::endl;
g_log.debug() << "Updating Ef for Detector id from " << detectorId[i]
<< det->getNumberParameter("Efixed").at(0) << " -> "
<< energy << "." << std::endl;

// Update the detector with the new Efixed.
pmap.addDouble(det.get(), "Efixed", energy);

g_log.warning() << " Ef = " << det->getNumberParameter("Efixed").at(0) << std::endl;


}
}

Expand Down

0 comments on commit 1f4465d

Please sign in to comment.