Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Oleksii Turkot
CrystFEL
Commits
99699c2f
Commit
99699c2f
authored
Sep 19, 2010
by
Thomas White
Committed by
Thomas White
Feb 22, 2012
Browse files
process_hkl: Fix progress bar
parent
1757b74c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/process_hkl.c
View file @
99699c2f
...
...
@@ -361,7 +361,7 @@ static void merge_all(FILE *fh, double **pmodel, ReflItemList **pobserved,
float
f0
;
int
n_nof0
=
0
;
int
f0_valid
=
0
;
int
n_patterns
=
1
;
int
n_patterns
=
0
;
double
*
new_pattern
=
new_list_intensity
();
ReflItemList
*
items
=
new_items
();
ReflItemList
*
observed
=
new_items
();
...
...
@@ -396,6 +396,7 @@ static void merge_all(FILE *fh, double **pmodel, ReflItemList **pobserved,
int
r
;
rval
=
fgets
(
line
,
1023
,
fh
);
if
(
rval
==
NULL
)
continue
;
/* And 'break' */
if
(
strcmp
(
line
,
"
\n
"
)
==
0
)
{
/* Assume a default I0 if we don't have one by now */
...
...
@@ -426,14 +427,13 @@ static void merge_all(FILE *fh, double **pmodel, ReflItemList **pobserved,
hist_vals
,
hist_h
,
hist_k
,
hist_l
,
hist_i
,
devs
,
tots
,
means
,
outfh
);
n_patterns
++
;
if
(
n_patterns
==
config_stopafter
)
break
;
progress_bar
(
n_patterns
,
n_total_patterns
,
"Merging"
);
/* Reset for the next pattern */
n_patterns
++
;
clear_items
(
items
);
progress_bar
(
n_patterns
,
n_total_patterns
-
1
,
"Merging"
);
f0_valid
=
0
;
}
...
...
@@ -501,6 +501,7 @@ static int count_patterns(FILE *fh)
char
line
[
1024
];
rval
=
fgets
(
line
,
1023
,
fh
);
if
(
rval
==
NULL
)
continue
;
if
(
(
strncmp
(
line
,
"Reflections from indexing"
,
25
)
==
0
)
||
(
strncmp
(
line
,
"New pattern"
,
11
)
==
0
)
)
{
n_total_patterns
++
;
...
...
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