Option to change the units of the ApplyDetailedBalance from DeltaE to DeltaE_inFrequency #19206

Merged
merged 15 commits into from Mar 28, 2017

Conversation

Projects
None yet
3 participants
@jmborr
Member

jmborr commented Mar 22, 2017

Work done:

  • Added pull-down menu to select output units.
  • unit test
  • updated documentation
  • updated release notes

To test:

"""Run this script and make sure that workspaces susceptibilityEtoF and susceptibilityE are the same"""
import numpy as np
x=np.arange(-0.1, 0.1, 0.0004)   # energy range, in meV
hwhm=0.01  # Half width at half maximum
y=1.0/np.pi * hwhm/(hwhm**2+x[:-1]**2)
data=CreateWorkspace(x, y, 0.1*y, NSpec=1, UnitX='DeltaE')
susceptibilityE = ApplyDetailedBalance(data, Temperature="273", OutputUnits="Energy")
susceptibilityF = ApplyDetailedBalance(data, Temperature="273", OutputUnits="Frequency")
# There's only a rescaling of the X-axis between susceptibilityE and susceptibilityF
susceptibilityEtoF = ScaleX(susceptibilityE, Factor=0.2417989262, Operation="Multiply")
plot_spectrum([susceptibilityEtoF, susceptibilityF], 0)

Fixes #19053.

Updated release notes


Reviewer

Please comment on the following (full description):

Code Review
  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards? Is it well structured with small focussed classes/methods/functions?
  • Are there unit/system tests in place? Are the unit tests small and test the a class in isolation?
  • If there are changes in the release notes then do they describe the changes appropriately?
Functional Tests
  • Do changes function as described? Add comments below that describe the tests performed?

  • How do the changes handle unexpected situations, e.g. bad input?

  • Has the relevant documentation been added/updated?

  • Is user-facing documentation written in a user-friendly manner?

  • Has developer documentation been updated if required?

  • Does everything look good? Comment with the ship it emoji but don't merge. A member of @mantidproject/gatekeepers will take care of it.

@jmborr jmborr added this to the Release 3.10 milestone Mar 22, 2017

@jmborr jmborr self-assigned this Mar 22, 2017

jmborr added some commits Mar 22, 2017

Refs #19053 Updated documentation
 #	modified:   docs/source/algorithms/ApplyDetailedBalance-v1.rst
@yxqd

This comment has been minimized.

Show comment
Hide comment
@yxqd

yxqd Mar 28, 2017

Contributor

:shipit:

Contributor

yxqd commented Mar 28, 2017

:shipit:

@jmborr

This comment has been minimized.

Show comment
Hide comment
@jmborr

jmborr Mar 28, 2017

Member

@peterfpeterson Can you please merge ?

Member

jmborr commented Mar 28, 2017

@peterfpeterson Can you please merge ?

@peterfpeterson peterfpeterson merged commit 3806544 into master Mar 28, 2017

9 checks passed

ClangFormat Jenkins build pull_requests-clang-format 12320 has succeeded
Details
Doxygen Jenkins build pull_requests-doxygen 11692 has succeeded
Details
Flake8 Jenkins build pull_requests-flake8 3009 has succeeded
Details
OSX Jenkins build pull_requests-osx 12852 has succeeded
Details
RHEL7 + System Tests Jenkins build pull_requests-rhel7 12749 has succeeded
Details
Ubuntu + Doc Tests Jenkins build pull_requests-ubuntu 13353 has succeeded
Details
Ubuntu Python 3 Jenkins build pull_requests-ubuntu-python3 896 has succeeded
Details
Windows Jenkins build pull_requests-win7 13616 has succeeded
Details
cppcheck Jenkins build pull_requests-cppcheck 13307 has succeeded
Details

@peterfpeterson peterfpeterson deleted the 19053_ApplyDetailedBalance branch Mar 28, 2017

@jmborr

This comment has been minimized.

Show comment
Hide comment
@jmborr

jmborr Mar 28, 2017

Member

Thanks!

Member

jmborr commented Mar 28, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment