diff options
author | Thomas White <taw@physics.org> | 2012-03-09 15:58:15 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-03-09 15:58:15 +0100 |
commit | e38375cb0af448c3a7f3667594cf06d1117132c7 (patch) | |
tree | f23e49509f032a84d3f774846106755beea64160 /libcrystfel/src/utils.h | |
parent | be33bf078a8ed1ec4c5439095285add97b823fd1 (diff) |
Use ADU per eV in geometry file, rather than ADU per photon in beam file
Conflicts:
src/get_hkl.c
tests/morphology_check.c
Diffstat (limited to 'libcrystfel/src/utils.h')
-rw-r--r-- | libcrystfel/src/utils.h | 6 |
1 files changed, 6 insertions, 0 deletions
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)) |