aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-11-28 17:41:46 +0100
committerThomas White <taw@physics.org>2012-11-29 12:01:34 +0100
commitfcba20a4c51793701c5946cca8fc264aa2e72450 (patch)
treefb87187f6b6686c7b2d2506f4d819376b7b0f250 /src
parentf322397ceee6a12518c193fafd73487b7b19b875 (diff)
indexamajig: Add --use-saturated
Diffstat (limited to 'src')
-rw-r--r--src/im-sandbox.c6
-rw-r--r--src/im-sandbox.h1
-rw-r--r--src/indexamajig.c5
3 files changed, 10 insertions, 2 deletions
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index 80bb78e0..aed0b04b 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -292,13 +292,15 @@ static void process_image(const struct index_args *iargs,
ERROR("Failed to get peaks from HDF5 file.\n");
}
validate_peaks(&image, iargs->min_int_snr,
- iargs->ir_inn, iargs->ir_mid, iargs->ir_out);
+ iargs->ir_inn, iargs->ir_mid, iargs->ir_out,
+ iargs->use_saturated);
break;
case PEAK_ZAEF:
search_peaks(&image, iargs->threshold,
iargs->min_gradient, iargs->min_snr,
- iargs->ir_inn, iargs->ir_mid, iargs->ir_out);
+ iargs->ir_inn, iargs->ir_mid, iargs->ir_out,
+ iargs->use_saturated);
break;
}
diff --git a/src/im-sandbox.h b/src/im-sandbox.h
index 9f23f88b..50dc599b 100644
--- a/src/im-sandbox.h
+++ b/src/im-sandbox.h
@@ -67,6 +67,7 @@ struct index_args
double ir_out;
struct copy_hdf5_field *copyme;
int integrate_saturated;
+ int use_saturated;
};
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 2e5c8904..57c16932 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -161,6 +161,8 @@ static void show_help(const char *s)
" least 10%% of the located peaks.\n"
" --no-bg-sub Don't subtract local background estimates from\n"
" integrated intensities.\n"
+" --use-saturated During the initial peak search, don't reject\n"
+" peaks which contain pixels above max_adu.\n"
" --integrate-saturated During the final integration stage, don't reject\n"
" peaks which contain pixels above max_adu.\n"
);
@@ -245,6 +247,7 @@ int main(int argc, char *argv[])
float ir_mid = 5.0;
float ir_out = 7.0;
int integrate_saturated = 0;
+ int use_saturated = 0;
copyme = new_copy_hdf5_field_list();
if ( copyme == NULL ) {
@@ -292,6 +295,7 @@ int main(int argc, char *argv[])
{"tolerance", 1, NULL, 13},
{"int-radius", 1, NULL, 14},
{"integrate-saturated",0, &integrate_saturated,1},
+ {"use-saturated",0, &use_saturated, 1},
{0, 0, NULL, 0}
};
@@ -638,6 +642,7 @@ int main(int argc, char *argv[])
iargs.ir_inn = ir_inn;
iargs.ir_mid = ir_mid;
iargs.ir_out = ir_out;
+ iargs.use_saturated = use_saturated;
iargs.integrate_saturated = integrate_saturated;
create_sandbox(&iargs, n_proc, prefix, config_basename, fh,