Skip to content
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

Add WorkspaceIndex attribute in InelasticDiffSphere and InelasticDiffRotDiscreteCircle #493

Merged
merged 6 commits into from Apr 8, 2015

Conversation

DanNixon
Copy link
Member

Fixes #11447.

To test:

  • Load irs26176_graphite002_red.nxs
  • Run the following script with the log set to debug and notice there is log output showing the value of Q used for each spectrum, this value should be equal to that shown in Show Detectors
  • Add the Q parameter in (add ,Q=1.2 after the Shift parameter), run again, notice now the same Q value is used for all spectra (as was done before).
  • Do the same again but change the function to InelasticDiffRotDiscreteCircle
PlotPeakByLogValue(
    Input='irs26176_graphite002_red,i0;irs26176_graphite002_red,i1;irs26176_graphite002_red,i2;irs26176_graphite002_red,i3;irs26176_graphite002_red,i4;irs26176_graphite002_red,i5;irs26176_graphite002_red,i6;irs26176_graphite002_red,i7;irs26176_graphite002_red,i8;irs26176_graphite002_red,i9',
    OutputWorkspace='fit',
    Function='name=InelasticDiffSphere,Intensity=1,Radius=2,Diffusion=0.1,Shift=0'',
    FitType='Individual',
    PassWSIndexToFunction=True,
    CreateOutput=True,
    OutputCompositeMembers=True)

@DanNixon DanNixon added this to the Release 3.4 milestone Mar 31, 2015
@mantid-roman mantid-roman self-assigned this Apr 1, 2015
@mantid-roman
Copy link
Contributor

  • There is no unit test for the new functionality.
  • Attribute Q should be a double. You should be able to do: getAttribute("Q").asDouble()

@DanNixon
Copy link
Member Author

DanNixon commented Apr 1, 2015

@mantid-roman Is there any way to have a double attribute that can be left blank?
That is the only reason I have not done this.

@mantid-roman
Copy link
Contributor

You can use either EMPTY_DBL() for Q or EMPTY_INT() for WorkspaceIndex as we do in algorithms.

mantid-roman added a commit that referenced this pull request Apr 8, 2015
…bute_in_diffsphere

Add WorkspaceIndex attribute in InelasticDiffSphere and InelasticDiffRotDiscreteCircle
@mantid-roman mantid-roman merged commit 58d6f7f into master Apr 8, 2015
@mantid-roman mantid-roman deleted the 11447_workspaceindex_attribute_in_diffsphere branch April 8, 2015 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants