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
b0e61199
Commit
b0e61199
authored
10 years ago
by
Dan Nixon
Browse files
Options
Downloads
Patches
Plain Diff
Added docs page, fix diff out of spec range
Refs #10802
parent
a516aeb6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Mantid/MantidQt/CustomInterfaces/src/DataComparison.cpp
+13
-2
13 additions, 2 deletions
Code/Mantid/MantidQt/CustomInterfaces/src/DataComparison.cpp
Code/Mantid/docs/source/interfaces/DataComparison.rst
+76
-0
76 additions, 0 deletions
Code/Mantid/docs/source/interfaces/DataComparison.rst
with
89 additions
and
2 deletions
Code/Mantid/MantidQt/CustomInterfaces/src/DataComparison.cpp
+
13
−
2
View file @
b0e61199
...
...
@@ -384,11 +384,22 @@ void DataComparison::plotDiffWorkspace()
for
(
int
row
=
0
;
row
<
numRows
;
row
++
)
{
QString
workspaceName
=
m_uiForm
.
twCurrentData
->
item
(
row
,
WORKSPACE_NAME
)
->
text
();
QString
currentSpecName
=
m_uiForm
.
twCurrentData
->
item
(
row
,
CURRENT_SPEC
)
->
text
();
bool
ok
;
if
(
workspaceName
==
m_diffWorkspaceNames
.
first
)
ws1Spec
=
m_uiForm
.
twCurrentData
->
item
(
row
,
CURRENT_SPEC
)
->
text
()
.
toInt
();
ws1Spec
=
currentSpecName
.
toInt
(
&
ok
);
if
(
workspaceName
==
m_diffWorkspaceNames
.
second
)
ws2Spec
=
m_uiForm
.
twCurrentData
->
item
(
row
,
CURRENT_SPEC
)
->
text
().
toInt
();
ws2Spec
=
currentSpecName
.
toInt
(
&
ok
);
// Check that the spectra are not out of range
if
(
!
ok
)
{
// Set info message
QString
infoMessage
=
workspaceName
+
": Index out of range."
;
m_uiForm
.
lbDiffInfo
->
setText
(
infoMessage
);
return
;
}
}
// Extract the current spectrum for both workspaces
...
...
This diff is collapsed.
Click to expand it.
Code/Mantid/docs/source/interfaces/DataComparison.rst
0 → 100644
+
76
−
0
View file @
b0e61199
Data Comparison
===============
.. contents:: Table of Contents
:local:
Overview
--------
.. interface:: Data Comparison
:align: right
The data comparison interface provides a method of comparing the spectra of
multiple :ref:`MatrixWorkspace <MatrixWorkspace>` (either pre loaded into
Mantid or loaded via the interface its self) using a preview plot.
Add Data
--------
.. interface:: Data Comparison
:widget: gbAddData
:align: right
This allows new data to be added to the comparison, this can be added by either
selecting a :ref:`MatrixWorkspace <MatrixWorkspace>` alrady loaded into Mantid
or by selecting a file to load.
Once the data has been selected the *Add Data* button can be used to add it to
the comparison, this will add a curve to the preview plot and assign it the next
unused colour for the curve (if all are in use then black will be used).
Data Table
----------
.. interface:: Data Comparison
:widget: gbCurrentData
:align: right
The data table shows a list of the current data shown on the plot including the
workspace name and currently plotted spectrum index. This also allows the curve
colour to be changed manually.
This also allows a spectrum index offset to be set on a per workspace basis,
this allows workspaces to be aligned relative to each other in the venet that
the spectra that you want to compare do not have the same spectrum index in each
workspace.
The value of the offset for a workspace defines the spectrum index that the
first spectum will line up to relative to the spectrum selection spin box. At
least one offset value must be zero (this is set check for automatically after
an offset value has been changed).
Diff
----
.. interface:: Data Comparison
:widget: gbDiff
:align: right
A diff spectra of two workspaces can be created by selecting two workspaces in
the data table (by holding Ctrl whilst making a selection) and clicking the *Diff
Selected* button, this will subtract the current spectra for the second workspace
selected from the current spectra for the first spectra selected and plot the
result spectra as a green curve on the plot.
If either of the diff workspaces are removed then the diff will be cleared. If
one of the workspaces can no longer be displayed as it is offset from the other
workspace then a messsage will be displayed in the diff tool and no plot will be
shown, however the diff will continue to function once both workspaces can be
displayed again.
The diff workspace is created by running :ref:`ExtractSignleSpectrum
<algm-ExtractSingleSpectrum>` on the two data workspaces and then using
:ref:`Minus <algm-Minus>` to calculate the difference.
.. categories:: Interfaces General
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