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-2012 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>
22 #include <ccan/array_size/array_size.h>
24 #include "hkl-parameter-private.h"
25 #include "hkl-pseudoaxis-auto-private.h"
26 #include "hkl-pseudoaxis-common-psi-private.h"
32 static HklMode
* psi_vertical()
34 static const char *axes
[] = {"omega", "chi", "phi", "delta"};
35 static const HklFunction
*functions
[] = {&psi_func
};
36 static const HklParameter parameters
[] = {
37 {HKL_PARAMETER_DEFAULTS
, .name
= "h1", .range
= {.min
=-1, .max
=1}, ._value
=1,},
38 {HKL_PARAMETER_DEFAULTS
, .name
= "k1", .range
= {.min
=-1, .max
=1}, ._value
=1,},
39 {HKL_PARAMETER_DEFAULTS
, .name
= "l1", .range
= {.min
=-1, .max
=1}, ._value
=1,},
41 static const HklModeAutoInfo info
= {
42 INFO_AUTO_WITH_PARAMS(__func__
, axes
, functions
, parameters
),
45 return hkl_mode_psi_new(&info
);
48 /**********************/
49 /* pseudo axis engine */
50 /**********************/
52 HklEngine
*hkl_engine_e6c_psi_new(void)
55 HklMode
*default_mode
;
57 self
= hkl_engine_psi_new();
59 default_mode
= psi_vertical();
60 hkl_engine_add_mode(self
, default_mode
);
61 hkl_engine_select_mode(self
, default_mode
);