aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2016-10-06 12:00:00 +0200
committerThomas White <taw@physics.org>2016-10-06 12:00:34 +0200
commit553b0b3d94cb5b09956cf06c8ae3a08a00af6796 (patch)
tree2d1610de058d3d84e715643027a94b413a729252
parent2963f5062eb189959255549787ee961878773bb3 (diff)
pattern_sim: Zero image array before each frame
-rw-r--r--src/pattern_sim.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index cea3d004..c60b3280 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -754,6 +754,16 @@ int main(int argc, char *argv[])
double a, b, c, d;
UnitCell *cell;
int err = 0;
+ int pi;
+
+ for ( pi=0; pi<image.det->n_panels; pi++ ) {
+ long j;
+ long np = image.det->panels[pi].w
+ * image.det->panels[pi].h;
+ for ( j=0; j<np; j++ ) {
+ image.dp[pi][j] = 0.0;
+ }
+ }
if ( random_size ) {