Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CrystFEL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
Oleksii Turkot
CrystFEL
Commits
289c8a77
Commit
289c8a77
authored
13 years ago
by
Thomas White
Committed by
Thomas White
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix arithmetic subtlety in find_panel()
parent
0897d90c
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
libcrystfel/src/detector.c
+5
-2
5 additions, 2 deletions
libcrystfel/src/detector.c
with
5 additions
and
2 deletions
libcrystfel/src/detector.c
+
5
−
2
View file @
289c8a77
...
...
@@ -421,11 +421,14 @@ struct panel *find_panel(struct detector *det, double fs, double ss)
{
int
p
;
/* Fractional pixel coordinates are allowed to be a little further along
* than "== max_{f,s}s" for an integer. */
for
(
p
=
0
;
p
<
det
->
n_panels
;
p
++
)
{
if
(
(
fs
>=
det
->
panels
[
p
].
min_fs
)
&&
(
fs
<=
det
->
panels
[
p
].
max_fs
)
&&
(
fs
<=
det
->
panels
[
p
].
max_fs
+
1
)
&&
(
ss
>=
det
->
panels
[
p
].
min_ss
)
&&
(
ss
<=
det
->
panels
[
p
].
max_ss
)
)
{
&&
(
ss
<=
det
->
panels
[
p
].
max_ss
+
1
)
)
{
return
&
det
->
panels
[
p
];
}
}
...
...
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