aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-17 12:11:22 +0100
committerThomas White <taw@physics.org>2020-07-29 18:42:24 +0200
commit14dd1029b41e5b50428160a56d025b0e56141f94 (patch)
tree465771079a79bc6e60779c18581dbad8d5ce51a5
parent827f521b3f5661b38e615a1f77d77958a9c0663c (diff)
Add str_peaksearch()
Will be needed for passing peak search parameters to indexamajig from GUI
-rw-r--r--libcrystfel/src/peaks.c14
-rw-r--r--libcrystfel/src/peaks.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index fa8b7c6e..b416856a 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -770,3 +770,17 @@ double estimate_peak_resolution(ImageFeatureList *peaks, double lambda,
free(rns);
return max_res;
}
+
+const char *str_peaksearch(enum peak_search_method meth)
+{
+ switch ( meth ) {
+ case PEAK_PEAKFINDER9: return "peakfinder9";
+ case PEAK_PEAKFINDER8: return "peakfinder8";
+ case PEAK_ZAEF: return "zaef";
+ case PEAK_HDF5: return "hdf5";
+ case PEAK_CXI: return "cxi";
+ case PEAK_MSGPACK: return "msgpack";
+ case PEAK_NONE: return "none";
+ default: return "???";
+ }
+}
diff --git a/libcrystfel/src/peaks.h b/libcrystfel/src/peaks.h
index c71ce29e..f1af1d32 100644
--- a/libcrystfel/src/peaks.h
+++ b/libcrystfel/src/peaks.h
@@ -60,6 +60,7 @@ enum peak_search_method {
PEAK_NONE,
};
+extern const char *str_peaksearch(enum peak_search_method meth);
extern int *make_BgMask(struct image *image, struct panel *p, double ir_inn);