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
180365b7
Commit
180365b7
authored
9 years ago
by
Peterson, Peter
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/master' into to_pdfgetn_workflow_algorithm
parents
870aeae0
4e24cdfc
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Framework/MDAlgorithms/src/ConvertToReflectometryQ.cpp
+17
-1
17 additions, 1 deletion
Framework/MDAlgorithms/src/ConvertToReflectometryQ.cpp
MantidQt/MantidWidgets/src/MuonSequentialFitDialog.cpp
+12
-17
12 additions, 17 deletions
MantidQt/MantidWidgets/src/MuonSequentialFitDialog.cpp
with
29 additions
and
18 deletions
Framework/MDAlgorithms/src/ConvertToReflectometryQ.cpp
+
17
−
1
View file @
180365b7
...
...
@@ -353,40 +353,54 @@ void ConvertToReflectometryQ::exec() {
TableWorkspace_sptr
vertexes
=
boost
::
make_shared
<
Mantid
::
DataObjects
::
TableWorkspace
>
();
Progress
transSelectionProg
(
this
,
0.0
,
0.1
,
2
);
if
(
outputAsMDWorkspace
)
{
transSelectionProg
.
report
(
"Choosing Transformation"
);
if
(
transMethod
==
centerTransform
())
{
auto
outputMDWS
=
transform
->
executeMD
(
inputWs
,
bc
);
Progress
transPerformProg
(
this
,
0.1
,
0.7
,
5
);
transPerformProg
.
report
(
"Performed transformation"
);
// Copy ExperimentInfo (instrument, run, sample) to the output WS
ExperimentInfo_sptr
ei
(
inputWs
->
cloneExperimentInfo
());
outputMDWS
->
addExperimentInfo
(
ei
);
outputWS
=
outputMDWS
;
}
else
if
(
transMethod
==
normPolyTransform
())
{
Progress
transPerformProg
(
this
,
0.1
,
0.7
,
5
);
const
bool
dumpVertexes
=
this
->
getProperty
(
"DumpVertexes"
);
auto
vertexesTable
=
vertexes
;
// perform the normalised polygon transformation
transPerformProg
.
report
(
"Performing Transformation"
);
auto
normPolyTrans
=
transform
->
executeNormPoly
(
inputWs
,
vertexesTable
,
dumpVertexes
,
outputDimensions
);
// copy any experiment info from input workspace
normPolyTrans
->
copyExperimentInfoFrom
(
inputWs
.
get
());
// produce MDHistoWorkspace from normPolyTrans workspace.
Progress
outputToMDProg
(
this
,
0.7
,
0.75
,
10
);
auto
outputMDWS
=
transform
->
executeMDNormPoly
(
normPolyTrans
);
ExperimentInfo_sptr
ei
(
normPolyTrans
->
cloneExperimentInfo
());
outputMDWS
->
addExperimentInfo
(
ei
);
outputWS
=
outputMDWS
;
outputToMDProg
.
report
(
"Successfully output to MD"
);
}
else
{
throw
std
::
runtime_error
(
"Unknown rebinning method: "
+
transMethod
);
}
}
else
if
(
transMethod
==
normPolyTransform
())
{
transSelectionProg
.
report
(
"Choosing Transformation"
);
Progress
transPerformProg
(
this
,
0.1
,
0.7
,
5
);
const
bool
dumpVertexes
=
this
->
getProperty
(
"DumpVertexes"
);
auto
vertexesTable
=
vertexes
;
// perform the normalised polygon transformation
transPerformProg
.
report
(
"Performing Transformation"
);
auto
output2DWS
=
transform
->
executeNormPoly
(
inputWs
,
vertexesTable
,
dumpVertexes
,
outputDimensions
);
// copy any experiment info from input workspace
output2DWS
->
copyExperimentInfoFrom
(
inputWs
.
get
());
outputWS
=
output2DWS
;
transPerformProg
.
report
(
"Transformation Complete"
);
}
else
if
(
transMethod
==
centerTransform
())
{
transSelectionProg
.
report
(
"Choosing Transformation"
);
Progress
transPerformProg
(
this
,
0.1
,
0.7
,
5
);
transPerformProg
.
report
(
"Performing Transformation"
);
auto
output2DWS
=
transform
->
execute
(
inputWs
);
output2DWS
->
copyExperimentInfoFrom
(
inputWs
.
get
());
outputWS
=
output2DWS
;
...
...
@@ -397,6 +411,8 @@ void ConvertToReflectometryQ::exec() {
// Execute the transform and bind to the output.
setProperty
(
"OutputWorkspace"
,
outputWS
);
setProperty
(
"OutputVertexes"
,
vertexes
);
Progress
setPropertyProg
(
this
,
0.8
,
1.0
,
2
);
setPropertyProg
.
report
(
"Success"
);
}
}
// namespace Mantid
...
...
This diff is collapsed.
Click to expand it.
MantidQt/MantidWidgets/src/MuonSequentialFitDialog.cpp
+
12
−
17
View file @
180365b7
...
...
@@ -368,28 +368,23 @@ namespace MantidWidgets
MatrixWorkspace_sptr
ws
;
auto
load
=
boost
::
dynamic_pointer_cast
<
AlgorithmProxy
>
(
AlgorithmManager
::
Instance
().
create
(
"MuonLoad"
)
);
load
->
setChild
(
true
);
load
->
setRethrows
(
true
);
load
->
copyPropertiesFrom
(
*
m_loadAlg
);
try
{
try
{
auto
load
=
AlgorithmManager
::
Instance
().
create
(
"MuonLoad"
);
load
->
initialize
();
load
->
setPropertyValue
(
"Filename"
,
fileIt
->
toStdString
()
);
load
->
setPropertyValue
(
"OutputWorkspace"
,
"__YouDontSeeMeIAmNinja"
);
// Is not used
if
(
m_fitPropBrowser
->
rawData
()
)
// TODO: or vice verca?
load
->
setPropertyValue
(
"RebinParams"
,
""
);
load
->
setChild
(
true
);
load
->
setRethrows
(
true
);
load
->
updatePropertyValues
(
*
m_loadAlg
);
load
->
setPropertyValue
(
"Filename"
,
fileIt
->
toStdString
());
load
->
setPropertyValue
(
"OutputWorkspace"
,
"__YouDontSeeMeIAmNinja"
);
if
(
m_fitPropBrowser
->
rawData
())
// TODO: or vice verca?
load
->
setPropertyValue
(
"RebinParams"
,
""
);
load
->
execute
();
ws
=
load
->
getProperty
(
"OutputWorkspace"
);
}
catch
(...)
{
QMessageBox
::
critical
(
this
,
"Loading failed"
,
}
catch
(...)
{
QMessageBox
::
critical
(
this
,
"Loading failed"
,
"Unable to load one of the files.
\n\n
Check log for details"
);
break
;
}
...
...
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