From 91bc00caa746f6cbd7d0154dcca65978f2fe65a3 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 29 Mar 2012 13:58:36 +0200 Subject: Add some more symmetry tests --- tests/symmetry_check.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/symmetry_check.c b/tests/symmetry_check.c index b0047f35..069de582 100644 --- a/tests/symmetry_check.c +++ b/tests/symmetry_check.c @@ -323,6 +323,11 @@ int main(int argc, char *argv[]) check_subgroup("6/m", "-3_H", 1, 1, 2, &fail); check_subgroup("4/m", "-4", 1, 1, 2, &fail); + check_subgroup("4/mmm", "-42m", 1, 1, 2, &fail); + check_subgroup("4/mmm", "-4m2", 1, 1, 2, &fail); + check_subgroup("4/mmm", "4/m", 1, 1, 2, &fail); + check_subgroup("4/mmm", "4mm", 1, 1, 2, &fail); + /* Tetartohedral */ check_subgroup("6/mmm", "-3_H", 1, 1, 4, &fail); -- cgit v1.2.3 From 05ae5bfa6f337cfd9fc9b839e3ff471ddaca1cbc Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 29 Mar 2012 13:59:39 +0200 Subject: integrate_peak() should be static --- libcrystfel/src/peaks.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index 0d4ce64b..829a35ab 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -156,9 +156,10 @@ static int cull_peaks(struct image *image) /* Returns non-zero if peak has been vetoed. * i.e. don't use result if return value is not zero. */ -int integrate_peak(struct image *image, int cfs, int css, - double *pfs, double *pss, double *intensity, double *sigma, - double ir_inn, double ir_mid, double ir_out) +static int integrate_peak(struct image *image, int cfs, int css, + double *pfs, double *pss, + double *intensity, double *sigma, + double ir_inn, double ir_mid, double ir_out) { signed int fs, ss; double lim_sq, out_lim_sq, mid_lim_sq; -- cgit v1.2.3 From c876a962ba6ffa84233429928ec55f7326d8e5e5 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 2 Apr 2012 19:30:06 +0200 Subject: indexamajig: Check beam file is present early, not in process_image() --- src/indexamajig.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/indexamajig.c b/src/indexamajig.c index efbf4b44..281cac43 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -271,12 +271,6 @@ static void process_image(void *pp, int cookie) image.copyme = pargs->static_args.copyme; image.beam = beam; - if ( beam == NULL ) { - ERROR("Warning: no beam parameters file.\n"); - ERROR("I'm going to assume 1 ADU per photon, which is almost"); - ERROR(" certainly wrong. Peak sigmas will be incorrect.\n"); - } - pargs->indexable = 0; hdfile = hdfile_open(filename); @@ -975,6 +969,12 @@ int main(int argc, char *argv[]) nominal_photon_energy = 2000.0; } + if ( beam == NULL ) { + ERROR("Warning: no beam parameters file.\n"); + ERROR("I'm going to assume 1 ADU per photon, which is almost"); + ERROR(" certainly wrong. Peak sigmas will be incorrect.\n"); + } + /* Get first filename and use it to set up the indexing */ prepare_line = malloc(1024*sizeof(char)); rval = fgets(prepare_line, 1023, fh); -- cgit v1.2.3 From 902378fa6beb49b171834ab2c9357f281824be30 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 3 Apr 2012 14:36:58 +0200 Subject: partial_sim: Document --pgraph --- doc/man/partial_sim.1 | 11 +++++++++++ src/partial_sim.c | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/doc/man/partial_sim.1 b/doc/man/partial_sim.1 index 5b44d34f..e41708ed 100644 --- a/doc/man/partial_sim.1 +++ b/doc/man/partial_sim.1 @@ -71,6 +71,17 @@ When combined with with \fB-i\fR, specifies the symmetry of the input reflection .PD Add random values with a flat distribution to the components of the reciprocal lattice vectors written to the stream, simulating indexing errors. The maximum value that will be added is +/- \fIval\fR percent. +.PD 0 +.B +.IP "\fB--pgraph=\fR\fIfilename\fR +.PD +Write reflection statistics to \fifilename\fR. The file consists of a one-line +header and has columns as follows: the centre of the resolution bin (in inverse +nanometres), the number of reflections in that bin across the whole simulated +data set, the mean partiality for the bin, and the maximum partiality which was +encountered in the bin. + + .SH AUTHOR This page was written by Thomas White. diff --git a/src/partial_sim.c b/src/partial_sim.c index 31822eca..39621a6c 100644 --- a/src/partial_sim.c +++ b/src/partial_sim.c @@ -178,6 +178,8 @@ static void show_help(const char *s) " -c, --cnoise= Add random noise, with a flat distribution, to the\n" " reciprocal lattice vector components given in the\n" " stream, with maximum error +/- percent.\n" +" --pgraph= Write reflection counts and partiality statistics\n" +" to .\n" "\n" ); } @@ -538,6 +540,8 @@ int main(int argc, char *argv[]) if ( fh != NULL ) { + fprintf(fh, "1/d_nm #refl pmean pmax\n"); + for ( i=0; i