aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/index.c6
-rw-r--r--src/index.h3
-rw-r--r--src/indexamajig.c36
3 files changed, 22 insertions, 23 deletions
diff --git a/src/index.c b/src/index.c
index f16ff333..b45bd1fc 100644
--- a/src/index.c
+++ b/src/index.c
@@ -72,14 +72,10 @@ int map_position(struct image *image, double x, double y,
}
-void index_pattern(struct image *image, int no_index, int dump_peaks,
- int use_dirax)
+void index_pattern(struct image *image, int no_index, int use_dirax)
{
int i;
- /* Perform 'fine' peak search */
- search_peaks(image, dump_peaks);
-
/* Map positions to 3D */
for ( i=0; i<image_feature_count(image->features); i++ ) {
diff --git a/src/index.h b/src/index.h
index 076d9fe2..6f1fe98c 100644
--- a/src/index.h
+++ b/src/index.h
@@ -18,8 +18,7 @@
#endif
-extern void index_pattern(struct image *image, int no_index, int dump_peaks,
- int use_dirax);
+extern void index_pattern(struct image *image, int no_index, int use_dirax);
/* x,y in pixels relative to central beam */
extern int map_position(struct image *image, double x, double y,
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 17151581..3cd3a408 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -117,7 +117,6 @@ int main(int argc, char *argv[])
char line[1024];
struct hdfile *hdfile;
struct image image;
- int fom;
rval = fgets(line, 1023, fh);
if ( rval == NULL ) continue;
@@ -141,26 +140,31 @@ int main(int argc, char *argv[])
hdf5_read(hdfile, &image);
- fom = image_fom(&image);
- if ( fom > 0 ) {
+ /* Perform 'fine' peak search */
+ search_peaks(&image, config_dumpfound);
- /* Calculate orientation matrix (by magic) */
- index_pattern(&image, config_noindex, config_dumpfound,
- config_dirax);
+ if ( image_feature_count(image.features) > 25 ) {
- if ( image.molecule == NULL ) goto done;
+ n_hits++;
- /* View head-on (unit cell is tilted) */
- image.orientation.w = 1.0;
- image.orientation.x = 0.0;
- image.orientation.y = 0.0;
- image.orientation.z = 0.0;
- get_ewald(&image);
+ if ( !config_noindex ) {
- /* Read h,k,l,I */
- output_intensities(&image);
+ /* Calculate orientation matrix (by magic) */
+ index_pattern(&image, config_noindex,
+ config_dirax);
- n_hits++;
+ if ( image.molecule == NULL ) goto done;
+
+ /* View head-on (unit cell is tilted) */
+ image.orientation.w = 1.0;
+ image.orientation.x = 0.0;
+ image.orientation.y = 0.0;
+ image.orientation.z = 0.0;
+ get_ewald(&image);
+
+ /* Read h,k,l,I */
+ output_intensities(&image);
+ }
}