aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/indexamajig.c9
-rw-r--r--src/peaks.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index c7108fee..67073b89 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -31,6 +31,7 @@
#include "diffraction.h"
#include "detector.h"
#include "sfac.h"
+#include "filters.h"
static void show_help(const char *s)
@@ -53,6 +54,8 @@ static void show_help(const char *s)
" --near-bragg Output a list of reflection intensities to stdout.\n"
" --simulate Simulate the diffraction pattern using the indexed\n"
" unit cell.\n"
+" --clean-image Perform common-mode noise subtraction and\n"
+" background removal on images before proceeding.\n"
"\n");
}
@@ -70,6 +73,7 @@ int main(int argc, char *argv[])
int config_nearbragg = 0;
int config_writedrx = 0;
int config_simulate = 0;
+ int config_clean = 0;
IndexingMethod indm;
char *indm_str = NULL;
@@ -83,6 +87,7 @@ int main(int argc, char *argv[])
{"write-drx", 0, &config_writedrx, 1},
{"indexing", 1, NULL, 'z'},
{"simulate", 0, &config_simulate, 1},
+ {"clean-image", 0, &config_clean, 1},
{0, 0, NULL, 0}
};
@@ -175,6 +180,10 @@ int main(int argc, char *argv[])
hdf5_read(hdfile, &image);
+ if ( config_clean ) {
+ clean_image(&image);
+ }
+
/* Perform 'fine' peak search */
search_peaks(&image);
diff --git a/src/peaks.c b/src/peaks.c
index 5a95dd17..31de2a79 100644
--- a/src/peaks.c
+++ b/src/peaks.c
@@ -318,8 +318,6 @@ void search_peaks(struct image *image)
}
image->features = image_feature_list_new();
- clean_image(image);
-
for ( x=1; x<image->width-1; x++ ) {
for ( y=1; y<image->height-1; y++ ) {