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
6f475e50
Commit
6f475e50
authored
12 years ago
by
Jose Borreguero
Browse files
Options
Downloads
Patches
Plain Diff
Refs #5383 Added check to compare real and imaginary sizes
modified: FFT.cpp
parent
60e8faf7
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
Code/Mantid/Framework/Algorithms/src/FFT.cpp
+7
-2
7 additions, 2 deletions
Code/Mantid/Framework/Algorithms/src/FFT.cpp
with
7 additions
and
2 deletions
Code/Mantid/Framework/Algorithms/src/FFT.cpp
+
7
−
2
View file @
6f475e50
...
@@ -181,8 +181,13 @@ void FFT::exec()
...
@@ -181,8 +181,13 @@ void FFT::exec()
const
int
ySize
=
static_cast
<
int
>
(
inWS
->
blocksize
());
const
int
ySize
=
static_cast
<
int
>
(
inWS
->
blocksize
());
const
int
xSize
=
static_cast
<
int
>
(
X
.
size
());
const
int
xSize
=
static_cast
<
int
>
(
X
.
size
());
if
(
iReal
>=
ySize
)
throw
std
::
invalid_argument
(
"Property Real is out of range"
);
if
(
iReal
>=
ySize
)
throw
std
::
invalid_argument
(
"Property Real is out of range"
);
if
(
isComplex
&&
iImag
>=
ySize
)
throw
std
::
invalid_argument
(
"Property Imaginary is out of range"
);
if
(
isComplex
)
{
const
int
yImagSize
=
static_cast
<
int
>
(
inImagWS
->
blocksize
());
if
(
ySize
!=
yImagSize
)
throw
std
::
length_error
(
"Real and Imaginary sizes do not match"
);
if
(
iImag
>=
ySize
)
throw
std
::
invalid_argument
(
"Property Imaginary is out of range"
);
}
//Check that the x values are evenly spaced
//Check that the x values are evenly spaced
const
double
dx
=
(
X
.
back
()
-
X
.
front
())
/
(
static_cast
<
int
>
(
X
.
size
())
-
1
);
const
double
dx
=
(
X
.
back
()
-
X
.
front
())
/
(
static_cast
<
int
>
(
X
.
size
())
-
1
);
...
...
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