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
c4f95036
Commit
c4f95036
authored
Jun 27, 2010
by
Thomas White
Committed by
Thomas White
Feb 22, 2012
Browse files
indexamajig: Make SA correction optional (but on by default)
parent
d9dd0cef
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/indexamajig.c
View file @
c4f95036
...
...
@@ -60,6 +60,7 @@ struct process_args
int
config_unpolar
;
int
config_sanity
;
int
config_satcorr
;
int
config_sa
;
struct
detector
*
det
;
IndexingMethod
indm
;
const
double
*
intensities
;
...
...
@@ -129,6 +130,8 @@ static void show_help(const char *s)
" with detected peaks.
\n
"
" --sat-corr Correct values of saturated peaks using a table
\n
"
" included in the HDF5 file.
\n
"
" --no-sa Don't correct for the differing solid angles of
\n
"
" the pixels.
\n
"
"
\n\n
Options for greater performance or verbosity:
\n\n
"
" --verbose Be verbose about indexing.
\n
"
" --gpu Use the GPU to speed up the simulation.
\n
"
...
...
@@ -347,7 +350,8 @@ static void *process_image(void *pargsv)
/* Measure intensities if requested */
if
(
config_nearbragg
)
{
output_intensities
(
&
image
,
image
.
indexed_cell
,
pargs
->
output_mutex
,
config_unpolar
);
pargs
->
output_mutex
,
config_unpolar
,
pargs
->
config_sa
);
}
simage
=
get_simage
(
&
image
,
config_alternate
);
...
...
@@ -413,6 +417,7 @@ int main(int argc, char *argv[])
int
config_unpolar
=
0
;
int
config_sanity
=
0
;
int
config_satcorr
=
0
;
int
config_sa
=
1
;
struct
detector
*
det
;
char
*
geometry
=
NULL
;
IndexingMethod
indm
;
...
...
@@ -454,6 +459,7 @@ int main(int argc, char *argv[])
{
"unpolarized"
,
0
,
&
config_unpolar
,
1
},
{
"check-sanity"
,
0
,
&
config_sanity
,
1
},
{
"sat-corr"
,
0
,
&
config_satcorr
,
1
},
{
"no-sa"
,
0
,
&
config_sa
,
0
},
{
0
,
0
,
NULL
,
0
}
};
...
...
@@ -615,6 +621,7 @@ int main(int argc, char *argv[])
pargs
->
config_unpolar
=
config_unpolar
;
pargs
->
config_sanity
=
config_sanity
;
pargs
->
config_satcorr
=
config_satcorr
;
pargs
->
config_sa
=
config_sa
;
pargs
->
cell
=
cell
;
pargs
->
det
=
det
;
pargs
->
indm
=
indm
;
...
...
src/pattern_sim.c
View file @
c4f95036
...
...
@@ -413,7 +413,7 @@ int main(int argc, char *argv[])
if
(
config_nearbragg
)
{
find_projected_peaks
(
&
image
,
cell
);
output_intensities
(
&
image
,
cell
,
NULL
,
1
);
output_intensities
(
&
image
,
cell
,
NULL
,
1
,
1
);
}
if
(
powder_fn
!=
NULL
)
{
...
...
src/peaks.c
View file @
c4f95036
...
...
@@ -565,7 +565,7 @@ int peak_sanity_check(struct image *image, UnitCell *cell)
void
output_intensities
(
struct
image
*
image
,
UnitCell
*
cell
,
pthread_mutex_t
*
mutex
,
int
unpolar
)
pthread_mutex_t
*
mutex
,
int
unpolar
,
int
sa
)
{
int
i
;
int
n_found
;
...
...
@@ -635,7 +635,7 @@ void output_intensities(struct image *image, UnitCell *cell,
* so instead re-integrate using old coordinates.
* This will produce further revised coordinates. */
r
=
integrate_peak
(
image
,
f
->
x
,
f
->
y
,
&
x
,
&
y
,
&
intensity
,
!
unpolar
,
1
);
&
intensity
,
!
unpolar
,
sa
);
if
(
r
)
{
/* The original peak (which also went through
* integrate_peak(), but with the mangled
...
...
@@ -653,7 +653,7 @@ void output_intensities(struct image *image, UnitCell *cell,
r
=
integrate_peak
(
image
,
image
->
hits
[
i
].
x
,
image
->
hits
[
i
].
y
,
&
x
,
&
y
,
&
intensity
,
!
unpolar
,
1
);
&
x
,
&
y
,
&
intensity
,
!
unpolar
,
sa
);
if
(
r
)
{
/* Plain old ordinary peak veto */
n_veto
++
;
...
...
src/peaks.h
View file @
c4f95036
...
...
@@ -22,7 +22,7 @@
extern
void
search_peaks
(
struct
image
*
image
);
extern
void
dump_peaks
(
struct
image
*
image
,
pthread_mutex_t
*
mutex
);
extern
void
output_intensities
(
struct
image
*
image
,
UnitCell
*
cell
,
pthread_mutex_t
*
mutex
,
int
unpolar
);
pthread_mutex_t
*
mutex
,
int
unpolar
,
int
sa
);
extern
int
peak_sanity_check
(
struct
image
*
image
,
UnitCell
*
cell
);
extern
int
find_projected_peaks
(
struct
image
*
image
,
UnitCell
*
cell
);
...
...
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