rename HklPseudoAxisEngine -> HklEngine
[hkl.git] / hkl / hkl-pseudoaxis-e4c-psi.c
blobfd2c2e80023c56d83d5025a0338466a0e1cf1285
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-e4c-private.h"
27 #include "hkl-pseudoaxis-common-psi-private.h"
29 static HklMode *psi(void)
31 static const char *axes[] = {"omega", "chi", "phi", "tth"};
32 static const HklFunction *functions[] = {&psi_func};
33 static const HklParameter parameters[] = {
34 {HKL_PARAMETER_DEFAULTS, .name = "h1", .range = {.min=-1, .max=1}, ._value=1,},
35 {HKL_PARAMETER_DEFAULTS, .name = "k1", .range = {.min=-1, .max=1}, ._value=1,},
36 {HKL_PARAMETER_DEFAULTS, .name = "l1", .range = {.min=-1, .max=1}, ._value=1,},
38 static const HklModeAutoInfo info = {
39 INFO_AUTO_WITH_PARAMS(__func__, axes, functions, parameters),
42 return hkl_mode_psi_new(&info);
45 HklEngine *hkl_engine_e4c_psi_new(void)
47 HklEngine *self;
48 HklMode *default_mode;
50 self = hkl_engine_psi_new();
52 default_mode = psi();
53 hkl_engine_add_mode(self, default_mode);
54 hkl_engine_select_mode(self, default_mode);
56 return self;