From 17aec9c77e9b75510e43b0fb073df75f66849761 Mon Sep 17 00:00:00 2001 From: Alexandra Tolstikova Date: Thu, 16 Nov 2017 13:46:23 +0100 Subject: pattern_sim: read spectrum from file --- libcrystfel/src/utils.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libcrystfel/src/utils.h') diff --git a/libcrystfel/src/utils.h b/libcrystfel/src/utils.h index a759ff15..2c756ad7 100644 --- a/libcrystfel/src/utils.h +++ b/libcrystfel/src/utils.h @@ -185,6 +185,8 @@ static inline int within_tolerance(double a, double b, double percent) /* Photon energy (eV) to wavelength (m) */ #define ph_eV_to_lambda(a) ph_en_to_lambda(eV_to_J(a)) +/* Photon energy (eV) to k (1/m) */ +#define ph_eV_to_k(a) ((a)*ELECTRON_CHARGE/PLANCK/C_VACUO) /* ------------------------------ Message macros ---------------------------- */ -- cgit v1.2.3