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
adb532d3
Commit
adb532d3
authored
6 years ago
by
Lynch, Vickie
Browse files
Options
Downloads
Patches
Plain Diff
Refs #24333 add run number to filters
parent
32ed0b2c
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
Framework/Crystal/src/FilterPeaks.cpp
+7
-1
7 additions, 1 deletion
Framework/Crystal/src/FilterPeaks.cpp
with
7 additions
and
1 deletion
Framework/Crystal/src/FilterPeaks.cpp
+
7
−
1
View file @
adb532d3
...
@@ -34,6 +34,10 @@ double QMOD(const Mantid::Geometry::IPeak &p) {
...
@@ -34,6 +34,10 @@ double QMOD(const Mantid::Geometry::IPeak &p) {
double
SN
(
const
Mantid
::
Geometry
::
IPeak
&
p
)
{
double
SN
(
const
Mantid
::
Geometry
::
IPeak
&
p
)
{
return
p
.
getIntensity
()
/
p
.
getSigmaIntensity
();
return
p
.
getIntensity
()
/
p
.
getSigmaIntensity
();
}
}
double
RUN
(
const
Mantid
::
Geometry
::
IPeak
&
p
)
{
return
p
.
getRunNumber
();
}
}
// namespace
}
// namespace
namespace
Mantid
{
namespace
Mantid
{
...
@@ -66,7 +70,7 @@ void FilterPeaks::init() {
...
@@ -66,7 +70,7 @@ void FilterPeaks::init() {
std
::
vector
<
std
::
string
>
filters
{
"h+k+l"
,
"h^2+k^2+l^2"
,
"Intensity"
,
std
::
vector
<
std
::
string
>
filters
{
"h+k+l"
,
"h^2+k^2+l^2"
,
"Intensity"
,
"Signal/Noise"
,
"QMod"
,
"Wavelength"
,
"Signal/Noise"
,
"QMod"
,
"Wavelength"
,
"DSpacing"
,
"TOF"
};
"DSpacing"
,
"TOF"
,
"RunNumber"
};
declareProperty
(
"FilterVariable"
,
""
,
declareProperty
(
"FilterVariable"
,
""
,
boost
::
make_shared
<
StringListValidator
>
(
filters
),
boost
::
make_shared
<
StringListValidator
>
(
filters
),
"The variable on which to filter the peaks"
);
"The variable on which to filter the peaks"
);
...
@@ -150,6 +154,8 @@ FilterPeaks::FilterFunction FilterPeaks::getFilterVariableFunction(
...
@@ -150,6 +154,8 @@ FilterPeaks::FilterFunction FilterPeaks::getFilterVariableFunction(
filterFunction
=
&
SN
;
filterFunction
=
&
SN
;
else
if
(
filterVariable
==
"QMod"
)
else
if
(
filterVariable
==
"QMod"
)
filterFunction
=
&
QMOD
;
filterFunction
=
&
QMOD
;
else
if
(
filterVariable
==
"RunNumber"
)
filterFunction
=
&
RUN
;
else
else
throw
std
::
invalid_argument
(
"Unknown FilterVariable: "
+
filterVariable
);
throw
std
::
invalid_argument
(
"Unknown FilterVariable: "
+
filterVariable
);
return
filterFunction
;
return
filterFunction
;
...
...
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