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
e3d41026
Commit
e3d41026
authored
Feb 19, 2010
by
Thomas White
Browse files
Push particle size display up to top level
parent
fc02994d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/diffraction-gpu.c
View file @
e3d41026
...
...
@@ -140,7 +140,6 @@ void get_diffraction_gpu(struct image *image, int na, int nb, int nc,
double
ax
,
ay
,
az
;
double
bx
,
by
,
bz
;
double
cx
,
cy
,
cz
;
double
a
,
b
,
c
,
d
;
float
kc
;
const
size_t
dims
[
2
]
=
{
1024
,
1024
};
cl_event
event_d
;
...
...
@@ -176,11 +175,6 @@ void get_diffraction_gpu(struct image *image, int na, int nb, int nc,
cell
[
3
]
=
bx
;
cell
[
4
]
=
by
;
cell
[
5
]
=
bz
;
cell
[
6
]
=
cx
;
cell
[
7
]
=
cy
;
cell
[
8
]
=
cz
;
cell_get_parameters
(
image
->
molecule
->
cell
,
&
a
,
&
b
,
&
c
,
&
d
,
&
d
,
&
d
);
STATUS
(
"Particle size = %i x %i x %i (=%5.2f x %5.2f x %5.2f nm)
\n
"
,
na
,
nb
,
nc
,
na
*
a
/
1.0e-9
,
nb
*
b
/
1.0e-9
,
nc
*
c
/
1.0e-9
);
err
=
clGetPlatformIDs
(
8
,
platforms
,
&
nplat
);
if
(
err
!=
CL_SUCCESS
)
{
ERROR
(
"Couldn't get platform IDs: %i
\n
"
,
err
);
...
...
src/diffraction.c
View file @
e3d41026
...
...
@@ -184,7 +184,6 @@ void get_diffraction(struct image *image, int na, int nb, int nc, int no_sfac)
double
ax
,
ay
,
az
;
double
bx
,
by
,
bz
;
double
cx
,
cy
,
cz
;
double
a
,
b
,
c
,
d
;
float
kc
;
if
(
image
->
molecule
==
NULL
)
return
;
...
...
@@ -193,11 +192,6 @@ void get_diffraction(struct image *image, int na, int nb, int nc, int no_sfac)
&
bx
,
&
by
,
&
bz
,
&
cx
,
&
cy
,
&
cz
);
cell_get_parameters
(
image
->
molecule
->
cell
,
&
a
,
&
b
,
&
c
,
&
d
,
&
d
,
&
d
);
STATUS
(
"Particle size = %i x %i x %i (=%5.2f x %5.2f x %5.2f nm)
\n
"
,
na
,
nb
,
nc
,
na
*
a
/
1.0e-9
,
nb
*
b
/
1.0e-9
,
nc
*
c
/
1.0e-9
);
/* Allocate (and zero) the "diffraction array" */
image
->
sfacs
=
calloc
(
image
->
width
*
image
->
height
,
sizeof
(
double
complex
));
...
...
src/pattern_sim.c
View file @
e3d41026
...
...
@@ -256,10 +256,11 @@ int main(int argc, char *argv[])
do
{
int
na
,
nb
,
nc
;
double
a
,
b
,
c
,
d
;
na
=
8
;
//
*random()/RAND_MAX + 4;
nb
=
8
;
//
*random()/RAND_MAX + 4;
nc
=
16
;
//
*random()/RAND_MAX + 30;
na
=
8
*
random
()
/
RAND_MAX
+
4
;
nb
=
8
*
random
()
/
RAND_MAX
+
4
;
nc
=
16
*
random
()
/
RAND_MAX
+
30
;
/* Read quaternion from stdin */
if
(
config_randomquat
)
{
...
...
@@ -283,6 +284,10 @@ int main(int argc, char *argv[])
image
.
twotheta
=
NULL
;
image
.
hdr
=
NULL
;
cell_get_parameters
(
image
.
molecule
->
cell
,
&
a
,
&
b
,
&
c
,
&
d
,
&
d
,
&
d
);
STATUS
(
"Particle size = %i x %i x %i (=%5.2f x %5.2f x %5.2f nm)
\n
"
,
na
,
nb
,
nc
,
na
*
a
/
1.0e-9
,
nb
*
b
/
1.0e-9
,
nc
*
c
/
1.0e-9
);
if
(
config_gpu
)
{
get_diffraction_gpu
(
&
image
,
na
,
nb
,
nc
,
config_nosfac
);
}
else
{
...
...
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