aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/fom.c25
-rw-r--r--libcrystfel/src/fom.h2
2 files changed, 27 insertions, 0 deletions
diff --git a/libcrystfel/src/fom.c b/libcrystfel/src/fom.c
index 2227a84c..ae5b530f 100644
--- a/libcrystfel/src/fom.c
+++ b/libcrystfel/src/fom.c
@@ -1407,3 +1407,28 @@ int fom_shell_num_possible(struct fom_context *fctx, int i)
assert(fctx->fom == FOM_COMPLETENESS);
return fctx->possible[i];
}
+
+
+const char *fom_name(enum fom_type f)
+{
+ switch ( f ) {
+ case FOM_R1I : return "R1(I)";
+ case FOM_R1F : return "R1(F)";
+ case FOM_R2 : return "R2";
+ case FOM_RSPLIT : return "Rsplit";
+ case FOM_CC : return "CC";
+ case FOM_CCSTAR : return "CC*";
+ case FOM_CCANO : return "CCano";
+ case FOM_CRDANO : return "CRDano";
+ case FOM_RANO : return "Rano";
+ case FOM_RANORSPLIT : return "Rano/Rsplit";
+ case FOM_D1SIG : return "D<1sigma";
+ case FOM_D2SIG : return "D<2sigma";
+ case FOM_NUM_MEASUREMENTS : return "nMeas";
+ case FOM_REDUNDANCY : return "Redundancy";
+ case FOM_SNR : return "I/sigI";
+ case FOM_MEAN_INTENSITY : return "mean I";
+ case FOM_COMPLETENESS : return "Completeness";
+ default : return "unknown FoM";
+ }
+}
diff --git a/libcrystfel/src/fom.h b/libcrystfel/src/fom.h
index c416043c..8839b65e 100644
--- a/libcrystfel/src/fom.h
+++ b/libcrystfel/src/fom.h
@@ -135,4 +135,6 @@ extern int fom_shell_num_possible(struct fom_context *fctx, int i);
extern int fom_is_anomalous(enum fom_type f);
+extern const char *fom_name(enum fom_type f);
+
#endif /* FOM */