aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-09-01 16:01:36 +0200
committerThomas White <taw@physics.org>2014-09-02 17:47:29 +0200
commit0f1b53ccc75ea810e32254282981e95242e1c8ad (patch)
treee83e8c6342b2efeaa52a3824dbcc8474606ac6cb
parentcbb491d3ef9dd73bd90a0da146f332b81ff5d552 (diff)
integrate_peak(): Revert use of image->dp
-rw-r--r--libcrystfel/src/peaks.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index b6b5b957..90ac9334 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -269,6 +269,7 @@ static int integrate_peak(struct image *image, int cfs, int css,
for ( dss=-ir_out; dss<=+ir_out; dss++ ) {
double val;
+ int idx;
/* Restrict to annulus */
if ( dfs*dfs + dss*dss > out_lim_sq ) continue;
@@ -283,7 +284,8 @@ static int integrate_peak(struct image *image, int cfs, int css,
return 14;
}
- val = image->dp[pn][p_cfs+dfs + p->w*(p_css+dss)];
+ idx = dfs+cfs+image->width*(dss+css);
+ val = image->data[idx];
/* Check if peak contains saturation in bg region */
if ( (saturated != NULL) && (val > p->max_adu) ) *saturated = 1;
@@ -307,6 +309,7 @@ static int integrate_peak(struct image *image, int cfs, int css,
for ( dss=-ir_inn; dss<=+ir_inn; dss++ ) {
double val;
+ int idx;
/* Inner mask radius */
if ( dfs*dfs + dss*dss > lim_sq ) continue;
@@ -320,7 +323,8 @@ static int integrate_peak(struct image *image, int cfs, int css,
return 15;
}
- val = image->dp[pn][p_cfs+dfs + p->w*(p_css+dss)];
+ idx = dfs+cfs+image->width*(dss+css);
+ val = image->data[idx];
/* Check if peak contains saturation */
if ( (saturated != NULL) && (val > p->max_adu) ) *saturated = 1;