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
fc8a597e
Commit
fc8a597e
authored
5 years ago
by
Alex Buts
Browse files
Options
Downloads
Patches
Plain Diff
Re #26871 fixing flake
parent
9ba52bf3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/Inelastic/Direct/AbsorptionShapes.py
+8
-9
8 additions, 9 deletions
scripts/Inelastic/Direct/AbsorptionShapes.py
with
8 additions
and
9 deletions
scripts/Inelastic/Direct/AbsorptionShapes.py
+
8
−
9
View file @
fc8a597e
...
@@ -86,9 +86,8 @@ class anAbsorptionShape(object):
...
@@ -86,9 +86,8 @@ class anAbsorptionShape(object):
# Property describes if a shape axis direction have been changed.
# Property describes if a shape axis direction have been changed.
# Some instruments (e.g. MARI) have non-standart default axis directions
# Some instruments (e.g. MARI) have non-standart default axis directions
self
.
_axis_is_default
=
True
self
.
_axis_is_default
=
True
#
#
def
__del__
(
self
):
def
__del__
(
self
):
DeleteWorkspace
(
self
.
_testWorkspace
)
DeleteWorkspace
(
self
.
_testWorkspace
)
#
#
...
@@ -321,7 +320,7 @@ class anAbsorptionShape(object):
...
@@ -321,7 +320,7 @@ class anAbsorptionShape(object):
#
#
def
_check_MARI_axis_
(
self
,
workspace
):
def
_check_MARI_axis_
(
self
,
workspace
):
"""
method verifies, if default axis needs to be changed for MARI
"""
"""
method verifies, if default axis needs to be changed for MARI
"""
if
self
.
_axis_is_default
:
if
self
.
_axis_is_default
:
instrument
=
workspace
.
getInstrument
()
instrument
=
workspace
.
getInstrument
()
instr_name
=
instrument
.
getName
()
instr_name
=
instrument
.
getName
()
...
@@ -365,7 +364,7 @@ class Cylinder(anAbsorptionShape):
...
@@ -365,7 +364,7 @@ class Cylinder(anAbsorptionShape):
anAbsorptionShape
.
__init__
(
self
,
Material
)
anAbsorptionShape
.
__init__
(
self
,
Material
)
self
.
shape
=
CylinderParams
self
.
shape
=
CylinderParams
self
.
_shape_has_axis
=
True
self
.
_shape_has_axis
=
True
@property
@property
def
shape
(
self
):
def
shape
(
self
):
return
self
.
_ShapeDescription
return
self
.
_ShapeDescription
...
@@ -399,7 +398,7 @@ class Cylinder(anAbsorptionShape):
...
@@ -399,7 +398,7 @@ class Cylinder(anAbsorptionShape):
n_annul
=
1
n_annul
=
1
kw
[
'
NumberOfSlices
'
]
=
n_slices
kw
[
'
NumberOfSlices
'
]
=
n_slices
kw
[
'
NumberOfAnnuli
'
]
=
n_annul
kw
[
'
NumberOfAnnuli
'
]
=
n_annul
if
not
'
Emode
'
in
kw
:
if
'
Emode
'
not
in
kw
:
kw
[
'
Emode
'
]
=
'
Direct
'
kw
[
'
Emode
'
]
=
'
Direct
'
adsrbtn_correctios
=
AbsorptionCorrection
(
correction_base_ws
,
**
kw
)
adsrbtn_correctios
=
AbsorptionCorrection
(
correction_base_ws
,
**
kw
)
return
adsrbtn_correctios
return
adsrbtn_correctios
...
@@ -472,7 +471,7 @@ class FlatPlate(anAbsorptionShape):
...
@@ -472,7 +471,7 @@ class FlatPlate(anAbsorptionShape):
prop_dict
=
{
'
Height
'
:
'
SampleHeight
'
,
'
Width
'
:
'
SampleWidth
'
,
'
Thick
'
:
'
SampleThickness
'
}
prop_dict
=
{
'
Height
'
:
'
SampleHeight
'
,
'
Width
'
:
'
SampleWidth
'
,
'
Thick
'
:
'
SampleThickness
'
}
for
key
,
val
in
prop_dict
.
items
():
for
key
,
val
in
prop_dict
.
items
():
kw
[
val
]
=
self
.
_ShapeDescription
[
key
]
kw
[
val
]
=
self
.
_ShapeDescription
[
key
]
if
not
'
Emode
'
in
kw
:
if
'
Emode
'
not
in
kw
:
kw
[
'
Emode
'
]
=
'
Direct
'
kw
[
'
Emode
'
]
=
'
Direct
'
adsrbtn_correctios
=
FlatPlateAbsorption
(
correction_base_ws
,
**
kw
)
adsrbtn_correctios
=
FlatPlateAbsorption
(
correction_base_ws
,
**
kw
)
return
adsrbtn_correctios
return
adsrbtn_correctios
...
@@ -515,7 +514,7 @@ class HollowCylinder(anAbsorptionShape):
...
@@ -515,7 +514,7 @@ class HollowCylinder(anAbsorptionShape):
self
.
shape
=
CylinderParams
self
.
shape
=
CylinderParams
self
.
_CanSetSample
=
False
self
.
_CanSetSample
=
False
self
.
_shape_has_axis
=
True
self
.
_shape_has_axis
=
True
#
@property
@property
def
shape
(
self
):
def
shape
(
self
):
...
@@ -561,7 +560,7 @@ class HollowCylinder(anAbsorptionShape):
...
@@ -561,7 +560,7 @@ class HollowCylinder(anAbsorptionShape):
"""
"""
self
.
_add_xml_hollow_cylinder
(
correction_base_ws
)
self
.
_add_xml_hollow_cylinder
(
correction_base_ws
)
if
not
'
Emode
'
in
kwarg
:
if
'
Emode
'
not
in
kwarg
:
kwarg
[
'
Emode
'
]
=
'
Direct
'
kwarg
[
'
Emode
'
]
=
'
Direct
'
adsrbtn_correctios
=
AbsorptionCorrection
(
correction_base_ws
,
**
kwarg
)
adsrbtn_correctios
=
AbsorptionCorrection
(
correction_base_ws
,
**
kwarg
)
return
adsrbtn_correctios
return
adsrbtn_correctios
...
@@ -662,7 +661,7 @@ class Sphere(anAbsorptionShape):
...
@@ -662,7 +661,7 @@ class Sphere(anAbsorptionShape):
AbsorptionCorrections method is invoked with the parameters provided.
AbsorptionCorrections method is invoked with the parameters provided.
"""
"""
kw
=
kwarg
.
copy
()
kw
=
kwarg
.
copy
()
if
not
'
Emode
'
in
kwarg
:
if
'
Emode
'
not
in
kwarg
:
kw
[
'
Emode
'
]
=
'
Direct
'
kw
[
'
Emode
'
]
=
'
Direct
'
if
kw
[
'
Emode
'
].
lower
()
==
'
elastic
'
:
if
kw
[
'
Emode
'
].
lower
()
==
'
elastic
'
:
adsrbtn_correctios
=
SphericalAbsorption
(
adsrbtn_correctios
=
SphericalAbsorption
(
...
...
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