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
9ade5907
Commit
9ade5907
authored
Apr 21, 2011
by
Thomas White
Browse files
partial_sim: Split off mess_up_cell()
parent
dc0e8347
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/partial_sim.c
View file @
9ade5907
...
...
@@ -31,6 +31,18 @@
#include
"stream.h"
static
void
mess_up_cell
(
UnitCell
*
cell
)
{
double
ax
,
ay
,
az
;
double
bx
,
by
,
bz
;
double
cx
,
cy
,
cz
;
cell_get_cartesian
(
cell
,
&
ax
,
&
ay
,
&
az
,
&
bx
,
&
by
,
&
bz
,
&
cx
,
&
cy
,
&
cz
);
ax
+=
0
.
01
*
ax
;
cell_set_cartesian
(
cell
,
ax
,
ay
,
az
,
bx
,
by
,
bz
,
cx
,
cy
,
cz
);
}
/* For each reflection in "partial", fill in what the intensity would be
* according to "full" */
static
void
calculate_partials
(
RefList
*
partial
,
double
osf
,
...
...
@@ -97,7 +109,6 @@ int main(int argc, char *argv[])
RefList
*
full
;
char
*
sym
=
NULL
;
UnitCell
*
cell
=
NULL
;
UnitCell
*
rcell
;
struct
quaternion
orientation
;
struct
image
image
;
FILE
*
ofh
;
...
...
@@ -240,11 +251,8 @@ int main(int argc, char *argv[])
write_chunk
(
ofh
,
&
image
,
STREAM_INTEGRATED
);
reflist_free
(
image
.
reflections
);
/* Rotate the cell by a tiny amount */
rcell
=
rotate_cell
(
image
.
indexed_cell
,
deg2rad
(
0
.
2
),
deg2rad
(
0
.
0
),
deg2rad
(
0
.
0
));
cell_free
(
image
.
indexed_cell
);
image
.
indexed_cell
=
rcell
;
/* Alter the cell by a tiny amount */
mess_up_cell
(
image
.
indexed_cell
);
image
.
filename
=
"(simulated 2)"
;
/* Write another chunk */
...
...
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