diff options
author | Alexandra Tolstikova <alexandra.tolstikova@desy.de> | 2017-11-16 13:46:23 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-09-10 15:01:10 +0200 |
commit | 17aec9c77e9b75510e43b0fb073df75f66849761 (patch) | |
tree | 0a9e0252b5c81ad6ad451f513a9a3834b582e10a /libcrystfel/src/utils.h | |
parent | ec9f2c41c1f21968412eb4b7f57fda69ed6e37b1 (diff) |
pattern_sim: read spectrum from file
Diffstat (limited to 'libcrystfel/src/utils.h')
-rw-r--r-- | libcrystfel/src/utils.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 ---------------------------- */ |