Commit 328a4fdc authored by Thomas White's avatar Thomas White
Browse files

Add --clean-image option

parent 156ad97c
......@@ -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);
......
......@@ -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++ ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment