Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
ea07eba3
Commit
ea07eba3
authored
Aug 08, 2018
by
Lynch, Vickie
Browse files
Refs #22420 clang-format
parent
b90fd971
Changes
12
Hide whitespace changes
Inline
Side-by-side
Framework/Crystal/inc/MantidCrystal/FindUBUsingIndexedPeakswithSatellites.h
View file @
ea07eba3
#ifndef MANTID_CRYSTAL_FIND_UB_USING_INDEXED_PEAKS_WITH_SATELLITES_H_
#define MANTID_CRYSTAL_FIND_UB_USING_INDEXED_PEAKS_WITH_SATELLITES_H_
#include
"MantidKernel/System.h"
#include
"MantidAPI/Algorithm.h"
#include
"MantidGeometry/Crystal/OrientedLattice.h"
#include
"MantidKernel/System.h"
namespace
Mantid
{
namespace
Crystal
{
...
...
@@ -64,7 +64,7 @@ private:
/// Run the algorithm
void
exec
()
override
;
void
logLattice
(
Geometry
::
OrientedLattice
&
o_lattice
,
int
&
ModDim
);
void
logLattice
(
Geometry
::
OrientedLattice
&
o_lattice
,
int
&
ModDim
);
int
getModulationDimension
(
Kernel
::
V3D
&
mnp
);
};
...
...
Framework/Crystal/inc/MantidCrystal/IndexPeakswithSatellites.h
View file @
ea07eba3
#ifndef MANTID_CRYSTAL_INDEX_PEAKS_WITH_SATELLITES_H_
#define MANTID_CRYSTAL_INDEX_PEAKS_WITH_SATELLITES_H_
#include
"MantidKernel/System.h"
#include
"MantidAPI/Algorithm.h"
#include
"MantidKernel/System.h"
namespace
Mantid
{
namespace
Crystal
{
...
...
Framework/Crystal/inc/MantidCrystal/PredictSatellitePeaks.h
View file @
ea07eba3
#ifndef MANTID_CRYSTAL_PREDICTSATELLITEPEAKS_H_
#define MANTID_CRYSTAL_PREDICTSATELLITEPEAKS_H_
#include
"MantidKernel/System.h"
#include
"MantidAPI/Algorithm.h"
#include
"MantidGeometry/Crystal/HKLFilterWavelength.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidAPI/IPeaksWorkspace.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidGeometry/Crystal/HKLFilterWavelength.h"
#include
"MantidKernel/System.h"
namespace
Mantid
{
namespace
Crystal
{
...
...
Framework/Crystal/inc/MantidCrystal/SaveIsawPeaks.h
View file @
ea07eba3
...
...
@@ -48,7 +48,8 @@ private:
double
&
ysize
);
bool
bankMasked
(
Geometry
::
IComponent_const_sptr
parent
,
const
Geometry
::
DetectorInfo
&
detectorInfo
);
void
writeOffsets
(
std
::
ofstream
&
out
,
double
qSign
,
std
::
vector
<
double
>
offset
);
void
writeOffsets
(
std
::
ofstream
&
out
,
double
qSign
,
std
::
vector
<
double
>
offset
);
Geometry
::
Instrument_const_sptr
inst
;
};
...
...
Framework/Crystal/src/FindUBUsingIndexedPeakswithSatellites.cpp
View file @
ea07eba3
...
...
@@ -8,12 +8,12 @@
//
#include
"MantidCrystal/FindUBUsingIndexedPeakswithSatellites.h"
#include
"MantidAPI/Sample.h"
#include
"MantidDataObjects/Peak.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidGeometry/Crystal/IndexingUtils.h"
#include
"MantidGeometry/Crystal/OrientedLattice.h"
#include
"MantidKernel/BoundedValidator.h"
#include
"MantidAPI/Sample.h"
namespace
Mantid
{
namespace
Crystal
{
...
...
@@ -108,8 +108,8 @@ void FindUBUsingIndexedPeakswithSatellites::exec() {
int
num_indexed
=
IndexingUtils
::
NumberIndexed
(
UB
,
q_vectors
,
tolerance
);
std
::
stringstream
stream
;
stream
<<
"New UB will index "
<<
num_indexed
<<
" main Peaks out of "
<<
n_peaks
<<
" with tolerance "
<<
tolerance
<<
"
\n
"
;
stream
<<
"New UB will index "
<<
num_indexed
<<
" main Peaks out of "
<<
n_peaks
<<
" with tolerance "
<<
tolerance
<<
"
\n
"
;
g_log
.
notice
(
stream
.
str
());
OrientedLattice
o_lattice
;
...
...
@@ -123,28 +123,26 @@ void FindUBUsingIndexedPeakswithSatellites::exec() {
ws
->
mutableSample
().
setOrientedLattice
(
&
o_lattice
);
}
}
void
FindUBUsingIndexedPeakswithSatellites
::
logLattice
(
OrientedLattice
&
o_lattice
,
int
&
ModDim
)
{
// Show the modified lattice parameters
g_log
.
notice
()
<<
o_lattice
<<
"
\n
"
;
g_log
.
notice
()
<<
"Modulation Dimension is: "
<<
ModDim
<<
"
\n
"
;
for
(
int
i
=
0
;
i
<
ModDim
;
i
++
)
{
g_log
.
notice
()
<<
"Modulation Vector 1: "
<<
o_lattice
.
getModVec
(
i
)
<<
"
\n
"
;
g_log
.
notice
()
<<
"Modulation Vector 1 error: "
<<
o_lattice
.
getVecErr
(
i
)
<<
"
\n
"
;
void
FindUBUsingIndexedPeakswithSatellites
::
logLattice
(
OrientedLattice
&
o_lattice
,
int
&
ModDim
)
{
// Show the modified lattice parameters
g_log
.
notice
()
<<
o_lattice
<<
"
\n
"
;
g_log
.
notice
()
<<
"Modulation Dimension is: "
<<
ModDim
<<
"
\n
"
;
for
(
int
i
=
0
;
i
<
ModDim
;
i
++
)
{
g_log
.
notice
()
<<
"Modulation Vector 1: "
<<
o_lattice
.
getModVec
(
i
)
<<
"
\n
"
;
g_log
.
notice
()
<<
"Modulation Vector 1 error: "
<<
o_lattice
.
getVecErr
(
i
)
<<
"
\n
"
;
}
}
int
FindUBUsingIndexedPeakswithSatellites
::
getModulationDimension
(
V3D
&
mnp
)
{
int
ModDim
=
0
;
if
(
mnp
[
0
]
!=
0
&&
ModDim
==
0
)
ModDim
=
1
;
if
(
mnp
[
1
]
!=
0
&&
ModDim
==
1
)
ModDim
=
2
;
if
(
mnp
[
2
]
!=
0
&&
ModDim
==
2
)
ModDim
=
3
;
return
ModDim
;
}
}
// namespace Mantid
int
FindUBUsingIndexedPeakswithSatellites
::
getModulationDimension
(
V3D
&
mnp
)
{
int
ModDim
=
0
;
if
(
mnp
[
0
]
!=
0
&&
ModDim
==
0
)
ModDim
=
1
;
if
(
mnp
[
1
]
!=
0
&&
ModDim
==
1
)
ModDim
=
2
;
if
(
mnp
[
2
]
!=
0
&&
ModDim
==
2
)
ModDim
=
3
;
return
ModDim
;
}
}
// namespace Crystal
}
// namespace Mantid
Framework/Crystal/src/IndexPeakswithSatellites.cpp
View file @
ea07eba3
#include
"MantidCrystal/IndexPeakswithSatellites.h"
#include
"MantidAPI/Run.h"
#include
"MantidAPI/Sample.h"
#include
"MantidAPI/WorkspaceFactory.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidGeometry/Crystal/BasicHKLFilters.h"
#include
"MantidGeometry/Crystal/HKLFilterWavelength.h"
#include
"MantidGeometry/Crystal/HKLGenerator.h"
#include
"MantidGeometry/Crystal/IndexingUtils.h"
#include
"MantidGeometry/Crystal/OrientedLattice.h"
#include
"MantidGeometry/Objects/InstrumentRayTracer.h"
#include
"MantidKernel/ArrayLengthValidator.h"
#include
"MantidKernel/ArrayProperty.h"
#include
"MantidKernel/BoundedValidator.h"
#include
"MantidAPI/Sample.h"
#include
"MantidKernel/Quat.h"
#include
"MantidKernel/EigenConversionHelpers.h"
#include
"MantidKernel/EnabledWhenProperty.h"
#include
"MantidKernel/Quat.h"
#include
<Eigen/Geometry>
#include
<algorithm>
#include
<cmath>
#include
<boost/math/special_functions/round.hpp>
#include
<boost/numeric/conversion/cast.hpp>
#include
<cmath>
#include
<stdexcept>
#include
<Eigen/Geometry>
#include
"MantidAPI/Sample.h"
#include
"MantidAPI/WorkspaceFactory.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidGeometry/Crystal/OrientedLattice.h"
#include
"MantidGeometry/Objects/InstrumentRayTracer.h"
#include
"MantidKernel/ArrayProperty.h"
#include
"MantidKernel/ArrayLengthValidator.h"
#include
"MantidKernel/EnabledWhenProperty.h"
#include
"MantidAPI/Run.h"
#include
"MantidGeometry/Crystal/BasicHKLFilters.h"
#include
"MantidGeometry/Crystal/HKLFilterWavelength.h"
#include
"MantidGeometry/Crystal/HKLGenerator.h"
#include
<boost/math/special_functions/round.hpp>
namespace
Mantid
{
using
namespace
Mantid
::
DataObjects
;
...
...
@@ -98,10 +94,9 @@ void IndexPeakswithSatellites::init() {
Direction
::
Output
),
"Gets set with the average HKL indexing error of Satellite Peaks."
);
declareProperty
(
make_unique
<
PropertyWithValue
<
bool
>>
(
"CrossTerms"
,
false
,
Direction
::
Input
),
declareProperty
(
make_unique
<
PropertyWithValue
<
bool
>>
(
"CrossTerms"
,
false
,
Direction
::
Input
),
"Include cross terms (false)"
);
}
/** Execute the algorithm.
...
...
@@ -153,11 +148,11 @@ void IndexPeakswithSatellites::exec() {
double
total_error
=
0
;
// get list of run numbers in this peaks workspace
std
::
unordered_set
<
int
>
run_numbers
;
std
::
unordered_set
<
int
>
run_numbers
;
for
(
Peak
peak
:
peaks
)
{
run_numbers
.
insert
(
peak
.
getRunNumber
());
}
for
(
Peak
peak
:
peaks
)
{
run_numbers
.
insert
(
peak
.
getRunNumber
());
}
// index the peaks for each run separately, using a UB matrix optimized for
// that run
...
...
@@ -233,7 +228,7 @@ void IndexPeakswithSatellites::exec() {
}
size_t
miller_index_counter
=
0
;
for
(
Peak
peak
:
peaks
)
{
if
(
peak
.
getRunNumber
()
==
run
)
{
peak
.
setHKL
(
miller_indices
[
miller_index_counter
]);
...
...
@@ -371,5 +366,5 @@ void IndexPeakswithSatellites::exec() {
setProperty
(
"SatelliteError"
,
satellite_error
);
}
}
// namespace Mantid
}
// namespace Crystal
}
// namespace Mantid
Framework/Crystal/src/PredictSatellitePeaks.cpp
View file @
ea07eba3
/*
* PredictSatellitePeaks.cpp
*
* Created on: July 15, 2018
* Author: Vickie Lynch
*/
* PredictSatellitePeaks.cpp
*
* Created on: July 15, 2018
* Author: Vickie Lynch
*/
#include
"MantidCrystal/PredictSatellitePeaks.h"
#include
"MantidAPI/Run.h"
#include
"MantidAPI/Sample.h"
#include
"MantidAPI/WorkspaceFactory.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidGeometry/Crystal/BasicHKLFilters.h"
#include
"MantidGeometry/Crystal/HKLGenerator.h"
#include
"MantidGeometry/Crystal/OrientedLattice.h"
#include
"MantidGeometry/Objects/InstrumentRayTracer.h"
#include
"MantidKernel/ArrayProperty.h"
#include
"MantidKernel/ArrayLengthValidator.h"
#include
"MantidKernel/ArrayProperty.h"
#include
"MantidKernel/EnabledWhenProperty.h"
#include
"MantidAPI/Run.h"
#include
"MantidGeometry/Crystal/BasicHKLFilters.h"
#include
"MantidGeometry/Crystal/HKLGenerator.h"
#include
<boost/math/special_functions/round.hpp>
namespace
Mantid
{
...
...
@@ -57,9 +57,10 @@ void PredictSatellitePeaks::init() {
"IncludeIntegerHKL"
,
true
,
"If false order 0 peaks are not included in workspace (integer HKL)"
);
declareProperty
(
"IncludeAllPeaksInRange"
,
false
,
"If false only offsets from "
"peaks from Peaks workspace "
"in input are used"
);
declareProperty
(
"IncludeAllPeaksInRange"
,
false
,
"If false only offsets from "
"peaks from Peaks workspace "
"in input are used"
);
declareProperty
(
make_unique
<
PropertyWithValue
<
double
>>
(
"WavelengthMin"
,
0.1
,
Direction
::
Input
),
...
...
Framework/Crystal/src/SaveIsawPeaks.cpp
View file @
ea07eba3
...
...
@@ -283,7 +283,6 @@ void SaveIsawPeaks::exec() {
writeOffsets
(
out
,
qSign
,
offset2
);
writeOffsets
(
out
,
qSign
,
offset3
);
out
<<
"
\n
"
;
}
int
maxPeakNumb
=
0
;
int
appendPeakNumb
=
0
;
...
...
@@ -537,7 +536,8 @@ void SaveIsawPeaks::sizeBanks(std::string bankName, int &NCOLS, int &NROWS,
ysize
=
first
->
getDistance
(
*
last
);
}
}
void
SaveIsawPeaks
::
writeOffsets
(
std
::
ofstream
&
out
,
double
qSign
,
std
::
vector
<
double
>
offset
)
{
void
SaveIsawPeaks
::
writeOffsets
(
std
::
ofstream
&
out
,
double
qSign
,
std
::
vector
<
double
>
offset
)
{
for
(
size_t
i
=
0
;
i
<
3
;
i
++
)
{
out
<<
std
::
setw
(
12
)
<<
std
::
fixed
<<
std
::
setprecision
(
6
)
<<
qSign
*
offset
[
i
]
<<
" "
;
...
...
Framework/Crystal/test/FindUBUsingIndexedPeakswithSatellitesTest.h
View file @
ea07eba3
...
...
@@ -8,22 +8,22 @@
#ifndef FINDUBUSINGINDEXEDPEAKSWITHSATELLITESTEST_H_
#define FINDUBUSINGINDEXEDPEAKSWITHSATELLITESTEST_H_
#include
<cxxtest/TestSuite.h>
#include
"MantidKernel/Timer.h"
#include
"MantidKernel/System.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidCrystal/LoadIsawUB.h"
#include
"MantidCrystal/PredictSatellitePeaks.h"
#include
"MantidCrystal/FindUBUsingIndexedPeakswithSatellites.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/FrameworkManager.h"
#include
"MantidTestHelpers/ComponentCreationHelper.h"
#include
"MantidCrystal/FindUBUsingIndexedPeaks.h"
#include
"MantidDataHandling/LoadNexusProcessed.h"
#include
"MantidAPI/Run.h"
#include
"MantidAPI/Sample.h"
#include
"MantidGeometry/Crystal/OrientedLattice.h"
#include
"MantidCrystal/CalculateUMatrix.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidCrystal/FindUBUsingIndexedPeaks.h"
#include
"MantidCrystal/FindUBUsingIndexedPeakswithSatellites.h"
#include
"MantidCrystal/LoadIsawUB.h"
#include
"MantidCrystal/PredictSatellitePeaks.h"
#include
"MantidDataHandling/LoadNexusProcessed.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidGeometry/Crystal/OrientedLattice.h"
#include
"MantidKernel/System.h"
#include
"MantidKernel/Timer.h"
#include
"MantidTestHelpers/ComponentCreationHelper.h"
#include
<cxxtest/TestSuite.h>
using
namespace
Mantid
::
Crystal
;
using
namespace
Mantid
::
API
;
...
...
Framework/Crystal/test/IndexPeakswithSatellitesTest.h
View file @
ea07eba3
...
...
@@ -8,18 +8,18 @@
#ifndef INDEXPEAKSWITHSATELLITESTEST_H_
#define INDEXPEAKSWITHSATELLITESTEST_H_
#include
<cxxtest/TestSuite.h>
#include
"MantidKernel/Timer.h"
#include
"MantidKernel/System.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidCrystal/LoadIsawUB.h"
#include
"MantidCrystal/PredictSatellitePeaks.h"
#include
"MantidCrystal/IndexPeakswithSatellites.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/FrameworkManager.h"
#include
"MantidTestHelpers/ComponentCreationHelper.h"
#include
"MantidAPI/Run.h"
#include
"MantidCrystal/CalculateUMatrix.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidCrystal/IndexPeakswithSatellites.h"
#include
"MantidCrystal/LoadIsawUB.h"
#include
"MantidCrystal/PredictSatellitePeaks.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidKernel/System.h"
#include
"MantidKernel/Timer.h"
#include
"MantidTestHelpers/ComponentCreationHelper.h"
#include
<cxxtest/TestSuite.h>
using
namespace
Mantid
::
Crystal
;
using
namespace
Mantid
::
API
;
...
...
Framework/Crystal/test/PredictSatellitePeaksTest.h
View file @
ea07eba3
...
...
@@ -8,19 +8,19 @@
#ifndef PREDICTSATELLITEPEAKSTEST_H_
#define PREDICTSATELLITEPEAKSTEST_H_
#include
<cxxtest/TestSuite.h>
#include
"MantidKernel/Timer.h"
#include
"MantidKernel/System.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidCrystal/LoadIsawUB.h"
#include
"MantidCrystal/IndexPeaks.h"
#include
"MantidCrystal/PredictSatellitePeaks.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidAPI/FrameworkManager.h"
#include
"MantidTestHelpers/ComponentCreationHelper.h"
#include
"MantidAPI/Run.h"
#include
"MantidCrystal/CalculateUMatrix.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidCrystal/IndexPeaks.h"
#include
"MantidCrystal/LoadIsawUB.h"
#include
"MantidCrystal/PredictSatellitePeaks.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidGeometry/Instrument/Goniometer.h"
#include
"MantidKernel/System.h"
#include
"MantidKernel/Timer.h"
#include
"MantidTestHelpers/ComponentCreationHelper.h"
#include
<cxxtest/TestSuite.h>
using
namespace
Mantid
::
Crystal
;
using
namespace
Mantid
::
API
;
...
...
Framework/DataObjects/src/Peak.cpp
View file @
ea07eba3
...
...
@@ -30,7 +30,7 @@ Peak::Peak()
m_finalEnergy
(
0.
),
m_GoniometerMatrix
(
3
,
3
,
true
),
m_InverseGoniometerMatrix
(
3
,
3
,
true
),
m_runNumber
(
0
),
m_monitorCount
(
0
),
m_row
(
-
1
),
m_col
(
-
1
),
m_orig_H
(
0
),
m_orig_K
(
0
),
m_orig_L
(
0
),
m_peakNumber
(
0
),
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{
{
0
,
0
,
0
}
},
m_peakNumber
(
0
),
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{{
0
,
0
,
0
}},
m_peakShape
(
boost
::
make_shared
<
NoShape
>
())
{
convention
=
Kernel
::
ConfigService
::
Instance
().
getString
(
"Q.convention"
);
}
...
...
@@ -52,7 +52,7 @@ Peak::Peak(const Geometry::Instrument_const_sptr &m_inst,
m_binCount
(
0
),
m_GoniometerMatrix
(
3
,
3
,
true
),
m_InverseGoniometerMatrix
(
3
,
3
,
true
),
m_runNumber
(
0
),
m_monitorCount
(
0
),
m_orig_H
(
0
),
m_orig_K
(
0
),
m_orig_L
(
0
),
m_peakNumber
(
0
),
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{
{
0
,
0
,
0
}
},
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{{
0
,
0
,
0
}},
m_peakShape
(
boost
::
make_shared
<
NoShape
>
())
{
convention
=
Kernel
::
ConfigService
::
Instance
().
getString
(
"Q.convention"
);
this
->
setInstrument
(
m_inst
);
...
...
@@ -80,7 +80,7 @@ Peak::Peak(const Geometry::Instrument_const_sptr &m_inst,
m_binCount
(
0
),
m_GoniometerMatrix
(
goniometer
),
m_InverseGoniometerMatrix
(
goniometer
),
m_runNumber
(
0
),
m_monitorCount
(
0
),
m_orig_H
(
0
),
m_orig_K
(
0
),
m_orig_L
(
0
),
m_peakNumber
(
0
),
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{
{
0
,
0
,
0
}
},
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{{
0
,
0
,
0
}},
m_peakShape
(
boost
::
make_shared
<
NoShape
>
())
{
convention
=
Kernel
::
ConfigService
::
Instance
().
getString
(
"Q.convention"
);
if
(
fabs
(
m_InverseGoniometerMatrix
.
Invert
())
<
1e-8
)
...
...
@@ -104,7 +104,7 @@ Peak::Peak(const Geometry::Instrument_const_sptr &m_inst, int m_detectorID,
m_binCount
(
0
),
m_GoniometerMatrix
(
3
,
3
,
true
),
m_InverseGoniometerMatrix
(
3
,
3
,
true
),
m_runNumber
(
0
),
m_monitorCount
(
0
),
m_orig_H
(
0
),
m_orig_K
(
0
),
m_orig_L
(
0
),
m_peakNumber
(
0
),
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{
{
0
,
0
,
0
}
},
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{{
0
,
0
,
0
}},
m_peakShape
(
boost
::
make_shared
<
NoShape
>
())
{
convention
=
Kernel
::
ConfigService
::
Instance
().
getString
(
"Q.convention"
);
this
->
setInstrument
(
m_inst
);
...
...
@@ -127,7 +127,7 @@ Peak::Peak(const Geometry::Instrument_const_sptr &m_inst, int m_detectorID,
m_sigmaIntensity
(
0
),
m_binCount
(
0
),
m_GoniometerMatrix
(
3
,
3
,
true
),
m_InverseGoniometerMatrix
(
3
,
3
,
true
),
m_runNumber
(
0
),
m_monitorCount
(
0
),
m_orig_H
(
0
),
m_orig_K
(
0
),
m_orig_L
(
0
),
m_peakNumber
(
0
),
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{
{
0
,
0
,
0
}
},
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{{
0
,
0
,
0
}},
m_peakShape
(
boost
::
make_shared
<
NoShape
>
())
{
convention
=
Kernel
::
ConfigService
::
Instance
().
getString
(
"Q.convention"
);
this
->
setInstrument
(
m_inst
);
...
...
@@ -152,7 +152,7 @@ Peak::Peak(const Geometry::Instrument_const_sptr &m_inst, int m_detectorID,
m_sigmaIntensity
(
0
),
m_binCount
(
0
),
m_GoniometerMatrix
(
goniometer
),
m_InverseGoniometerMatrix
(
goniometer
),
m_runNumber
(
0
),
m_monitorCount
(
0
),
m_orig_H
(
0
),
m_orig_K
(
0
),
m_orig_L
(
0
),
m_peakNumber
(
0
),
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{
{
0
,
0
,
0
}
},
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{{
0
,
0
,
0
}},
m_peakShape
(
boost
::
make_shared
<
NoShape
>
())
{
convention
=
Kernel
::
ConfigService
::
Instance
().
getString
(
"Q.convention"
);
if
(
fabs
(
m_InverseGoniometerMatrix
.
Invert
())
<
1e-8
)
...
...
@@ -176,7 +176,7 @@ Peak::Peak(const Geometry::Instrument_const_sptr &m_inst, double scattering,
m_binCount
(
0
),
m_GoniometerMatrix
(
3
,
3
,
true
),
m_InverseGoniometerMatrix
(
3
,
3
,
true
),
m_runNumber
(
0
),
m_monitorCount
(
0
),
m_row
(
-
1
),
m_col
(
-
1
),
m_orig_H
(
0
),
m_orig_K
(
0
),
m_orig_L
(
0
),
m_peakNumber
(
0
),
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{
{
0
,
0
,
0
}
},
m_peakNumber
(
0
),
m_modulatedStructure
(
V3D
(
0
,
0
,
0
)),
m_intHKL
{{
0
,
0
,
0
}},
m_peakShape
(
boost
::
make_shared
<
NoShape
>
())
{
convention
=
Kernel
::
ConfigService
::
Instance
().
getString
(
"Q.convention"
);
this
->
setInstrument
(
m_inst
);
...
...
@@ -206,8 +206,8 @@ Peak::Peak(const Peak &other)
samplePos
(
other
.
samplePos
),
detPos
(
other
.
detPos
),
m_orig_H
(
other
.
m_orig_H
),
m_orig_K
(
other
.
m_orig_K
),
m_orig_L
(
other
.
m_orig_L
),
m_peakNumber
(
other
.
m_peakNumber
),
m_modulatedStructure
(
other
.
m_modulatedStructure
),
m_intHKL
(
other
.
m_intHKL
),
m_detIDs
(
other
.
m_detIDs
),
m_modulatedStructure
(
other
.
m_modulatedStructure
),
m_intHKL
(
other
.
m_intHKL
),
m_detIDs
(
other
.
m_detIDs
),
m_peakShape
(
other
.
m_peakShape
->
clone
()),
convention
(
other
.
convention
)
{}
//----------------------------------------------------------------------------------------------
...
...
@@ -228,8 +228,11 @@ Peak::Peak(const Geometry::IPeak &ipeak)
m_runNumber
(
ipeak
.
getRunNumber
()),
m_monitorCount
(
ipeak
.
getMonitorCount
()),
m_row
(
ipeak
.
getRow
()),
m_col
(
ipeak
.
getCol
()),
m_orig_H
(
0.
),
m_orig_K
(
0.
),
m_orig_L
(
0.
),
m_peakNumber
(
ipeak
.
getPeakNumber
()),
m_modulatedStructure
(
ipeak
.
getIntMNP
()),
m_intHKL
{
{
static_cast
<
int
>
(
ipeak
.
getIntHKL
()[
0
]),
static_cast
<
int
>
(
ipeak
.
getIntHKL
()[
1
]),
static_cast
<
int
>
(
ipeak
.
getIntHKL
()[
2
])}
},
m_peakNumber
(
ipeak
.
getPeakNumber
()),
m_modulatedStructure
(
ipeak
.
getIntMNP
()),
m_intHKL
{{
static_cast
<
int
>
(
ipeak
.
getIntHKL
()[
0
]),
static_cast
<
int
>
(
ipeak
.
getIntHKL
()[
1
]),
static_cast
<
int
>
(
ipeak
.
getIntHKL
()[
2
])}},
m_peakShape
(
boost
::
make_shared
<
NoShape
>
())
{
convention
=
Kernel
::
ConfigService
::
Instance
().
getString
(
"Q.convention"
);
if
(
fabs
(
m_InverseGoniometerMatrix
.
Invert
())
<
1e-8
)
...
...
@@ -828,7 +831,8 @@ void Peak::setHKL(const Mantid::Kernel::V3D &HKL) {
* @param HKL :: vector with integer x,y,z -> h,k,l
*/
void
Peak
::
setIntHKL
(
const
Mantid
::
Kernel
::
V3D
&
HKL
)
{
m_intHKL
=
{
boost
::
math
::
iround
(
HKL
.
X
()),
boost
::
math
::
iround
(
HKL
.
Y
()),
boost
::
math
::
iround
(
HKL
.
Z
())};
m_intHKL
=
{
boost
::
math
::
iround
(
HKL
.
X
()),
boost
::
math
::
iround
(
HKL
.
Y
()),
boost
::
math
::
iround
(
HKL
.
Z
())};
}
//----------------------------------------------------------------------------------------------
...
...
@@ -947,7 +951,9 @@ void Peak::setPeakNumber(int m_peakNumber) {
// -------------------------------------------------------------------------------------
/** Sets the modulated peak structure number
* @param m_modulatedStructure :: modulated peak structure value */
void
Peak
::
setIntMNP
(
V3D
modulatedStructure
)
{
this
->
m_modulatedStructure
=
modulatedStructure
;
}
void
Peak
::
setIntMNP
(
V3D
modulatedStructure
)
{
this
->
m_modulatedStructure
=
modulatedStructure
;
}
// -------------------------------------------------------------------------------------
/** Return the detector position vector */
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment