Skip to content
GitLab
Menu
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
0c14d917
Commit
0c14d917
authored
Jan 08, 2010
by
Thomas White
Browse files
Add option to skip indexing program
parent
5cd70513
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/dirax.c
View file @
0c14d917
...
...
@@ -497,7 +497,7 @@ static void search_peaks(struct image *image)
}
void
index_pattern
(
struct
image
*
image
)
void
index_pattern
(
struct
image
*
image
,
int
no_index
)
{
unsigned
int
opts
;
int
saved_stderr
;
...
...
@@ -506,6 +506,8 @@ void index_pattern(struct image *image)
/* Do peak search and splurge out 'xfel.drx' */
search_peaks
(
image
);
if
(
no_index
)
return
;
saved_stderr
=
dup
(
STDERR_FILENO
);
image
->
dirax_pid
=
forkpty
(
&
image
->
dirax_pty
,
NULL
,
NULL
,
NULL
);
if
(
image
->
dirax_pid
==
-
1
)
{
...
...
src/dirax.h
View file @
0c14d917
...
...
@@ -18,7 +18,7 @@
#endif
extern
void
index_pattern
(
struct
image
*
image
);
extern
void
index_pattern
(
struct
image
*
image
,
int
no_index
);
#endif
/* DIRAX_H */
src/indexamajig.c
View file @
0c14d917
...
...
@@ -36,6 +36,8 @@ static void show_help(const char *s)
"
\n
"
" -i, --input=<filename> Specify file containing list of images to process.
\n
"
" '-' means stdin, which is the default.
\n
"
" --no-index Do everything else (including fine peak search),
\n
"
" but don't invoke the indexing program.
\n
"
"
\n
"
);
}
...
...
@@ -192,16 +194,18 @@ int main(int argc, char *argv[])
char
*
rval
;
int
n_images
;
int
n_hits
;
int
config_noindex
=
0
;
/* Long options */
const
struct
option
longopts
[]
=
{
{
"help"
,
0
,
NULL
,
'h'
},
{
"input"
,
1
,
NULL
,
'i'
},
{
"no-index"
,
0
,
&
config_noindex
,
1
},
{
0
,
0
,
NULL
,
0
}
};
/* Short options */
while
((
c
=
getopt_long
(
argc
,
argv
,
"hi:"
,
longopts
,
NULL
))
!=
-
1
)
{
while
((
c
=
getopt_long
(
argc
,
argv
,
"hi:
w
"
,
longopts
,
NULL
))
!=
-
1
)
{
switch
(
c
)
{
case
'h'
:
{
...
...
@@ -264,12 +268,9 @@ int main(int argc, char *argv[])
hdf5_read
(
hdfile
,
&
image
);
fom
=
image_fom
(
&
image
);
printf
(
"%6i %i
\n
"
,
n_images
,
fom
);
if
(
fom
>
0
)
{
printf
(
"%s
\n
"
,
line
);
index_pattern
(
&
image
);
index_pattern
(
&
image
,
config_noindex
);
n_hits
++
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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