upgrading copyright year from 2015 to 2016
[hkl.git] / hkl / hkl-engine-2c.c
blob6713c9dd6b41de02db45596677c75e577117ff2c
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-2016 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 "hkl-macros-private.h"
23 #include "hkl-factory-private.h" // for autodata_factories_, etc
24 #include "hkl-pseudoaxis-private.h" // for hkl_engine_list_add, etc
25 #include "hkl/ccan/array_size/array_size.h"
27 #define OMEGA "omega"
28 #define TTH "tth"
30 #define HKL_GEOMETRY_TWOC_DESCRIPTION \
31 "+ xrays source fix allong the :math:`\\vec{x}` direction (1, 0, 0)\n" \
32 "+ 1 axes for the sample\n" \
33 "\n" \
34 " + **" OMEGA "** : rotating around the :math:`-\\vec{y}` direction (0, -1, 0)\n" \
35 "\n" \
36 "+ 1 axis for the detector\n" \
37 "\n" \
38 " + **" TTH "** : rotation around the :math:`-\\vec{y}` direction (0, -1, 0)\n"
40 static const char* hkl_geometry_twoC_axes[] = {OMEGA, TTH};
42 static HklGeometry *hkl_geometry_new_twoC(const HklFactory *factory)
44 HklGeometry *self = hkl_geometry_new(factory);
45 HklHolder *h;
47 h = hkl_geometry_add_holder(self);
48 hkl_holder_add_rotation_axis(h, OMEGA, 0, -1, 0);
50 h = hkl_geometry_add_holder(self);
51 hkl_holder_add_rotation_axis(h, TTH, 0, -1, 0);
53 return self;
56 static HklEngineList *hkl_engine_list_new_twoC(const HklFactory *factory)
58 HklEngineList *self = hkl_engine_list_new();
60 return self;
63 REGISTER_DIFFRACTOMETER(twoC, "TwoC", HKL_GEOMETRY_TWOC_DESCRIPTION);