Skip to content

Commit

Permalink
Use Load algorithm to choose correct LoadMuonNexus algorithm in doc t…
Browse files Browse the repository at this point in the history
…ests
  • Loading branch information
robertapplin committed Dec 4, 2024
1 parent e3a0c97 commit 3887822
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/source/algorithms/ApplyDeadTimeCorr-v1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Usage
.. testcode:: ExCustomDeadTimes

# Load single period of a MUSR run
input = LoadMuonNexus('MUSR0015189.nxs', EntryNumber=1)
input = Load('MUSR0015189.nxs', EntryNumber=1)

# Remove uninteresting bins
input = CropWorkspace('input', XMin=0.55, XMax=12)
Expand Down Expand Up @@ -81,7 +81,7 @@ Output:
.. testcode:: ExLoadedDeadTimes

# Load a MUSR run
input = LoadMuonNexus('MUSR0015189.nxs', DeadTimeTable='dead_times')
input = Load('MUSR0015189.nxs', DeadTimeTable='dead_times')

# Remove uninteresting bins
input = CropWorkspace('input', XMin=0.55, XMax=12)
Expand Down
12 changes: 6 additions & 6 deletions docs/source/algorithms/LoadMuonNexus-v2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ Version 1
#########

Version 1 supports the loading version 1.0 of the muon nexus format.
This is still in active use, if the current version of LoadMuonNexus
detects that it has been asked to load a previous version muon nexus
file it will call the previous version of the algorithm to perform the
This is still in active use, if the Load algorithm detects that it
has been asked to load a previous version muon nexus file it will
call the previous version of the LoadMuonNexus algorithm to perform the
task.

See :ref:`algm-LoadMuonNexus-v1` for more details about version 1.
Expand All @@ -172,7 +172,7 @@ Usage
.. testcode:: LoadMuonNexusOnePeriod

# Load MUSR dataset
ws = LoadMuonNexus(Filename="MUSR00015189.nxs",EntryNumber=1)
ws = Load(Filename="MUSR00015189.nxs",EntryNumber=1)
print("Workspace has {} spectra".format(ws[0].getNumberHistograms()))

Output:
Expand All @@ -186,7 +186,7 @@ Output:
.. testcode:: ExLoadMuonNexusSomeSpectra

# Load some spectra
ws = LoadMuonNexus(Filename="MUSR00015189.nxs",SpectrumMin=5,SpectrumMax=10,EntryNumber=1)
ws = Load(Filename="MUSR00015189.nxs",SpectrumMin=5,SpectrumMax=10,EntryNumber=1)
print("Workspace has {} spectra".format(ws[0].getNumberHistograms()))

Output:
Expand All @@ -200,7 +200,7 @@ Output:
.. testcode:: ExLoadDeadTimeTable

# Load some spectra
ws = LoadMuonNexus(Filename="emu00006473.nxs",SpectrumMin=5,SpectrumMax=10,DeadTimeTable="deadTimeTable")
ws = Load(Filename="emu00006473.nxs",SpectrumMin=5,SpectrumMax=10,DeadTimeTable="deadTimeTable")
tab = mtd['deadTimeTable']
for i in range(0,tab.rowCount()):
print("{} {:.12f}".format(tab.cell(i,0), tab.cell(i,1)))
Expand Down
6 changes: 3 additions & 3 deletions docs/source/algorithms/MuonGroupDetectors-v1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Usage
.. testcode:: ExGroupMUSR

# Load first period of a MUSR data file
ws = LoadMuonNexus('MUSR00015189.nxs', EntryNumber=1)
ws = Load('MUSR00015189.nxs', EntryNumber=1)

# Create a table with some custom grouping
grouping = CreateEmptyTableWorkspace()
Expand Down Expand Up @@ -65,10 +65,10 @@ Output:
.. testcode:: ExGroupingFromNexus

# Load MUSR grouping from the Nexus file
__unused_ws = LoadMuonNexus('MUSR00015189.nxs', DetectorGroupingTable='grouping')
__unused_ws = Load('MUSR00015189.nxs', DetectorGroupingTable='grouping')

# Load data from a different MUSR file
ws = LoadMuonNexus('MUSR00015190.nxs')
ws = Load('MUSR00015190.nxs')

# Use grouping from one file to group data from different file
grouped = MuonGroupDetectors('ws', 'grouping')
Expand Down

0 comments on commit 3887822

Please sign in to comment.