1 /* This file is part of the hkl library.
3 * The hkl library is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
8 * The hkl library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with the hkl library. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright (C) 2003-2019 Synchrotron SOLEIL
17 * L'Orme des Merisiers Saint-Aubin
18 * BP 48 91192 GIF-sur-YVETTE CEDEX
20 * Authors: Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>
21 * Maria-Teresa Nunez-Pardo-de-Verra <tnunez@mail.desy.de>
23 #ifndef __HKL_PSEUDOAXIS_COMMON_PRIVATE__
24 #define __HKL_PSEUDOAXIS_COMMON_PRIVATE__
26 #include <gsl/gsl_vector_double.h> // for gsl_vector
27 #include "hkl-pseudoaxis-auto-private.h"
28 #include "hkl-pseudoaxis-private.h" // for HklModeOperations, etc
29 #include "hkl.h" // for HklEngine, HklDetector, etc
30 #include "hkl-pseudoaxis-common-readonly-private.h"
41 extern struct HklHklRead
hkl_hkl_read(const HklGeometry
*geometry
,
42 const HklDetector
*detector
,
43 const HklSample
*sample
);
54 extern struct HklHklWrite
hkl_hkl_write(const HklGeometry
*geometry
,
55 const HklDetector
*detector
,
56 const HklSample
*sample
,
57 const HklVector
*hkl
);
59 /**************************/
60 /* hkl double_diffraction */
61 /**************************/
63 struct HklDoubleDiffractionWrite
{
64 struct HklHklWrite hkl1W
;
65 struct HklHklWrite hkl2W
;
69 extern struct HklDoubleDiffractionWrite
hkl_double_diffraction_write(const HklGeometry
*geometry
,
70 const HklDetector
*detector
,
71 const HklSample
*sample
,
72 const HklVector
*hkl1
,
73 const HklVector
*hkl2
);
75 /******************************************/
76 /* the psi_constant_vertical get set part */
77 /******************************************/
80 struct HklHklWrite hklW
;
81 struct HklHklWrite hkl2W
;
82 HklVector Qn
; /* Q normalized */
83 HklVector hkl2
; /* projection of hkl2 on plan Q */
84 HklVector n
; /* compute n the intersection of the plan P(kf, ki) and PQn (normal Qn) */
85 double psi
; /* computed psi */
89 extern struct HklPsiWrite
hkl_psi_write(const HklGeometry
*geometry
,
90 const HklDetector
*detector
,
91 const HklSample
*sample
,
93 const HklVector
*hkl2
);
95 /***********************/
96 /* hkl emergence fixed */
97 /***********************/
99 struct HklEmergenceFixedWrite
{
100 struct HklHklWrite hklW
;
101 HklVector n
; /* the surface orientation */
102 double emergence
; /* the computed emergence */
105 extern struct HklEmergenceFixedWrite
hkl_emergence_fixed_write(const HklGeometry
*geometry
,
106 const HklDetector
*detector
,
107 const HklSample
*sample
,
108 const HklVector
*hkl
,