Commit 5e81640e authored by Owen Arnold's avatar Owen Arnold
Browse files

refs #14124. OverwriteSpectraMap -> RewriteSpectraMap.

No reason to change the name of the property. Would be far more convient for existing clients if the name of this property remained the same.
parent 32864183
......@@ -75,7 +75,7 @@ void SANSInstrumentCreationHelper::runLoadInstrument(
loadInst.setPropertyValue("Filename", "IDFs_for_UNIT_TESTING/" +
instrumentID + "_Definition.xml");
loadInst.setProperty<MatrixWorkspace_sptr>("Workspace", workspace);
loadInst.setProperty("OverwriteSpectraMap", Mantid::Kernel::OptionalBool(false));
loadInst.setProperty("RewriteSpectraMap", Mantid::Kernel::OptionalBool(false));
loadInst.execute();
}
......
......@@ -1054,7 +1054,7 @@ createEventWorkspace3(Mantid::DataObjects::EventWorkspace_const_sptr sourceWS,
loadInst->setPropertyValue("InstrumentName",
sourceWS->getInstrument()->getName());
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", outputWS);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loadInst->executeAsChildAlg();
// Populate the instrument parameters in this workspace - this works around a
......
......@@ -21,7 +21,7 @@ class POLDIAnalyseResidualsTest(stresstesting.MantidStressTest):
def runResidualAnalysis(self, filenames):
for dataFile in filenames:
LoadSINQFile(Instrument='POLDI',Filename=dataFile + ".hdf",OutputWorkspace=dataFile)
LoadInstrument(Workspace=dataFile, InstrumentName="POLDI", OverwriteSpectraMap=True)
LoadInstrument(Workspace=dataFile, InstrumentName="POLDI", RewriteSpectraMap=True)
PoldiTruncateData(InputWorkspace=dataFile,OutputWorkspace=dataFile)
PoldiAnalyseResiduals(MeasuredCountData=dataFile, FittedCountData="%s_fortran_fit" % (dataFile),
MaxIterations=1, OutputWorkspace=dataFile + "Residuals")
......
......@@ -20,7 +20,7 @@ class POLDIAutoCorrelationTest(stresstesting.MantidStressTest):
def runAutoCorrelation(self, filenames):
for dataFile in filenames:
LoadSINQFile(Instrument='POLDI',Filename=dataFile + ".hdf",OutputWorkspace=dataFile)
LoadInstrument(Workspace=dataFile, InstrumentName="POLDI", OverwriteSpectraMap=True)
LoadInstrument(Workspace=dataFile, InstrumentName="POLDI", RewriteSpectraMap=True)
PoldiTruncateData(InputWorkspace=dataFile,OutputWorkspace=dataFile)
PoldiAutoCorrelation(InputWorkspace=dataFile, wlenmin=1.1, wlenmax=5.0, OutputWorkspace=dataFile + "Corr")
......
......@@ -20,7 +20,7 @@ class POLDIFitPeaks2DTest(stresstesting.MantidStressTest):
def loadAndPrepareData(self, filenames):
for dataFile in filenames:
LoadSINQFile(Instrument='POLDI', Filename=dataFile + ".hdf", OutputWorkspace=dataFile)
LoadInstrument(Workspace=dataFile, InstrumentName="POLDI", OverwriteSpectraMap=True)
LoadInstrument(Workspace=dataFile, InstrumentName="POLDI", RewriteSpectraMap=True)
PoldiTruncateData(InputWorkspace=dataFile, OutputWorkspace=dataFile)
def loadReferencePeakData(self, filenames):
......@@ -31,7 +31,7 @@ class POLDIFitPeaks2DTest(stresstesting.MantidStressTest):
for dataFile in filenames:
Load(Filename="%s_2d_reference_Spectrum.nxs" % (dataFile),
OutputWorkspace="%s_2d_reference_Spectrum" % (dataFile))
LoadInstrument(Workspace="%s_2d_reference_Spectrum" % (dataFile), InstrumentName="POLDI", OverwriteSpectraMap=True)
LoadInstrument(Workspace="%s_2d_reference_Spectrum" % (dataFile), InstrumentName="POLDI", RewriteSpectraMap=True)
Load(Filename="%s_1d_reference_Spectrum.nxs" % (dataFile),
OutputWorkspace="%s_1d_reference_Spectrum" % (dataFile))
......
......@@ -47,7 +47,7 @@ class POLDIMergeTest(stresstesting.MantidStressTest):
def loadData(self, filenames):
for dataFile in filenames:
LoadSINQFile(Instrument='POLDI',Filename=dataFile + ".hdf",OutputWorkspace=dataFile)
LoadInstrument(Workspace=dataFile, InstrumentName="POLDI", OverwriteSpectraMap=True)
LoadInstrument(Workspace=dataFile, InstrumentName="POLDI", RewriteSpectraMap=True)
def runPoldiMerge(self, workspaceNames, outputWorkspaceName):
PoldiMerge(WorkspaceNames=workspaceNames, OutputWorkspace=outputWorkspaceName)
......
......@@ -17,7 +17,7 @@ class POLDITruncateDataTest(stresstesting.MantidStressTest):
def loadDataFiles(self,):
LoadSINQFile(Instrument='POLDI',Filename=self.dataFileName + ".hdf",OutputWorkspace=self.dataFileName)
LoadInstrument(Workspace=self.dataFileName, InstrumentName="POLDI", OverwriteSpectraMap=True)
LoadInstrument(Workspace=self.dataFileName, InstrumentName="POLDI", RewriteSpectraMap=True)
def workingAnalysis(self):
# In this method the "normal behavior" is tested, if everything is
......
......@@ -831,7 +831,7 @@ class Peak2ConvCell_Test(object):#(stresstesting.MantidStressTest):
CreateSingleValuedWorkspace(OutputWorkspace="Sws",DataValue="3")
CreateSingleValuedWorkspace(OutputWorkspace="Temp",DataValue="3")
LoadInstrument(Workspace="Sws",InstrumentName="TOPAZ", OverwriteSpectraMap=True)
LoadInstrument(Workspace="Sws",InstrumentName="TOPAZ", RewriteSpectraMap=True)
Inst= mtd["Sws"].getInstrument()
startA = 2
side1Ratios =[1.0, 1.2, 3.0, 8.0]
......
......@@ -29,7 +29,7 @@ Usage
ws = Load('CORELLI_2100')
# You will need to load the instrument if the one in the NeXus file doesn't contain the chopper sequence.
LoadInstrument(ws, MonitorList='-1,-2,-3', InstrumentName='CORELLI', OverwriteSpectraMap=OptionalBoolValue.True)
LoadInstrument(ws, MonitorList='-1,-2,-3', InstrumentName='CORELLI', RewriteSpectraMap=OptionalBoolValue.True)
# Run the cross-correlation. This is using a TDC timing offset of 56000ns.
wsOut = CorelliCrossCorrelate(ws,56000)
......
......@@ -57,7 +57,7 @@ Usage
Params=[-0.2,0.004,0.2])
LoadInstrument(Workspace=ws_name,
InstrumentName='IRIS', OverwriteSpectraMap=OptionalBoolValue.True)
InstrumentName='IRIS', RewriteSpectraMap=OptionalBoolValue.True)
SetInstrumentParameter(Workspace=ws_name,
ParameterName='Efixed',
......
......@@ -29,7 +29,7 @@ Usage
ws = CreateSampleWorkspace("Histogram", Function="User Defined", UserDefinedFunction=function, XMin=0, XMax=0.5, BinWidth=0.01, XUnit="Time", NumBanks=1)
#load instrument defintion and parameters
LoadInstrument(ws, InstrumentName='IRIS', OverwriteSpectraMap=OptionalBoolValue.True)
LoadInstrument(ws, InstrumentName='IRIS', RewriteSpectraMap=OptionalBoolValue.True)
param_file = config['instrumentDefinition.directory'] + 'IRIS_graphite_002_Parameters.xml'
LoadParameterFile(ws, param_file)
......
......@@ -34,7 +34,7 @@ Usage
.. testcode:: GetEiT0atSNS
from mantid.kernel import OptionalBoolValue
w=Load('ADARAMonitors.nxs')
LoadInstrument(Workspace=w,InstrumentName='SEQUOIA',OverwriteSpectraMap=OptionalBoolValue.False)
LoadInstrument(Workspace=w,InstrumentName='SEQUOIA',RewriteSpectraMap=OptionalBoolValue.False)
AddSampleLog(Workspace=w,LogName='vChTrans',LogText='1',LogType='Number Series')
AddSampleLog(Workspace=w,LogName='EnergyRequest',LogText='20',LogType='Number Series')
res=GetEiT0atSNS(w)
......
......@@ -362,7 +362,7 @@ that the first three detectors (monitors) were not touched and the next three we
ws=CreateSampleWorkspace();
#--------------------------------------------------------------------------------------
# load MARI
det=LoadInstrument(ws,InstrumentName='MARI', OverwriteSpectraMap=OptionalBoolValue.True)
det=LoadInstrument(ws,InstrumentName='MARI', RewriteSpectraMap=OptionalBoolValue.True)
inst1=ws.getInstrument();
#
write_detectors('unCalibrated',inst1,10);
......
......@@ -40,7 +40,7 @@ Usage
print "Default workspace has instrument: {0} with {1} parameters".format(inst0.getName(),len(inst0.getParameterNames()));
# load MARI
det=LoadInstrument(ws,InstrumentName='MARI', OverwriteSpectraMap=OptionalBoolValue.True)
det=LoadInstrument(ws,InstrumentName='MARI', RewriteSpectraMap=OptionalBoolValue.True)
inst1=ws.getInstrument();
print "Modified workspace has instrument: {0} with {1} parameters".format(inst1.getName(),len(inst1.getParameterNames()));
......
......@@ -30,7 +30,7 @@ Usage
# Create a workspace
ws = CreateSampleWorkspace()
# Replace the instrument in the workspace with HRPD
LoadInstrument(ws,InstrumentName='HRPD', OverwriteSpectraMap=OptionalBoolValue.True)
LoadInstrument(ws,InstrumentName='HRPD', RewriteSpectraMap=OptionalBoolValue.True)
# Map spectra to detectors according to an HRPD raw file.
LoadMappingTable('HRP39180.RAW',ws)
......
......@@ -38,7 +38,7 @@ Usage
ws = ScaleX(ws, 0.1, "Multiply")
#load instrument and instrument parameters
LoadInstrument(ws, InstrumentName='IRIS', OverwriteSpectraMap=OptionalBoolValue.True)
LoadInstrument(ws, InstrumentName='IRIS', RewriteSpectraMap=OptionalBoolValue.True)
path = os.path.join(config['instrumentDefinition.directory'], 'IRIS_graphite_002_Parameters.xml')
LoadParameterFile(ws, Filename=path)
ws = RenameWorkspace(ws, OutputWorkspace=name)
......
......@@ -33,7 +33,7 @@ Usage
AddSampleLog(ws, 'gd_prtn_chrg', '30.01270866394043', 'Number')
#load instrument parameters
LoadInstrument(ws, OverwriteSpectraMap=OptionalBoolValue.True, InstrumentName='OSIRIS')
LoadInstrument(ws, RewriteSpectraMap=OptionalBoolValue.True, InstrumentName='OSIRIS')
param_file = config['instrumentDefinition.directory'] + 'OSIRIS_diffraction_diffspec_Parameters.xml'
LoadParameterFile(ws, Filename=param_file)
return ws
......
......@@ -36,7 +36,7 @@ This small usage example merges two compatible POLDI-files which have been loade
from mantid.kernel import OptionalBoolValue
# Load the first data file and the correct instrument
raw_6903 = LoadSINQFile(Filename = "poldi2013n006903.hdf", Instrument = "POLDI")
LoadInstrument(raw_6903, OverwriteSpectraMap=OptionalBoolValue.True, InstrumentName = "POLDI")
LoadInstrument(raw_6903, RewriteSpectraMap=OptionalBoolValue.True, InstrumentName = "POLDI")
# Use Integration and SumSpectra to sum all counts in the spectrum.
# The data must be converted to histogram data for Integration to work.
......@@ -50,7 +50,7 @@ This small usage example merges two compatible POLDI-files which have been loade
# The same with the second data file
raw_6904 = LoadSINQFile(Filename = "poldi2013n006904.hdf", Instrument = "POLDI")
LoadInstrument(raw_6904, OverwriteSpectraMap=OptionalBoolValue.True, InstrumentName = "POLDI")
LoadInstrument(raw_6904, RewriteSpectraMap=OptionalBoolValue.True, InstrumentName = "POLDI")
histo_6904 = ConvertToHistogram(raw_6904)
spectra_6904 = Integration(histo_6904)
total_6904 = SumSpectra(spectra_6904)
......
......@@ -63,7 +63,7 @@ A typical peak search procedure would be performed on correlation data, so this
from mantid.kernel import OptionalBoolValue
# Load data file and instrument, perform correlation analysis
raw_6904 = LoadSINQFile(Filename = "poldi2013n006904.hdf", Instrument = "POLDI")
LoadInstrument(raw_6904, OverwriteSpectraMap=OptionalBoolValue.True, InstrumentName = "POLDI")
LoadInstrument(raw_6904, RewriteSpectraMap=OptionalBoolValue.True, InstrumentName = "POLDI")
correlated_6904 = PoldiAutoCorrelation(raw_6904)
# Run peak search algorithm, store peaks in TableWorkspace
......
......@@ -24,7 +24,7 @@ Usage
from mantid.kernel import OptionalBoolValue
# Load data file and instrument, perform correlation analysis
raw_6904 = LoadSINQFile(Filename = "poldi2013n006904.hdf", Instrument = "POLDI")
LoadInstrument(raw_6904, OverwriteSpectraMap=OptionalBoolValue.True, InstrumentName = "POLDI")
LoadInstrument(raw_6904, RewriteSpectraMap=OptionalBoolValue.True, InstrumentName = "POLDI")
correlated_6904 = PoldiAutoCorrelation(raw_6904)
# Run peak search algorithm, store peaks in TableWorkspace
......
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