Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
fdc14f5a
Commit
fdc14f5a
authored
5 years ago
by
Antti Soininen
Browse files
Options
Downloads
Patches
Plain Diff
Fix issues with plotting cuts from dynamic susceptibility. Re #24011
parent
2f091c98
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/directtools/__init__.py
+2
-4
2 additions, 4 deletions
scripts/directtools/__init__.py
with
2 additions
and
4 deletions
scripts/directtools/__init__.py
+
2
−
4
View file @
fdc14f5a
...
@@ -55,7 +55,7 @@ def _configurematplotlib(params):
...
@@ -55,7 +55,7 @@ def _configurematplotlib(params):
def
_chooseylabel
(
workspace
,
axes
):
def
_chooseylabel
(
workspace
,
axes
):
"""
Set the correct y label for profile axes.
"""
"""
Set the correct y label for profile axes.
"""
yUnitLabel
=
workspace
.
YUnitLabel
()
yUnitLabel
=
workspace
.
YUnitLabel
()
if
yUnitLabel
==
"
X
''
(Q,E)
"
:
if
yUnitLabel
==
"
Dynamic susceptibility
"
:
axes
.
set_ylabel
(
r
"
$\chi
''
(Q,E)$
"
)
axes
.
set_ylabel
(
r
"
$\chi
''
(Q,E)$
"
)
elif
yUnitLabel
==
'
g^{neutron}(E) (arb. units)
'
:
elif
yUnitLabel
==
'
g^{neutron}(E) (arb. units)
'
:
axes
.
set_ylabel
(
r
'
$g(E)$
'
)
axes
.
set_ylabel
(
r
'
$g(E)$
'
)
...
@@ -615,8 +615,7 @@ def plotcuts(direction, workspaces, cuts, widths, quantity, unit, style='l', kee
...
@@ -615,8 +615,7 @@ def plotcuts(direction, workspaces, cuts, widths, quantity, unit, style='l', kee
if
wsStr
==
''
:
if
wsStr
==
''
:
wsStr
=
str
(
wsCount
)
wsStr
=
str
(
wsCount
)
quantityStr
=
_clearmath
(
quantity
)
quantityStr
=
_clearmath
(
quantity
)
unitStr
=
_clearmath
(
unit
)
wsName
=
'
cut_{}_{}={}+-{}
'
.
format
(
wsStr
,
quantityStr
,
cut
,
width
,)
wsName
=
'
cut_{}_{}={}+-{}{}
'
.
format
(
wsStr
,
quantityStr
,
cut
,
width
,
unitStr
)
if
keepCutWorkspaces
:
if
keepCutWorkspaces
:
cutWSList
.
append
(
wsName
)
cutWSList
.
append
(
wsName
)
line
=
LineProfile
(
ws
,
cut
,
width
,
Direction
=
direction
,
line
=
LineProfile
(
ws
,
cut
,
width
,
Direction
=
direction
,
...
@@ -726,7 +725,6 @@ def plotSofQW(workspace, QMin=0., QMax=None, EMin=None, EMax=None, VMin=0., VMax
...
@@ -726,7 +725,6 @@ def plotSofQW(workspace, QMin=0., QMax=None, EMin=None, EMax=None, VMin=0., VMax
logger
.
warning
(
"
The workspace
'
{}
'
does not look like proper S(Q,W) data. Trying to plot nonetheless.
"
.
format
(
str
(
workspace
)))
logger
.
warning
(
"
The workspace
'
{}
'
does not look like proper S(Q,W) data. Trying to plot nonetheless.
"
.
format
(
str
(
workspace
)))
qHorizontal
=
workspace
.
getAxis
(
0
).
getUnit
().
name
()
==
'
q
'
qHorizontal
=
workspace
.
getAxis
(
0
).
getUnit
().
name
()
==
'
q
'
isSusceptibility
=
workspace
.
YUnitLabel
()
==
'
Dynamic susceptibility
'
isSusceptibility
=
workspace
.
YUnitLabel
()
==
'
Dynamic susceptibility
'
print
(
workspace
.
YUnit
())
figure
,
axes
=
subplots
()
figure
,
axes
=
subplots
()
if
QMin
is
None
:
if
QMin
is
None
:
QMin
=
0.
QMin
=
0.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment