diff options
author | Thomas White <taw@physics.org> | 2012-03-09 16:15:26 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-03-09 16:15:26 +0100 |
commit | b832e3564f7e019dfb3c275621ea4cfdae925375 (patch) | |
tree | c498d5dd39fdeb8271dec572c4dd1b38432c0a50 | |
parent | f523fa66c4e316f396a3c793a4f9e3d1fd37bd2b (diff) |
Updates for ADU per eV
-rw-r--r-- | libcrystfel/src/peaks.c | 10 | ||||
-rw-r--r-- | tests/integration_check.c | 3 |
2 files changed, 3 insertions, 10 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index 88497db5..a5b0e907 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -169,20 +169,14 @@ int integrate_peak(struct image *image, int cfs, int css, double bg_mean, bg_var; double bg_tot_sq = 0.0; double var; - struct beam_params *beam; double aduph; - beam = image->beam; - if ( beam != NULL ) { - aduph = image->beam->adu_per_photon; - } else { - aduph = 1.0; - } - p = find_panel(image->det, cfs, css); if ( p == NULL ) return 1; if ( p->no_index ) return 1; + aduph = p->adu_per_eV * ph_lambda_to_eV(image->lambda); + lim = p->integr_radius; mid_lim = 3.0 + lim; out_lim = 6.0 + lim; diff --git a/tests/integration_check.c b/tests/integration_check.c index 80a214d1..57bb3589 100644 --- a/tests/integration_check.c +++ b/tests/integration_check.c @@ -321,8 +321,7 @@ int main(int argc, char *argv[]) image.height = 128; memset(image.data, 0, 128*128*sizeof(float)); - image.beam = calloc(1, sizeof(struct beam_params)); - image.beam->adu_per_photon = 100.0; + image.beam = NULL; /* First check: no intensity -> zero intensity and bg */ integrate_peak(&image, 64, 64, &fsp, &ssp, &intensity, &sigma); |