aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-01-19 17:40:19 +0100
committerThomas White <taw@physics.org>2010-01-19 17:40:19 +0100
commita4c5daf2f0f37577798af0de5cd31dc81f87eec5 (patch)
treee3ea444c9516e2045c8ab6cf6ee5743bd1ac383b /src
parentb04befccb98fe1bf32829168c8f95b7762b8162e (diff)
Use "fine" peak search for hit finding (it's fast enough)
Diffstat (limited to 'src')
-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);
+ }
}