Commit b3570e3e authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony
Browse files

Fix a few more algorithms tests. Re #3008

parent 5af72081
......@@ -90,7 +90,7 @@ namespace Algorithms
/// The input workspace
API::MatrixWorkspace_sptr m_input_ws;
/// The calculated position of the first peak
std::pair<int64_t, double> m_peak1_pos;
std::pair<size_t, double> m_peak1_pos;
/// True if the Ei should be fixed at the guess energy
bool m_fixedei;
/// Conversion factor between time and energy
......
......@@ -216,12 +216,12 @@ void CalculateEfficiency::normalizeDetectors(MatrixWorkspace_sptr rebinnedWS,
{
// First we mask detectors in the output workspace
mask->setProperty<MatrixWorkspace_sptr>("Workspace", outputWS);
mask->setProperty< std::vector<int> >("SpectraList", dets_to_mask);
mask->setProperty< std::vector<specid_t> >("SpectraList", dets_to_mask);
mask->execute();
// Then we mask the same detectors in the input workspace
mask->setProperty<MatrixWorkspace_sptr>("Workspace", rebinnedWS);
mask->setProperty< std::vector<int> >("SpectraList", dets_to_mask);
mask->setProperty< std::vector<specid_t> >("SpectraList", dets_to_mask);
mask->execute();
} catch (std::invalid_argument& err)
{
......
......@@ -239,7 +239,7 @@ API::MatrixWorkspace_sptr CalculateTransmissionBeamSpreader::extractSpectrum(API
Algorithm_sptr childAlg = createSubAlgorithm("ExtractSingleSpectrum",0.0,0.4);
childAlg->setProperty<MatrixWorkspace_sptr>("InputWorkspace", WS);
childAlg->setProperty<int64_t>("WorkspaceIndex", index);
childAlg->setProperty<int>("WorkspaceIndex", index);
childAlg->executeAsSubAlg();
return childAlg->getProperty("OutputWorkspace");
}
......
......@@ -60,7 +60,7 @@ namespace Mantid
declareProperty("OutputFile","",
"A filename to which to write the list of dead detector UDETs" );
// This output property will contain the list of UDETs for the dead detectors
declareProperty("FoundDead",std::vector<int64_t>(),Direction::Output);
declareProperty("FoundDead",std::vector<detid_t>(),Direction::Output);
}
/** Executes the algorithm
......@@ -84,7 +84,7 @@ namespace Mantid
const SpectraDetectorMap& specMap = integratedWorkspace->spectraMap();
Axis* specAxis = integratedWorkspace->getAxis(1);
std::vector<int64_t> deadDets;
std::vector<detid_t> deadDets;
int countSpec = 0, countDets = 0;
......
......@@ -147,7 +147,7 @@ namespace Mantid
throw ;
}
fit_alg->setProperty("InputWorkspace",inputW);
fit_alg->setProperty("WorkspaceIndex",s);
fit_alg->setProperty<int>("WorkspaceIndex",s);
fit_alg->setProperty("StartX",Xmin);
fit_alg->setProperty("EndX",Xmax);
fit_alg->setProperty("MaxIterations",100);
......
......@@ -86,8 +86,8 @@ void GetEi::init()
void GetEi::exec()
{
MatrixWorkspace_const_sptr inWS = getProperty("InputWorkspace");
const int64_t mon1Spec = getProperty("Monitor1Spec");
const int64_t mon2Spec = getProperty("Monitor2Spec");
const specid_t mon1Spec = getProperty("Monitor1Spec");
const specid_t mon2Spec = getProperty("Monitor2Spec");
double dist2moni0 = -1, dist2moni1 = -1;
getGeometry(inWS, mon1Spec, mon2Spec, dist2moni0, dist2moni1);
......
......@@ -68,7 +68,7 @@ void GetEi2::init()
"EnergyEstimate property.");
declareProperty("IncidentEnergy", -1.0, Direction::Output);
declareProperty("FirstMonitorPeak", -1.0, Direction::Output);
declareProperty("FirstMonitorIndex", 0, Direction::Output);
declareProperty("FirstMonitorIndex", (size_t)0, Direction::Output);
declareProperty("Tzero", EMPTY_DBL(), Direction::Output);
}
......@@ -106,8 +106,8 @@ void GetEi2::exec()
*/
double GetEi2::calculateEi(const double initial_guess)
{
const int64_t monitor1_spec = getProperty("Monitor1Spec");
const int64_t monitor2_spec = getProperty("Monitor2Spec");
const specid_t monitor1_spec = getProperty("Monitor1Spec");
const specid_t monitor2_spec = getProperty("Monitor2Spec");
//Covert spectrum numbers to workspace indices
std::vector<specid_t> spec_nums(2, monitor1_spec);
......@@ -234,8 +234,8 @@ MatrixWorkspace_sptr GetEi2::extractSpectrum(int64_t ws_index, const double star
{
IAlgorithm_sptr childAlg = createSubAlgorithm("CropWorkspace");
childAlg->setProperty("InputWorkspace", m_input_ws);
childAlg->setProperty("StartWorkspaceIndex", ws_index);
childAlg->setProperty("EndWorkspaceIndex", ws_index);
childAlg->setProperty<int>("StartWorkspaceIndex", ws_index);
childAlg->setProperty<int>("EndWorkspaceIndex", ws_index);
childAlg->setProperty("XMin", start);
childAlg->setProperty("XMax", end);
childAlg->executeAsSubAlg();
......
......@@ -41,14 +41,14 @@ void MaskDetectors::init()
new WorkspaceProperty<>("Workspace","", Direction::InOut),
"The name of the workspace that will be used as input and\n"
"output for the algorithm" );
declareProperty(new ArrayProperty<int64_t>("SpectraList"),
declareProperty(new ArrayProperty<specid_t>("SpectraList"),
"A comma separated list or array containing a list of spectra to\n"
"mask (DetectorList and WorkspaceIndexList are ignored if this\n"
"is set)" );
declareProperty(new ArrayProperty<int64_t>("DetectorList"),
declareProperty(new ArrayProperty<detid_t>("DetectorList"),
"A comma separated list or array containing a list of detector ID's\n"
"to mask (WorkspaceIndexList is ignored if this is set)" );
declareProperty(new ArrayProperty<int64_t>("WorkspaceIndexList"),
declareProperty(new ArrayProperty<size_t>("WorkspaceIndexList"),
"A comma separated list or array containing the workspace indices\n"
"to mask" );
declareProperty(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment