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
e333846c
Commit
e333846c
authored
9 years ago
by
Lynch, Vickie
Browse files
Options
Downloads
Patches
Plain Diff
Refs #14072 clang-format and doxygen fixed
parent
549dbaef
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Framework/Crystal/src/OptimizeLatticeForCellType.cpp
+7
-9
7 additions, 9 deletions
Framework/Crystal/src/OptimizeLatticeForCellType.cpp
Framework/CurveFitting/src/Functions/PawleyFunction.cpp
+15
-24
15 additions, 24 deletions
Framework/CurveFitting/src/Functions/PawleyFunction.cpp
with
22 additions
and
33 deletions
Framework/Crystal/src/OptimizeLatticeForCellType.cpp
+
7
−
9
View file @
e333846c
...
...
@@ -92,7 +92,7 @@ void OptimizeLatticeForCellType::exec() {
runWS
.
push_back
(
ws
);
if
(
perRun
)
{
std
::
vector
<
std
::
pair
<
std
::
string
,
bool
>
>
criteria
;
std
::
vector
<
std
::
pair
<
std
::
string
,
bool
>>
criteria
;
// Sort by run number
criteria
.
push_back
(
std
::
pair
<
std
::
string
,
bool
>
(
"runnumber"
,
true
));
ws
->
sort
(
criteria
);
...
...
@@ -130,8 +130,7 @@ void OptimizeLatticeForCellType::exec() {
IAlgorithm_sptr
fit_alg
;
try
{
fit_alg
=
createChildAlgorithm
(
"Fit"
,
-
1
,
-
1
,
false
);
}
catch
(
Exception
::
NotFoundError
&
)
{
}
catch
(
Exception
::
NotFoundError
&
)
{
g_log
.
error
(
"Can't locate Fit algorithm"
);
throw
;
}
...
...
@@ -155,8 +154,7 @@ void OptimizeLatticeForCellType::exec() {
try
{
ub_alg
=
createChildAlgorithm
(
"FindUBUsingLatticeParameters"
,
-
1
,
-
1
,
false
);
}
catch
(
Exception
::
NotFoundError
&
)
{
}
catch
(
Exception
::
NotFoundError
&
)
{
g_log
.
error
(
"Can't locate FindUBUsingLatticeParameters algorithm"
);
throw
;
}
...
...
@@ -207,9 +205,9 @@ void OptimizeLatticeForCellType::exec() {
runWS
[
i_run
]
->
getName
()
+
".integrate"
);
savePks_alg
->
executeAsChildAlg
();
g_log
.
notice
()
<<
"See output file: "
<<
outputdir
+
"ls"
+
runWS
[
i_run
]
->
getName
()
+
".integrate"
g_log
.
notice
()
<<
"See output file: "
<<
outputdir
+
"ls"
+
runWS
[
i_run
]
->
getName
()
+
".integrate"
<<
"
\n
"
;
// Save UB
Mantid
::
API
::
IAlgorithm_sptr
saveUB_alg
=
...
...
@@ -227,7 +225,7 @@ void OptimizeLatticeForCellType::exec() {
}
//-----------------------------------------------------------------------------------------
/**
@param cell
_t
ype cell type to optimize
@param cell
T
ype cell type to optimize
@param cell unit cell
@return latticeFunction Function for fitting
*/
...
...
This diff is collapsed.
Click to expand it.
Framework/CurveFitting/src/Functions/PawleyFunction.cpp
+
15
−
24
View file @
e333846c
...
...
@@ -120,34 +120,29 @@ void PawleyParameterFunction::setParametersFromUnitCell(const UnitCell &cell) {
try
{
setParameter
(
"b"
,
cell
.
b
());
}
catch
(
std
::
invalid_argument
)
{
}
catch
(
std
::
invalid_argument
)
{
// do nothing.
}
try
{
setParameter
(
"c"
,
cell
.
c
());
}
catch
(
std
::
invalid_argument
)
{
}
catch
(
std
::
invalid_argument
)
{
// do nothing
}
try
{
setParameter
(
"Alpha"
,
cell
.
alpha
());
}
catch
(
std
::
invalid_argument
)
{
}
catch
(
std
::
invalid_argument
)
{
// do nothing.
}
try
{
setParameter
(
"Beta"
,
cell
.
beta
());
}
catch
(
std
::
invalid_argument
)
{
}
catch
(
std
::
invalid_argument
)
{
// do nothing.
}
try
{
setParameter
(
"Gamma"
,
cell
.
gamma
());
}
catch
(
std
::
invalid_argument
)
{
}
catch
(
std
::
invalid_argument
)
{
// do nothing.
}
}
...
...
@@ -208,8 +203,8 @@ void PawleyParameterFunction::setProfileFunction(
*
* @param crystalSystem :: Crystal system, case insensitive.
*/
void
PawleyParameterFunction
::
setCrystalSystem
(
const
std
::
string
&
crystalSystem
)
{
void
PawleyParameterFunction
::
setCrystalSystem
(
const
std
::
string
&
crystalSystem
)
{
m_crystalSystem
=
Geometry
::
getCrystalSystemFromString
(
crystalSystem
);
createCrystalSystemParameters
(
m_crystalSystem
);
...
...
@@ -285,8 +280,8 @@ void PawleyParameterFunction::createCrystalSystemParameters(
}
/// Adds a default constraint so that cell edge lengths can not be less than 0.
void
PawleyParameterFunction
::
addLengthConstraint
(
const
std
::
string
&
parameterName
)
{
void
PawleyParameterFunction
::
addLengthConstraint
(
const
std
::
string
&
parameterName
)
{
BoundaryConstraint
*
cellEdgeConstraint
=
new
BoundaryConstraint
(
this
,
parameterName
,
0.0
,
true
);
cellEdgeConstraint
->
setPenaltyFactor
(
1e12
);
...
...
@@ -294,8 +289,8 @@ PawleyParameterFunction::addLengthConstraint(const std::string ¶meterName) {
}
/// Adds a default constraint so cell angles are in the range 0 to 180.
void
PawleyParameterFunction
::
addAngleConstraint
(
const
std
::
string
&
parameterName
)
{
void
PawleyParameterFunction
::
addAngleConstraint
(
const
std
::
string
&
parameterName
)
{
BoundaryConstraint
*
cellAngleConstraint
=
new
BoundaryConstraint
(
this
,
parameterName
,
0.0
,
180.0
,
true
);
cellAngleConstraint
->
setPenaltyFactor
(
1e12
);
...
...
@@ -376,8 +371,7 @@ void PawleyFunction::setProfileFunction(const std::string &profileFunction) {
newFunction
->
setCentre
(
oldFunction
->
centre
());
try
{
newFunction
->
setFwhm
(
oldFunction
->
fwhm
());
}
catch
(...)
{
}
catch
(...)
{
// do nothing.
}
newFunction
->
setHeight
(
oldFunction
->
height
());
...
...
@@ -478,15 +472,13 @@ void PawleyFunction::function(const FunctionDomain &domain,
try
{
size_t
offset
=
calculateFunctionValues
(
peak
,
domain1D
,
localValues
);
values
.
addToCalculated
(
offset
,
localValues
);
}
catch
(
std
::
invalid_argument
)
{
}
catch
(
std
::
invalid_argument
)
{
// do nothing
}
}
setPeakPositions
(
centreName
,
0.0
,
cell
);
}
catch
(
std
::
bad_cast
)
{
}
catch
(
std
::
bad_cast
)
{
// do nothing
}
}
...
...
@@ -524,8 +516,7 @@ void PawleyFunction::addPeak(const Kernel::V3D &hkl, double fwhm,
try
{
peak
->
setFwhm
(
fwhm
);
}
catch
(...)
{
}
catch
(...)
{
// do nothing.
}
...
...
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