From e38375cb0af448c3a7f3667594cf06d1117132c7 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 9 Mar 2012 15:58:15 +0100 Subject: Use ADU per eV in geometry file, rather than ADU per photon in beam file Conflicts: src/get_hkl.c tests/morphology_check.c --- libcrystfel/src/utils.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libcrystfel/src/utils.h') diff --git a/libcrystfel/src/utils.h b/libcrystfel/src/utils.h index 8d5ee479..8c11abd6 100644 --- a/libcrystfel/src/utils.h +++ b/libcrystfel/src/utils.h @@ -186,6 +186,12 @@ static inline int within_tolerance(double a, double b, double percent) /* Joules to eV */ #define J_to_eV(a) ((a)/ELECTRON_CHARGE) +/* Photon wavelength (m) to energy (eV) */ +#define ph_lambda_to_eV(a) J_to_eV(ph_lambda_to_en(a)) + +/* Photon energy (eV) to wavelength (m) */ +#define ph_eV_to_lambda(a) ph_en_to_lambda(eV_to_J(a)) + #define UNUSED __attribute__((unused)) -- cgit v1.2.3