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
787cafd0
Commit
787cafd0
authored
Dec 04, 2009
by
Thomas White
Browse files
Specify output filename on command line
parent
6853c7bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/process_hkl.c
View file @
787cafd0
...
...
@@ -39,6 +39,8 @@ static void show_help(const char *s)
"
\n
"
" -h, --help Display this help message.
\n
"
" -i, --input=<filename> Specify input filename (
\"
-
\"
for stdin).
\n
"
" -o, --output=<filename> Specify output filename for merged intensities
\n
"
" (don't specify for no output).
\n
"
"
\n
"
" --max-only Take the integrated intensity to be equal to the
\n
"
" maximum intensity measured for that reflection.
\n
"
...
...
@@ -168,6 +170,7 @@ int main(int argc, char *argv[])
{
int
c
;
char
*
filename
=
NULL
;
char
*
output
=
NULL
;
FILE
*
fh
;
unsigned
int
n_patterns
;
double
*
ref
,
*
trueref
;
...
...
@@ -184,6 +187,7 @@ int main(int argc, char *argv[])
const
struct
option
longopts
[]
=
{
{
"help"
,
0
,
NULL
,
'h'
},
{
"input"
,
1
,
NULL
,
'i'
},
{
"output"
,
1
,
NULL
,
'o'
},
{
"max-only"
,
0
,
&
config_maxonly
,
1
},
{
"output-every"
,
1
,
NULL
,
'e'
},
{
"rvsq"
,
0
,
NULL
,
'r'
},
...
...
@@ -193,7 +197,7 @@ int main(int argc, char *argv[])
};
/* Short options */
while
((
c
=
getopt_long
(
argc
,
argv
,
"hi:e:r"
,
longopts
,
NULL
))
!=
-
1
)
{
while
((
c
=
getopt_long
(
argc
,
argv
,
"hi:e:r
o:
"
,
longopts
,
NULL
))
!=
-
1
)
{
switch
(
c
)
{
case
'h'
:
{
...
...
@@ -206,6 +210,11 @@ int main(int argc, char *argv[])
break
;
}
case
'o'
:
{
output
=
strdup
(
optarg
);
break
;
}
case
'r'
:
{
config_rvsq
=
1
;
break
;
...
...
@@ -304,7 +313,9 @@ int main(int argc, char *argv[])
process_reflections
(
ref
,
trueref
,
counts
,
n_patterns
,
mol
->
cell
,
config_rvsq
,
config_zoneaxis
);
write_reflections
(
"results/reflections.hkl"
,
counts
,
ref
,
0
,
NULL
);
if
(
output
!=
NULL
)
{
write_reflections
(
output
,
counts
,
ref
,
0
,
NULL
);
}
STATUS
(
"There were %u patterns.
\n
"
,
n_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