diff options
author | Thomas White <taw@physics.org> | 2021-02-08 17:55:10 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-02-08 17:55:10 +0100 |
commit | 636784eadce6a322ea6b626ae6b711e53ad36462 (patch) | |
tree | cecd31fcd14232344e7fea2d5f4a770e634cc122 /libcrystfel | |
parent | 66929c91bac38e18249b532034496bbf5ce23275 (diff) |
Add fom_name()
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/fom.c | 25 | ||||
-rw-r--r-- | libcrystfel/src/fom.h | 2 |
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 */ |