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
765e6971
Commit
765e6971
authored
Jun 05, 2010
by
Thomas White
Browse files
Bring pattern_sim up to date
parent
31aa8ae2
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/pattern_sim.c
View file @
765e6971
...
...
@@ -320,6 +320,8 @@ int main(int argc, char *argv[])
image
.
lambda
=
ph_en_to_lambda
(
eV_to_J
(
PHOTON_ENERGY
));
/* Wavelength */
cell
=
load_cell_from_pdb
(
filename
);
image
.
filename
=
NULL
;
image
.
features
=
NULL
;
image
.
flags
=
NULL
;
#include
"geometry-lcls.tmp"
...
...
@@ -382,6 +384,7 @@ int main(int argc, char *argv[])
record_image
(
&
image
,
!
config_nonoise
);
if
(
config_nearbragg
)
{
find_projected_peaks
(
&
image
,
cell
);
output_intensities
(
&
image
,
cell
,
NULL
,
1
);
}
...
...
src/peaks.c
View file @
765e6971
...
...
@@ -167,6 +167,9 @@ static int integrate_peak(struct image *image, int xp, int yp,
}
p
=
find_panel
(
&
image
->
det
,
x
+
xp
,
y
+
yp
);
if
(
p
==
NULL
)
{
return
1
;
}
/* Area of one pixel */
pix_area
=
pow
(
1
.
0
/
p
->
res
,
2
.
0
);
...
...
@@ -396,7 +399,7 @@ void dump_peaks(struct image *image, pthread_mutex_t *mutex)
}
static
int
find_projected_peaks
(
struct
image
*
image
,
UnitCell
*
cell
)
int
find_projected_peaks
(
struct
image
*
image
,
UnitCell
*
cell
)
{
int
x
,
y
;
double
ax
,
ay
,
az
;
...
...
@@ -561,8 +564,13 @@ void output_intensities(struct image *image, UnitCell *cell,
struct
imagefeature
*
f
;
/* Wait.. is there a really close feature which was detected? */
f
=
image_feature_closest
(
image
->
features
,
hits
[
i
].
x
,
hits
[
i
].
y
,
&
d
,
&
idx
);
if
(
image
->
features
!=
NULL
)
{
f
=
image_feature_closest
(
image
->
features
,
hits
[
i
].
x
,
hits
[
i
].
y
,
&
d
,
&
idx
);
}
else
{
f
=
NULL
;
}
if
(
(
f
!=
NULL
)
&&
(
d
<
PEAK_REALLY_CLOSE
)
)
{
int
r
;
...
...
src/peaks.h
View file @
765e6971
...
...
@@ -24,5 +24,6 @@ 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
);
extern
int
peak_sanity_check
(
struct
image
*
image
,
UnitCell
*
cell
);
extern
int
find_projected_peaks
(
struct
image
*
image
,
UnitCell
*
cell
);
#endif
/* PEAKS_H */
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