diff --git a/docs/source/algorithms/CorelliCrossCorrelate-v1.rst b/docs/source/algorithms/CorelliCrossCorrelate-v1.rst index 563194f26d42ad02fc4393cf0c32a258a3ece349..2d5c8a72d23075c15c9e6eadc59374c3d04c7d35 100644 --- a/docs/source/algorithms/CorelliCrossCorrelate-v1.rst +++ b/docs/source/algorithms/CorelliCrossCorrelate-v1.rst @@ -24,7 +24,7 @@ Usage **Example - CorelliCrossCorrelate** .. testcode:: CorelliCrossCorrelateExample - from mantid.kernel import OptionalBool + from mantid.kernel import OptionalBoolValue # Load a Corelli data file. ws = Load('CORELLI_2100') diff --git a/docs/source/algorithms/ElasticWindowMultiple-v1.rst b/docs/source/algorithms/ElasticWindowMultiple-v1.rst index dcc5acb33afa962b6bb963a30e3b1aa1fca294c2..19911703f549f51d025946826f496b19191652b9 100644 --- a/docs/source/algorithms/ElasticWindowMultiple-v1.rst +++ b/docs/source/algorithms/ElasticWindowMultiple-v1.rst @@ -28,7 +28,7 @@ Usage ----- .. testcode:: exElasticWindowMultiple - + from mantid.kernel import OptionalBoolValue # This test needs the facility to be set to ISIS to load the IRIS instrument facility = config['default.facility'] config['default.facility'] = 'ISIS' @@ -57,7 +57,7 @@ Usage Params=[-0.2,0.004,0.2]) LoadInstrument(Workspace=ws_name, - InstrumentName='IRIS') + InstrumentName='IRIS', OverwriteSpectraMap=OptionalBoolValue.True) SetInstrumentParameter(Workspace=ws_name, ParameterName='Efixed', diff --git a/docs/source/algorithms/FuryFitMultiple-v1.rst b/docs/source/algorithms/FuryFitMultiple-v1.rst index 9b4f609532344889888be5bf2827a49d51e9494f..0759f9f5a2317c7281f1daf22d6516177642ecdf 100644 --- a/docs/source/algorithms/FuryFitMultiple-v1.rst +++ b/docs/source/algorithms/FuryFitMultiple-v1.rst @@ -23,13 +23,13 @@ Usage **Example - Running FuryFitMultiple on an reduced workspace.** .. code-block:: python - + from mantid.kernel import OptionalBoolValue #create a dummy workspace function = "name=ExpDecay,Height=1,Lifetime=0.035" 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') + LoadInstrument(ws, InstrumentName='IRIS', OverwriteSpectraMap=OptionalBoolValue.True) param_file = config['instrumentDefinition.directory'] + 'IRIS_graphite_002_Parameters.xml' LoadParameterFile(ws, param_file) diff --git a/docs/source/algorithms/GetEiT0atSNS-v1.rst b/docs/source/algorithms/GetEiT0atSNS-v1.rst index 4b5ff2cf16ce7f2e6b982bd88ebf354614c9d57d..8d116a42b9feffb6c7c9067c24ada4b011147b2c 100644 --- a/docs/source/algorithms/GetEiT0atSNS-v1.rst +++ b/docs/source/algorithms/GetEiT0atSNS-v1.rst @@ -32,9 +32,9 @@ Usage .. include:: ../usagedata-note.txt .. testcode:: GetEiT0atSNS - + from mantid.kernel import OptionalBoolValue w=Load('ADARAMonitors.nxs') - LoadInstrument(Workspace=w,InstrumentName='SEQUOIA',RewriteSpectraMap='0') + LoadInstrument(Workspace=w,InstrumentName='SEQUOIA',OverwriteSpectraMap=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) diff --git a/docs/source/algorithms/LoadDetectorInfo-v1.rst b/docs/source/algorithms/LoadDetectorInfo-v1.rst index 6407d572fa29388d71db6d907b1e4e99fd795b9a..a4923e8f059a259188b9cd7e6a55e10e44a5f780 100644 --- a/docs/source/algorithms/LoadDetectorInfo-v1.rst +++ b/docs/source/algorithms/LoadDetectorInfo-v1.rst @@ -278,7 +278,7 @@ that the first three detectors (monitors) were not touched and the next three we import math import os - + from mantid.kernel import OptionalBoolValue # printing procedure def write_detectors(instr_type,instr,ndet): ''' print first ndet detectors from given instrument ''' @@ -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') + det=LoadInstrument(ws,InstrumentName='MARI', OverwriteSpectraMap=OptionalBoolValue.True) inst1=ws.getInstrument(); # write_detectors('unCalibrated',inst1,10); diff --git a/docs/source/algorithms/LoadInstrument-v1.rst b/docs/source/algorithms/LoadInstrument-v1.rst index 067cba2fadcd8e92e93b27f1ccf3f08112fde97e..e09284b9cc6d10c012462d7e1d6670379189335e 100644 --- a/docs/source/algorithms/LoadInstrument-v1.rst +++ b/docs/source/algorithms/LoadInstrument-v1.rst @@ -32,7 +32,7 @@ Usage **Example - Load instrument to a workspace:** .. testcode:: exLoadInstrument - + from mantid.kernel import OptionalBoolValue # create sample workspace ws=CreateSampleWorkspace(); inst0=ws.getInstrument(); @@ -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') + det=LoadInstrument(ws,InstrumentName='MARI', OverwriteSpectraMap=OptionalBoolValue.True) inst1=ws.getInstrument(); print "Modified workspace has instrument: {0} with {1} parameters".format(inst1.getName(),len(inst1.getParameterNames())); diff --git a/docs/source/algorithms/LoadMappingTable-v1.rst b/docs/source/algorithms/LoadMappingTable-v1.rst index 5871864103f6f668c4892894d5edb3633135f6cb..1e301e19a569ed8da3088c3fe780c4aff41af5ab 100644 --- a/docs/source/algorithms/LoadMappingTable-v1.rst +++ b/docs/source/algorithms/LoadMappingTable-v1.rst @@ -26,11 +26,11 @@ Usage ----- .. testcode:: - + from mantid.kernel import OptionalBoolValue # Create a workspace ws = CreateSampleWorkspace() # Replace the instrument in the workspace with HRPD - LoadInstrument(ws,InstrumentName='HRPD') + LoadInstrument(ws,InstrumentName='HRPD', OverwriteSpectraMap=OptionalBoolValue.True) # Map spectra to detectors according to an HRPD raw file. LoadMappingTable('HRP39180.RAW',ws) diff --git a/docs/source/algorithms/MuscatFunc-v1.rst b/docs/source/algorithms/MuscatFunc-v1.rst index a972a285f446d065247c007f154bb9a4aabd3135..edeab473836dec67e6a855d9640c20d3944501e5 100644 --- a/docs/source/algorithms/MuscatFunc-v1.rst +++ b/docs/source/algorithms/MuscatFunc-v1.rst @@ -27,7 +27,7 @@ Usage **Example - a basic example using MuscatFunc.** .. code-block:: python - + from mantid.kernel import OptionalBoolValue def createSampleWorkspace(name, random=False): """ Creates a sample workspace with a single lorentzian that looks like IRIS data""" import os @@ -38,7 +38,7 @@ Usage ws = ScaleX(ws, 0.1, "Multiply") #load instrument and instrument parameters - LoadInstrument(ws, InstrumentName='IRIS') + LoadInstrument(ws, InstrumentName='IRIS', OverwriteSpectraMap=OptionalBoolValue.True) path = os.path.join(config['instrumentDefinition.directory'], 'IRIS_graphite_002_Parameters.xml') LoadParameterFile(ws, Filename=path) ws = RenameWorkspace(ws, OutputWorkspace=name) diff --git a/docs/source/algorithms/OSIRISDiffractionReduction-v1.rst b/docs/source/algorithms/OSIRISDiffractionReduction-v1.rst index 6e4fbe9d245e2f89d6f071fa7aa0ac766ef6cea1..afd87947048440929a792def3d96e05df1f80763 100644 --- a/docs/source/algorithms/OSIRISDiffractionReduction-v1.rst +++ b/docs/source/algorithms/OSIRISDiffractionReduction-v1.rst @@ -24,7 +24,7 @@ Usage .. testcode:: ExOSIRISDiffractionReductionSimple import os - + from mantid.kernel import OptionalBoolValue def createDummyOSIRISWorkspace(name, func, xmin, xmax, bin_width): """Creates a workspace that looks something like an OSIRIS diffraction run""" #create workspace according to function @@ -33,7 +33,7 @@ Usage AddSampleLog(ws, 'gd_prtn_chrg', '30.01270866394043', 'Number') #load instrument parameters - LoadInstrument(ws, InstrumentName='OSIRIS') + LoadInstrument(ws, OverwriteSpectraMap=OptionalBoolValue.True, InstrumentName='OSIRIS') param_file = config['instrumentDefinition.directory'] + 'OSIRIS_diffraction_diffspec_Parameters.xml' LoadParameterFile(ws, Filename=param_file) return ws diff --git a/docs/source/algorithms/PoldiMerge-v1.rst b/docs/source/algorithms/PoldiMerge-v1.rst index 8c9adabb4e7c483527ce08f86e1da51b636efbe8..772f6751c8dc05e1e6640416d045714da0d73f79 100644 --- a/docs/source/algorithms/PoldiMerge-v1.rst +++ b/docs/source/algorithms/PoldiMerge-v1.rst @@ -33,10 +33,10 @@ Usage This small usage example merges two compatible POLDI-files which have been loaded before. .. testcode:: ExMergeSilicon - + 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, InstrumentName = "POLDI") + LoadInstrument(raw_6903, OverwriteSpectraMap=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, InstrumentName = "POLDI") + LoadInstrument(raw_6904, OverwriteSpectraMap=OptionalBoolValue.True, InstrumentName = "POLDI") histo_6904 = ConvertToHistogram(raw_6904) spectra_6904 = Integration(histo_6904) total_6904 = SumSpectra(spectra_6904) diff --git a/docs/source/algorithms/PoldiPeakSearch-v1.rst b/docs/source/algorithms/PoldiPeakSearch-v1.rst index ddf3e0dbe0041f2553104a21e90d9eeb6db123a5..936b83e3e43b5d5e84621435dbb1a504b27c0308 100644 --- a/docs/source/algorithms/PoldiPeakSearch-v1.rst +++ b/docs/source/algorithms/PoldiPeakSearch-v1.rst @@ -60,10 +60,10 @@ Usage A typical peak search procedure would be performed on correlation data, so this analysis is performed first, followed by a peak search with default parameters. .. testcode:: ExSiliconPeakSearch - + from mantid.kernel import OptionalBoolValue # Load data file and instrument, perform correlation analysis raw_6904 = LoadSINQFile(Filename = "poldi2013n006904.hdf", Instrument = "POLDI") - LoadInstrument(raw_6904, InstrumentName = "POLDI") + LoadInstrument(raw_6904, OverwriteSpectraMap=OptionalBoolValue.True, InstrumentName = "POLDI") correlated_6904 = PoldiAutoCorrelation(raw_6904) # Run peak search algorithm, store peaks in TableWorkspace diff --git a/docs/source/algorithms/PoldiPeakSummary-v1.rst b/docs/source/algorithms/PoldiPeakSummary-v1.rst index 280fb99a2356ceeba6ef15272267d1479bec2b4a..717103435a15690d9350143db283b89cb2b6bedb 100644 --- a/docs/source/algorithms/PoldiPeakSummary-v1.rst +++ b/docs/source/algorithms/PoldiPeakSummary-v1.rst @@ -21,10 +21,10 @@ Usage **Example - PoldiPeakSummary** .. testcode:: PoldiPeakSummaryExample - + from mantid.kernel import OptionalBoolValue # Load data file and instrument, perform correlation analysis raw_6904 = LoadSINQFile(Filename = "poldi2013n006904.hdf", Instrument = "POLDI") - LoadInstrument(raw_6904, InstrumentName = "POLDI") + LoadInstrument(raw_6904, OverwriteSpectraMap=OptionalBoolValue.True, InstrumentName = "POLDI") correlated_6904 = PoldiAutoCorrelation(raw_6904) # Run peak search algorithm, store peaks in TableWorkspace diff --git a/docs/source/algorithms/PoldiTruncateData-v1.rst b/docs/source/algorithms/PoldiTruncateData-v1.rst index d5f7edc683e0b2ca04f6db67a97267ba72317ded..d395ebbc87005c4bd21e41911b53a12905fba50c 100644 --- a/docs/source/algorithms/PoldiTruncateData-v1.rst +++ b/docs/source/algorithms/PoldiTruncateData-v1.rst @@ -28,10 +28,10 @@ Usage In the first example, POLDI data is cropped to the correct workspace size: .. testcode:: PoldiTruncateDataCrop - + from mantid.kernel import OptionalBoolValue # Load data and instrument - this is important, as the chopper configuration must be known. raw_6903 = LoadSINQFile(Filename = "poldi2013n006903.hdf", Instrument = "POLDI") - LoadInstrument(raw_6903, InstrumentName = "POLDI") + LoadInstrument(raw_6903, InstrumentName = "POLDI", OverwriteSpectraMap=OptionalBoolValue.True) print "The raw data workspace contains", len(raw_6903.readX(0)), "time bins." diff --git a/docs/source/algorithms/QLines-v1.rst b/docs/source/algorithms/QLines-v1.rst index 7fa831bedaa5f49d9fc69a214e1f518cb28af04b..54026ef1f8f86c855bb520a7eeaa8c42ce734338 100644 --- a/docs/source/algorithms/QLines-v1.rst +++ b/docs/source/algorithms/QLines-v1.rst @@ -43,7 +43,7 @@ Usage **Example - a basic example using QLines to fit a reduced workspace.** .. code-block:: python - + from mantid.kernel import OptionalBoolValue def createSampleWorkspace(name, random=False): """ Creates a sample workspace with a single lorentzian that looks like IRIS data""" import os @@ -54,7 +54,7 @@ Usage ws = ScaleX(ws, 0.1, "Multiply") #load instrument and instrument parameters - LoadInstrument(ws, InstrumentName='IRIS') + LoadInstrument(ws, InstrumentName='IRIS', OverwriteSpectraMap=OptionalBoolValue.True) path = os.path.join(config['instrumentDefinition.directory'], 'IRIS_graphite_002_Parameters.xml') LoadParameterFile(ws, Filename=path) ws = RenameWorkspace(ws, OutputWorkspace=name) diff --git a/docs/source/algorithms/ResNorm-v1.rst b/docs/source/algorithms/ResNorm-v1.rst index 434a9a718c633bd6e62c038e02e24e77e002760b..36440b028651e7531108f088bbfeec47ef9d8a1b 100644 --- a/docs/source/algorithms/ResNorm-v1.rst +++ b/docs/source/algorithms/ResNorm-v1.rst @@ -22,7 +22,7 @@ Usage **Example - a basic example using ResNorm.** .. code-block:: python - + from mantid.kernel import OptionalBoolValue def createSampleWorkspace(name, random=False): """ Creates a sample workspace with a single lorentzian that looks like IRIS data""" import os @@ -33,7 +33,7 @@ Usage ws = ScaleX(ws, 0.1, "Multiply") #load instrument and instrument parameters - LoadInstrument(ws, InstrumentName='IRIS') + LoadInstrument(ws, InstrumentName='IRIS', OverwriteSpectraMap=OptionalBoolValue.True) path = os.path.join(config['instrumentDefinition.directory'], 'IRIS_graphite_002_Parameters.xml') LoadParameterFile(ws, Filename=path) ws = RenameWorkspace(ws, OutputWorkspace=name) diff --git a/docs/source/algorithms/ResNorm-v2.rst b/docs/source/algorithms/ResNorm-v2.rst index 443ad1fa18e545acf06f2b1f56d10f843f142390..76cdc6083edbc9d042d4b1edf0e81b66cf32f60e 100644 --- a/docs/source/algorithms/ResNorm-v2.rst +++ b/docs/source/algorithms/ResNorm-v2.rst @@ -27,7 +27,7 @@ Usage **Example - a basic example using ResNorm.** .. testcode:: ExIRISResNorm - + from mantid.kernel import OptionalBoolValue def createSampleWorkspace(name, num_spec=10, random=False): """ Creates a sample workspace with a single lorentzian that looks like IRIS data @@ -54,7 +54,7 @@ Usage ws = ScaleX(ws, 0.1, "Multiply") # Load instrument and instrument parameters - LoadInstrument(ws, InstrumentName='IRIS') + LoadInstrument(ws, InstrumentName='IRIS', OverwriteSpectraMap=OptionalBoolValue.True) path = os.path.join(config['instrumentDefinition.directory'], 'IRIS_graphite_002_Parameters.xml') LoadParameterFile(ws, Filename=path) ws = RenameWorkspace(ws, OutputWorkspace=name) diff --git a/docs/source/algorithms/SANSBeamFluxCorrection-v1.rst b/docs/source/algorithms/SANSBeamFluxCorrection-v1.rst index b9e82d217bb849341eeced578d06270450e7bd9b..cc0b74a35c578f6dc397f6d289ad2508aed6d3e1 100644 --- a/docs/source/algorithms/SANSBeamFluxCorrection-v1.rst +++ b/docs/source/algorithms/SANSBeamFluxCorrection-v1.rst @@ -25,12 +25,12 @@ Usage **Example - Performing a Beam Flux Correction on Dummy Data** .. testcode:: ExTable - + from mantid.kernel import OptionalBoolValue # Create some dummy data, as well as a dummy monitor ws for EQSANS. x = [1,2,3,4,5,6,7,8,9,10,11] y = 491520*[0.1] ws = CreateWorkspace(DataX=x,DataY=y,DataE=y,NSpec='49152',UnitX='Wavelength') - LoadInstrument(ws, InstrumentName="EQSANS") + LoadInstrument(ws, InstrumentName="EQSANS", OverwriteSpectraMap=OptionalBoolValue.True) monitor = SumSpectra(ws) # Do the correction, dragging in the file which contains the reference flux spectrum. diff --git a/docs/source/algorithms/SofQWMoments-v1.rst b/docs/source/algorithms/SofQWMoments-v1.rst index 27a7db835d6633f662143c25fcea4202a26539b2..3cf081c53e8ad0c03ce3aeb89d8556bbb657ebec 100644 --- a/docs/source/algorithms/SofQWMoments-v1.rst +++ b/docs/source/algorithms/SofQWMoments-v1.rst @@ -24,14 +24,14 @@ Usage **Example - Running SofQWMoments from with an SofQW workspace.** .. testcode:: ExSofQWMomentsSimple - + from mantid.kernel import OptionalBoolValue #create a dummy workspace function = "name=Lorentzian,Amplitude=1,PeakCentre=5,FWHM=1" ws = CreateSampleWorkspace("Histogram", Function="User Defined", UserDefinedFunction=function, XMin=0, XMax=10, BinWidth=0.01, XUnit="DeltaE") ws = ScaleX(ws, -5, "Add") #shift to center on 0 ws = ScaleX(ws, 0.1) #scale to size ws = RenameWorkspace(ws, OutputWorkspace="irs21760_graphite002_red") - LoadInstrument(ws, InstrumentName='IRIS') + LoadInstrument(ws, InstrumentName='IRIS', OverwriteSpectraMap=OptionalBoolValue.True) #Run SofQW and then SofQWMoments ws = SofQW(ws, '0.4, 0.1, 1.8', EMode='Indirect', EFixed='1.845', OutputWorkspace="irs00001_graphite002_red") diff --git a/docs/source/algorithms/UpdateInstrumentFromFile-v1.rst b/docs/source/algorithms/UpdateInstrumentFromFile-v1.rst index d827e829814e1371d31ae3a79212afb5ede4a0d7..2da782de62e3bc23ccab1ab9d18663acbeac60fe 100644 --- a/docs/source/algorithms/UpdateInstrumentFromFile-v1.rst +++ b/docs/source/algorithms/UpdateInstrumentFromFile-v1.rst @@ -74,7 +74,7 @@ Usage **Example - Update Instrument:** .. testcode:: exUpdateInstrumentFromFile - + from mantid.kernel import OptionalBoolValue import math import os # priting procedure @@ -100,7 +100,7 @@ Usage ws=CreateSampleWorkspace(); #-------------------------------------------------------------------------------------- # load MARI - det=LoadInstrument(ws,InstrumentName='MARI') + det=LoadInstrument(ws,InstrumentName='MARI', OverwriteSpectraMap=OptionalBoolValue.True) inst1=ws.getInstrument(); # print_10_detectors('unCalibrated',inst1);