Skip to content

Commit

Permalink
Changes to Crystal tests. Re #6199
Browse files Browse the repository at this point in the history
  • Loading branch information
mantid-roman committed May 24, 2013
1 parent 009565b commit 0faf3bd
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 12 deletions.
5 changes: 4 additions & 1 deletion Code/Mantid/Framework/API/src/AnalysisDataService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ namespace Mantid
// if workspace is already in the ADS this is equivalent to rename
if ( ! workspace->name().empty() )
{
rename( workspace->name(), name );
if (workspace->name() != name )
{
rename( workspace->name(), name );
}
return;
}
//Attach the new name to the workspace
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Crystal/test/CentroidPeaksTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class CentroidPeaksTest : public CxxTest::TestSuite

// Create the peaks workspace
PeaksWorkspace_sptr pkws(new PeaksWorkspace());
pkws->setName("TOPAZ");
//pkws->setName("TOPAZ");

// Create a single peak on that particular detector
Peak PeakObj(in_ws->getInstrument(),5050,2.,V3D(1,1,1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ class IntegratePeakTimeSlicesTest: public CxxTest::TestSuite
pks->addPeak(peak);

IntegratePeakTimeSlices algP;
wsPtr->setName("InputWorkspace");
pks->setName("PeaksWorkspace");
//wsPtr->setName("InputWorkspace");
//pks->setName("PeaksWorkspace");
try
{
algP.initialize();
Expand Down Expand Up @@ -358,7 +358,7 @@ TotIntensityError 72.7901 90.9626 109.655 125.595 109.655
Peak peak(instP, pixelp->getID(), 6.955836);

PeaksWorkspace_sptr pks(new PeaksWorkspace());
pks->setName("Peaks3");
//pks->setName("Peaks3");
pks->addPeak(peak);

IntegratePeakTimeSlices algP;
Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/Crystal/test/MaskPeaksWorkspaceTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class MaskPeaksWorkspaceTest : public CxxTest::TestSuite

// Create the peaks workspace
PeaksWorkspace_sptr pkws(new PeaksWorkspace());
pkws->setName("TOPAZ");
//pkws->setName("TOPAZ");

// This loads (appends) the peaks
Mantid::DataObjects::Peak PeakObj(inputW->getInstrument(),1000,100.);
Expand Down Expand Up @@ -118,7 +118,7 @@ class MaskPeaksWorkspaceTest : public CxxTest::TestSuite

// Create the peaks workspace
PeaksWorkspace_sptr pkws(new PeaksWorkspace());
pkws->setName("TOPAZ");
//pkws->setName("TOPAZ");

// This loads (appends) the peaks
Mantid::DataObjects::Peak PeakObj(inputW->getInstrument(),1000, 1.);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ class OptimizeCrystalPlacementTest: public CxxTest::TestSuite
loadUB.setProperty("Filename", "ls5637.mat");
loadUB.execute();

peaks->setName("abcd");
//peaks->setName("abcd");

}
void test_basic()
{
OptimizeCrystalPlacement alg;
alg.initialize();
alg.setPropertyValue("PeaksWorkspace", "abcd");
//alg.setPropertyValue("PeaksWorkspace", "abcd");
alg.setProperty("PeaksWorkspace", peaks);
alg.setPropertyValue("ModifiedPeaksWorkspace", "ModPeaks");
alg.setPropertyValue("FitInfoTable", "FitInfoTable");
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Crystal/test/PeakIntegrationTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class PeakIntegrationTest : public CxxTest::TestSuite

// Create the peaks workspace
PeaksWorkspace_sptr pkws(new PeaksWorkspace());
pkws->setName("TOPAZ");
//pkws->setName("TOPAZ");

// Create a single peak on that particular detector
Peak PeakObj(in_ws->getInstrument(),5050,2.,V3D(1,1,1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class SCDCalibratePanelsTest : public CxxTest::TestSuite
alg= AlgorithmFactory::Instance().create("SCDCalibratePanels", 1);

alg->initialize();
Peakws->setName("PeaksWsp");
//Peakws->setName("PeaksWsp");
alg->setProperty("PeakWorkspace", Peakws );

alg->setProperty("a",14.0);
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/Crystal/test/SortHKLTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class SortHKLTest : public CxxTest::TestSuite
Instrument_sptr inst = ComponentCreationHelper::createTestInstrumentRectangular(4, 10, 1.0);
PeaksWorkspace_sptr ws(new PeaksWorkspace());
ws->setInstrument(inst);
ws->setName("TOPAZ_peaks");
//ws->setName("TOPAZ_peaks");
double smu = 0.357;
double amu = 0.011;
NeutronAtom *neutron = new NeutronAtom(static_cast<uint16_t>(EMPTY_DBL()), static_cast<uint16_t>(0),
Expand Down

0 comments on commit 0faf3bd

Please sign in to comment.