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
b3570e3e
Commit
b3570e3e
authored
May 13, 2011
by
Gigg, Martyn Anthony
Browse files
Fix a few more algorithms tests. Re #3008
parent
5af72081
Changes
8
Hide whitespace changes
Inline
Side-by-side
Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/GetEi2.h
View file @
b3570e3e
...
...
@@ -90,7 +90,7 @@ namespace Algorithms
/// The input workspace
API
::
MatrixWorkspace_sptr
m_input_ws
;
/// The calculated position of the first peak
std
::
pair
<
int64
_t
,
double
>
m_peak1_pos
;
std
::
pair
<
size
_t
,
double
>
m_peak1_pos
;
/// True if the Ei should be fixed at the guess energy
bool
m_fixedei
;
/// Conversion factor between time and energy
...
...
Code/Mantid/Framework/Algorithms/src/CalculateEfficiency.cpp
View file @
b3570e3e
...
...
@@ -216,12 +216,12 @@ void CalculateEfficiency::normalizeDetectors(MatrixWorkspace_sptr rebinnedWS,
{
// First we mask detectors in the output workspace
mask
->
setProperty
<
MatrixWorkspace_sptr
>
(
"Workspace"
,
outputWS
);
mask
->
setProperty
<
std
::
vector
<
in
t
>
>
(
"SpectraList"
,
dets_to_mask
);
mask
->
setProperty
<
std
::
vector
<
specid_
t
>
>
(
"SpectraList"
,
dets_to_mask
);
mask
->
execute
();
// Then we mask the same detectors in the input workspace
mask
->
setProperty
<
MatrixWorkspace_sptr
>
(
"Workspace"
,
rebinnedWS
);
mask
->
setProperty
<
std
::
vector
<
in
t
>
>
(
"SpectraList"
,
dets_to_mask
);
mask
->
setProperty
<
std
::
vector
<
specid_
t
>
>
(
"SpectraList"
,
dets_to_mask
);
mask
->
execute
();
}
catch
(
std
::
invalid_argument
&
err
)
{
...
...
Code/Mantid/Framework/Algorithms/src/CalculateTransmissionBeamSpreader.cpp
View file @
b3570e3e
...
...
@@ -239,7 +239,7 @@ API::MatrixWorkspace_sptr CalculateTransmissionBeamSpreader::extractSpectrum(API
Algorithm_sptr
childAlg
=
createSubAlgorithm
(
"ExtractSingleSpectrum"
,
0.0
,
0.4
);
childAlg
->
setProperty
<
MatrixWorkspace_sptr
>
(
"InputWorkspace"
,
WS
);
childAlg
->
setProperty
<
int
64_t
>
(
"WorkspaceIndex"
,
index
);
childAlg
->
setProperty
<
int
>
(
"WorkspaceIndex"
,
index
);
childAlg
->
executeAsSubAlg
();
return
childAlg
->
getProperty
(
"OutputWorkspace"
);
}
...
...
Code/Mantid/Framework/Algorithms/src/FindDeadDetectors.cpp
View file @
b3570e3e
...
...
@@ -60,7 +60,7 @@ namespace Mantid
declareProperty
(
"OutputFile"
,
""
,
"A filename to which to write the list of dead detector UDETs"
);
// This output property will contain the list of UDETs for the dead detectors
declareProperty
(
"FoundDead"
,
std
::
vector
<
int64
_t
>
(),
Direction
::
Output
);
declareProperty
(
"FoundDead"
,
std
::
vector
<
detid
_t
>
(),
Direction
::
Output
);
}
/** Executes the algorithm
...
...
@@ -84,7 +84,7 @@ namespace Mantid
const
SpectraDetectorMap
&
specMap
=
integratedWorkspace
->
spectraMap
();
Axis
*
specAxis
=
integratedWorkspace
->
getAxis
(
1
);
std
::
vector
<
int64
_t
>
deadDets
;
std
::
vector
<
detid
_t
>
deadDets
;
int
countSpec
=
0
,
countDets
=
0
;
...
...
Code/Mantid/Framework/Algorithms/src/GetDetectorOffsets.cpp
View file @
b3570e3e
...
...
@@ -147,7 +147,7 @@ namespace Mantid
throw
;
}
fit_alg
->
setProperty
(
"InputWorkspace"
,
inputW
);
fit_alg
->
setProperty
(
"WorkspaceIndex"
,
s
);
fit_alg
->
setProperty
<
int
>
(
"WorkspaceIndex"
,
s
);
fit_alg
->
setProperty
(
"StartX"
,
Xmin
);
fit_alg
->
setProperty
(
"EndX"
,
Xmax
);
fit_alg
->
setProperty
(
"MaxIterations"
,
100
);
...
...
Code/Mantid/Framework/Algorithms/src/GetEi.cpp
View file @
b3570e3e
...
...
@@ -86,8 +86,8 @@ void GetEi::init()
void
GetEi
::
exec
()
{
MatrixWorkspace_const_sptr
inWS
=
getProperty
(
"InputWorkspace"
);
const
int64
_t
mon1Spec
=
getProperty
(
"Monitor1Spec"
);
const
int64
_t
mon2Spec
=
getProperty
(
"Monitor2Spec"
);
const
specid
_t
mon1Spec
=
getProperty
(
"Monitor1Spec"
);
const
specid
_t
mon2Spec
=
getProperty
(
"Monitor2Spec"
);
double
dist2moni0
=
-
1
,
dist2moni1
=
-
1
;
getGeometry
(
inWS
,
mon1Spec
,
mon2Spec
,
dist2moni0
,
dist2moni1
);
...
...
Code/Mantid/Framework/Algorithms/src/GetEi2.cpp
View file @
b3570e3e
...
...
@@ -68,7 +68,7 @@ void GetEi2::init()
"EnergyEstimate property."
);
declareProperty
(
"IncidentEnergy"
,
-
1.0
,
Direction
::
Output
);
declareProperty
(
"FirstMonitorPeak"
,
-
1.0
,
Direction
::
Output
);
declareProperty
(
"FirstMonitorIndex"
,
0
,
Direction
::
Output
);
declareProperty
(
"FirstMonitorIndex"
,
(
size_t
)
0
,
Direction
::
Output
);
declareProperty
(
"Tzero"
,
EMPTY_DBL
(),
Direction
::
Output
);
}
...
...
@@ -106,8 +106,8 @@ void GetEi2::exec()
*/
double
GetEi2
::
calculateEi
(
const
double
initial_guess
)
{
const
int64
_t
monitor1_spec
=
getProperty
(
"Monitor1Spec"
);
const
int64
_t
monitor2_spec
=
getProperty
(
"Monitor2Spec"
);
const
specid
_t
monitor1_spec
=
getProperty
(
"Monitor1Spec"
);
const
specid
_t
monitor2_spec
=
getProperty
(
"Monitor2Spec"
);
//Covert spectrum numbers to workspace indices
std
::
vector
<
specid_t
>
spec_nums
(
2
,
monitor1_spec
);
...
...
@@ -234,8 +234,8 @@ MatrixWorkspace_sptr GetEi2::extractSpectrum(int64_t ws_index, const double star
{
IAlgorithm_sptr
childAlg
=
createSubAlgorithm
(
"CropWorkspace"
);
childAlg
->
setProperty
(
"InputWorkspace"
,
m_input_ws
);
childAlg
->
setProperty
(
"StartWorkspaceIndex"
,
ws_index
);
childAlg
->
setProperty
(
"EndWorkspaceIndex"
,
ws_index
);
childAlg
->
setProperty
<
int
>
(
"StartWorkspaceIndex"
,
ws_index
);
childAlg
->
setProperty
<
int
>
(
"EndWorkspaceIndex"
,
ws_index
);
childAlg
->
setProperty
(
"XMin"
,
start
);
childAlg
->
setProperty
(
"XMax"
,
end
);
childAlg
->
executeAsSubAlg
();
...
...
Code/Mantid/Framework/DataHandling/src/MaskDetectors.cpp
View file @
b3570e3e
...
...
@@ -41,14 +41,14 @@ void MaskDetectors::init()
new
WorkspaceProperty
<>
(
"Workspace"
,
""
,
Direction
::
InOut
),
"The name of the workspace that will be used as input and
\n
"
"output for the algorithm"
);
declareProperty
(
new
ArrayProperty
<
int64
_t
>
(
"SpectraList"
),
declareProperty
(
new
ArrayProperty
<
specid
_t
>
(
"SpectraList"
),
"A comma separated list or array containing a list of spectra to
\n
"
"mask (DetectorList and WorkspaceIndexList are ignored if this
\n
"
"is set)"
);
declareProperty
(
new
ArrayProperty
<
int64
_t
>
(
"DetectorList"
),
declareProperty
(
new
ArrayProperty
<
detid
_t
>
(
"DetectorList"
),
"A comma separated list or array containing a list of detector ID's
\n
"
"to mask (WorkspaceIndexList is ignored if this is set)"
);
declareProperty
(
new
ArrayProperty
<
int64
_t
>
(
"WorkspaceIndexList"
),
declareProperty
(
new
ArrayProperty
<
size
_t
>
(
"WorkspaceIndexList"
),
"A comma separated list or array containing the workspace indices
\n
"
"to mask"
);
declareProperty
(
...
...
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