aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-03-07 17:50:06 +0100
committerThomas White <taw@physics.org>2012-03-07 17:50:06 +0100
commit0014a606ed074e7438c6536cf0fc5a7d5bd790c9 (patch)
treecfb431919e77d279d657bbdc50096e03db5da3f0 /libcrystfel/src
parenta16291dd7c0826428b4d3d3b2ba3f48540f3c1c7 (diff)
indexamajig: Remove polarization correction
It was totally broken and wrong, and just added noise to the data, and it should be done at the scaling stage instead of now.
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/peaks.c26
-rw-r--r--libcrystfel/src/peaks.h5
2 files changed, 7 insertions, 24 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index d0183371..66907298 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -153,7 +153,7 @@ static int cull_peaks(struct image *image)
int integrate_peak(struct image *image, int cfs, int css,
double *pfs, double *pss, double *intensity,
double *pbg, double *pmax, double *sigma,
- int do_polar, int centroid, int bgsub)
+ int centroid, int bgsub)
{
signed int fs, ss;
double lim, out_lim, mid_lim;
@@ -227,21 +227,6 @@ int integrate_peak(struct image *image, int cfs, int css,
val = image->data[idx];
- if ( do_polar ) {
-
- int err;
-
- tt = get_tt(image, fs+cfs, ss+css, &err);
-
- phi = atan2(ss+css, fs+cfs);
- pa = pow(sin(phi)*sin(tt), 2.0);
- pb = pow(cos(tt), 2.0);
- pol = 1.0 - 2.0*POL*(1-pa) + POL*(1.0+pb);
-
- val /= pol;
-
- }
-
if ( val > max ) max = val;
/* If outside inner mask, estimate noise from this region */
@@ -416,7 +401,7 @@ static void search_peaks_in_panel(struct image *image, float threshold,
* intensity of this peak is only an estimate at this stage. */
r = integrate_peak(image, mask_fs, mask_ss,
&f_fs, &f_ss, &intensity,
- &pbg, &pmax, &sigma, 0, 1, 1);
+ &pbg, &pmax, &sigma, 1, 1);
if ( r ) {
/* Bad region - don't detect peak */
@@ -619,8 +604,8 @@ static struct integr_ind *sort_reflections(RefList *list, UnitCell *cell,
/* Integrate the list of predicted reflections in "image" */
-void integrate_reflections(struct image *image, int polar, int use_closer,
- int bgsub, double min_snr)
+void integrate_reflections(struct image *image, int use_closer, int bgsub,
+ double min_snr)
{
struct integr_ind *il;
int n, i;
@@ -669,8 +654,7 @@ void integrate_reflections(struct image *image, int polar, int use_closer,
}
r = integrate_peak(image, pfs, pss, &fs, &ss,
- &intensity, &bg, &max, &sigma, polar, 0,
- bgsub);
+ &intensity, &bg, &max, &sigma, 0, bgsub);
/* Record intensity and set redundancy to 1 on success */
if ( r == 0 ) {
diff --git a/libcrystfel/src/peaks.h b/libcrystfel/src/peaks.h
index 2360dc42..8b64a081 100644
--- a/libcrystfel/src/peaks.h
+++ b/libcrystfel/src/peaks.h
@@ -37,8 +37,7 @@ extern void search_peaks(struct image *image, float threshold,
float min_gradient, float min_snr);
extern void integrate_reflections(struct image *image,
- int polar, int use_closer, int bgsub,
- double min_snr);
+ int use_closer, int bgsub, double min_snr);
extern double peak_lattice_agreement(struct image *image, UnitCell *cell,
double *pst);
@@ -49,7 +48,7 @@ extern int peak_sanity_check(struct image *image);
extern int integrate_peak(struct image *image, int cfs, int css,
double *pfs, double *pss, double *intensity,
double *pbg, double *pmax, double *sigma,
- int do_polar, int centroid, int bgsub);
+ int centroid, int bgsub);
extern void estimate_resolution(RefList *list, UnitCell *cell,
double *min, double *max);