aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-02-09 14:25:09 +0100
committerThomas White <taw@physics.org>2021-02-09 14:25:09 +0100
commit4b19790ab0692cbe1ef1b4e2e0b8262091e6b143 (patch)
tree8093a7102097754be1399b4301340f82be9ee05a /libcrystfel
parentc59bc9ef66c5d4b35ee76dc1b95bcd93aca8d48d (diff)
Add fom_is_comparison()
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/fom.c31
-rw-r--r--libcrystfel/src/fom.h1
2 files changed, 32 insertions, 0 deletions
diff --git a/libcrystfel/src/fom.c b/libcrystfel/src/fom.c
index ae5b530f..af1ba8fe 100644
--- a/libcrystfel/src/fom.c
+++ b/libcrystfel/src/fom.c
@@ -855,6 +855,37 @@ int fom_is_anomalous(enum fom_type fom)
}
+int fom_is_comparison(enum fom_type fom)
+{
+ switch ( fom ) {
+
+ case FOM_CCANO:
+ case FOM_RANO:
+ case FOM_CRDANO:
+ case FOM_RANORSPLIT:
+ case FOM_R1I:
+ case FOM_R1F:
+ case FOM_R2:
+ case FOM_RSPLIT:
+ case FOM_CC:
+ case FOM_CCSTAR:
+ case FOM_D1SIG:
+ case FOM_D2SIG:
+ return 1;
+
+ case FOM_NUM_MEASUREMENTS:
+ case FOM_REDUNDANCY:
+ case FOM_SNR:
+ case FOM_MEAN_INTENSITY:
+ case FOM_COMPLETENESS:
+ return 0;
+ }
+
+ ERROR("This point never reached\n");
+ abort();
+}
+
+
static int is_single_list(enum fom_type fom)
{
switch ( fom ) {
diff --git a/libcrystfel/src/fom.h b/libcrystfel/src/fom.h
index 8839b65e..08bc655b 100644
--- a/libcrystfel/src/fom.h
+++ b/libcrystfel/src/fom.h
@@ -134,6 +134,7 @@ extern int fom_overall_num_possible(struct fom_context *fctx);
extern int fom_shell_num_possible(struct fom_context *fctx, int i);
extern int fom_is_anomalous(enum fom_type f);
+extern int fom_is_comparison(enum fom_type f);
extern const char *fom_name(enum fom_type f);