aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-03-11 17:44:27 +0100
committerThomas White <taw@physics.org>2013-03-11 17:45:52 +0100
commit4b7fbbbfdea27b9098af5174dee9910baae0ab31 (patch)
tree29ed9ab1f9a50c57b5f3dfd150e01cb2b1450da1 /src
parent6af905071a4865bc4481226d9319a3f5740efae8 (diff)
Get rid of "--filter-cm"
This was completely specific to pnCCDs, and not even properly general to the different configurations there.
Diffstat (limited to 'src')
-rw-r--r--src/dw-hdfsee.c5
-rw-r--r--src/dw-hdfsee.h3
-rw-r--r--src/hdfsee.c12
-rw-r--r--src/indexamajig.c7
-rw-r--r--src/process_image.c2
5 files changed, 7 insertions, 22 deletions
diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c
index 8ad12a2a..ec90b87e 100644
--- a/src/dw-hdfsee.c
+++ b/src/dw-hdfsee.c
@@ -1529,8 +1529,6 @@ static int geometry_fits(struct image *image, struct detector *geom)
static void do_filters(DisplayWindow *dw)
{
- if ( dw->cmfilter ) filter_cm(dw->image);
-
if ( dw->median_filter > 0 ) {
filter_median(dw->image, dw->median_filter);
}
@@ -1795,7 +1793,7 @@ static gint displaywindow_press(GtkWidget *widget, GdkEventButton *event,
DisplayWindow *displaywindow_open(const char *filename, const char *peaks,
- double boost, int binning, int cmfilter,
+ double boost, int binning,
int noisefilter, int colscale,
const char *element, const char *geometry,
int show_rings, double *ring_radii,
@@ -1824,7 +1822,6 @@ DisplayWindow *displaywindow_open(const char *filename, const char *peaks,
dw->scale = colscale;
dw->binning = binning;
dw->boostint = boost;
- dw->cmfilter = cmfilter;
dw->noisefilter = noisefilter;
dw->not_ready_yet = 1;
dw->surf = NULL;
diff --git a/src/dw-hdfsee.h b/src/dw-hdfsee.h
index 6bc2ae12..3e908947 100644
--- a/src/dw-hdfsee.h
+++ b/src/dw-hdfsee.h
@@ -100,7 +100,6 @@ typedef struct {
int binning;
double boostint;
- int cmfilter; /* Use CM subtraction */
int noisefilter; /* Use aggressive noise filter */
int median_filter;
int use_geom;
@@ -119,7 +118,7 @@ typedef struct {
/* Open an image display window showing the given filename, or NULL */
extern DisplayWindow *displaywindow_open(const char *filename,
const char *peaks, double boost,
- int binning, int cmfilter,
+ int binning,
int noisefilter, int colscale,
const char *element,
const char *geometry, int show_rings,
diff --git a/src/hdfsee.c b/src/hdfsee.c
index 2db58f41..24d6d9cc 100644
--- a/src/hdfsee.c
+++ b/src/hdfsee.c
@@ -58,11 +58,10 @@ static void show_help(const char *s)
" --ring-size=<n> Set the size for those circles.\n"
" -i, --int-boost=<n> Multiply intensity by <n>.\n"
" -b, --binning=<n> Set display binning to <n>.\n"
-" --filter-cm Perform common-mode noise subtraction.\n"
-" --filter-noise Apply an aggressive noise filter which\n"
-" sets all pixels in each 3x3 region to\n"
-" zero if any of them have negative\n"
-" values.\n"
+" --filter-noise Apply an aggressive noise filter to the\n"
+" image data.\n"
+" --median-filter=<n> Apply a median filter to the image data.\n"
+
" --show-rings Overlay rings that indicate resolution.\n"
" --simple-rings=XX,YY,... Overlay rings at specified radii XX, YY, ...\n"
" in pixel units.\n"
@@ -113,7 +112,6 @@ int main(int argc, char *argv[])
char *peaks = NULL;
double boost = 1.0;
int binning = 2;
- int config_cmfilter = 0;
int config_noisefilter = 0;
int config_showrings = 0;
int colscale = SCALE_COLOUR;
@@ -132,7 +130,6 @@ int main(int argc, char *argv[])
{"peak-overlay", 1, NULL, 'p'},
{"int-boost", 1, NULL, 'i'},
{"binning", 1, NULL, 'b'},
- {"filter-cm", 0, &config_cmfilter, 1},
{"filter-noise", 0, &config_noisefilter, 1},
{"colscale", 1, NULL, 'c'},
{"image", 1, NULL, 'e'},
@@ -264,7 +261,6 @@ int main(int argc, char *argv[])
for ( i=0; i<nfiles; i++ ) {
main_window_list[i] = displaywindow_open(argv[optind+i], peaks,
boost, binning,
- config_cmfilter,
config_noisefilter,
colscale, element,
geometry,
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 27ec31fc..208c0ed0 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -104,9 +104,6 @@ static void show_help(const char *s)
"For more control over the process, you might need:\n\n"
" --tolerance=<tol> Set the tolerances for cell comparison.\n"
" Default: 5,5,5,1.5.\n"
-" --filter-cm Perform common-mode noise subtraction on images\n"
-" before proceeding. Intensities will be extracted\n"
-" from the image as it is after this processing.\n"
" --filter-noise Apply an aggressive noise filter which sets all\n"
" pixels in each 3x3 region to zero if any of them\n"
" have negative values. Intensity measurement will\n"
@@ -114,7 +111,7 @@ static void show_help(const char *s)
" --median-filter=<n> Apply a median filter to the image data. Intensity\n"
" measurement will be performed on the image as it\n"
" was before this. The side length of the median\n"
-" filter box will be <n>. Default: 0 (no filter).\n"
+" filter box will be 2<n>+1. Default: 0 (no filter).\n"
" --no-sat-corr Don't correct values of saturated peaks using a\n"
" table included in the HDF5 file.\n"
" --threshold=<n> Only accept peaks above <n> ADU. Default: 800.\n"
@@ -185,7 +182,6 @@ int main(int argc, char *argv[])
/* Defaults */
iargs.cell = NULL;
- iargs.cmfilter = 0;
iargs.noisefilter = 0;
iargs.median_filter = 0;
iargs.satcorr = 1;
@@ -239,7 +235,6 @@ int main(int argc, char *argv[])
{"image", 1, NULL, 'e'},
/* Long-only options with no arguments */
- {"filter-cm", 0, &iargs.cmfilter, 1},
{"filter-noise", 0, &iargs.noisefilter, 1},
{"no-sat-corr", 0, &iargs.satcorr, 0},
{"sat-corr", 0, &iargs.satcorr, 1},
diff --git a/src/process_image.c b/src/process_image.c
index a8eeb663..ef673c84 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -134,8 +134,6 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
return;
}
- if ( iargs->cmfilter ) filter_cm(&image);
-
/* Take snapshot of image after CM subtraction but before applying
* horrible noise filters to it */
data_size = image.width * image.height * sizeof(float);