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
155ca006
Commit
155ca006
authored
Feb 04, 2011
by
Thomas White
Browse files
indexamajig: Allow the user to switch off the sanity check if they want
parent
59ae49ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/index.c
View file @
155ca006
...
...
@@ -129,7 +129,8 @@ void map_all_peaks(struct image *image)
void
index_pattern
(
struct
image
*
image
,
UnitCell
*
cell
,
IndexingMethod
*
indm
,
int
cellr
,
int
verbose
,
IndexingPrivate
**
ipriv
)
int
cellr
,
int
verbose
,
IndexingPrivate
**
ipriv
,
int
config_insane
)
{
int
i
;
int
n
=
0
;
...
...
@@ -207,7 +208,8 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm,
if
(
new_cell
==
NULL
)
continue
;
/* Sanity check */
if
(
!
peak_sanity_check
(
image
,
new_cell
,
0
,
0
.
1
)
)
{
if
(
!
config_insane
&&
!
peak_sanity_check
(
image
,
new_cell
,
0
,
0
.
1
)
)
{
STATUS
(
"Failed peak sanity check.
\n
"
);
cell_free
(
new_cell
);
continue
;
...
...
src/index.h
View file @
155ca006
...
...
@@ -51,7 +51,7 @@ extern void map_all_peaks(struct image *image);
extern
void
index_pattern
(
struct
image
*
image
,
UnitCell
*
cell
,
IndexingMethod
*
indm
,
int
cellr
,
int
verbose
,
IndexingPrivate
**
priv
);
IndexingPrivate
**
priv
,
int
config_insane
);
extern
void
cleanup_indexing
(
IndexingPrivate
**
priv
);
...
...
src/indexamajig.c
View file @
155ca006
...
...
@@ -62,6 +62,7 @@ struct static_index_args
int
config_polar
;
int
config_satcorr
;
int
config_closer
;
int
config_insane
;
float
threshold
;
float
min_gradient
;
struct
detector
*
det
;
...
...
@@ -197,6 +198,8 @@ static void show_help(const char *s)
" --no-closer-peak Don't integrate from the location of a nearby peak
\n
"
" instead of the position closest to the reciprocal
\n
"
" lattice point.
\n
"
" --insane Don't check that the reduced cell accounts for at
\n
"
" least 10%% of the located peaks.
\n
"
);
}
...
...
@@ -387,7 +390,8 @@ static void process_image(void *pp, int cookie)
/* Calculate orientation matrix (by magic) */
index_pattern
(
&
image
,
cell
,
indm
,
pargs
->
static_args
.
cellr
,
config_verbose
,
pargs
->
static_args
.
ipriv
);
config_verbose
,
pargs
->
static_args
.
ipriv
,
pargs
->
static_args
.
config_insane
);
/* No cell at this point? Then we're done. */
if
(
image
.
indexed_cell
==
NULL
)
goto
done
;
...
...
@@ -510,6 +514,7 @@ int main(int argc, char *argv[])
int
config_satcorr
=
1
;
int
config_checkprefix
=
1
;
int
config_closer
=
1
;
int
config_insane
=
0
;
float
threshold
=
800
.
0
;
float
min_gradient
=
100000
.
0
;
struct
detector
*
det
;
...
...
@@ -572,6 +577,7 @@ int main(int argc, char *argv[])
{
"no-check-prefix"
,
0
,
&
config_checkprefix
,
0
},
{
"no-closer-peak"
,
0
,
&
config_closer
,
0
},
{
"gpu-dev"
,
1
,
NULL
,
5
},
{
"insane"
,
1
,
&
config_insane
,
1
},
{
0
,
0
,
NULL
,
0
}
};
...
...
@@ -862,6 +868,7 @@ int main(int argc, char *argv[])
qargs
.
static_args
.
config_polar
=
config_polar
;
qargs
.
static_args
.
config_satcorr
=
config_satcorr
;
qargs
.
static_args
.
config_closer
=
config_closer
;
qargs
.
static_args
.
config_insane
=
config_insane
;
qargs
.
static_args
.
cellr
=
cellr
;
qargs
.
static_args
.
threshold
=
threshold
;
qargs
.
static_args
.
min_gradient
=
min_gradient
;
...
...
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