New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Muon PhaseQuad documentation and user examples #324
Conversation
# Load the first two spectra from a MUSR run | ||
input = LoadMuonNexus('MUSR0015189.nxs',EntryNumber=1,SpectrumMin=1,SpectrumMax=2) | ||
# Load a set of spectra from a EMU file | ||
ws = LoadMuonNexus('EMU00006473.nxs') | ||
|
||
# Create a PhaseList file with some arbitrary detector information | ||
file = open('PhaseList.txt','w') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is nothing wrong with the line here, however, on some users' machines the current working directory is not writeable so this example may not work out of the box. In most of our examples that write files we tend to use the home directory, which is easy to access in Python. Can we change this line to something like
phaselist_path = os.path.join(os.path.expanduser("~"),"PhaseList.txt")
phaselist_file = open(phaselist_path, 'w')
Note that I have also replaced file
withphaselist_file
as file
is a keyword in Python and is generally considered bad practice to over write keywords.
Could we also remove the temporary .. testcleanup:: ExPhaseQuadList
import os
try:
os.remove(phaselist_path)
except OSError:
pass See |
Sure, I will remove the file. Thanks Martyn |
I have just seen I missed the first comment, I will modify that too. |
Jenkins, retest this please |
It looks like this doesn't merge cleanly with master any more. Could you merge master to your branch? |
Jenkins, retest this please |
1 similar comment
Jenkins, retest this please |
One of the builds has failed with a git error. I don't think it is worth pushing this through the build servers again. I'll just wait until the build finish and merge it then. |
The |
Update Muon PhaseQuad documentation and user examples
Fixes #11191
To test: this ticket is to update the algorithm's documentation, so basically the only two things to test here are the user examples.