add the SOLEIL SIRIUS KAPPA diffractometer
[hkl.git] / hkl / hkl-lattice.h
blob40219c92f3fc3e38ebbb30c4fa78e46624f2c68e
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-2010 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 #ifndef __HKL_LATTICE_H__
23 #define __HKL_LATTICE_H__
25 #include <hkl/hkl-parameter.h>
26 #include <hkl/hkl-matrix.h>
28 HKL_BEGIN_DECLS
30 typedef struct _HklLattice HklLattice;
32 struct _HklLattice
34 HklParameter *a;
35 HklParameter *b;
36 HklParameter *c;
37 HklParameter *alpha;
38 HklParameter *beta;
39 HklParameter *gamma;
42 extern HklLattice *hkl_lattice_new(double a, double b, double c,
43 double alpha, double beta, double gamma);
44 extern HklLattice *hkl_lattice_new_copy(HklLattice const *self);
45 extern HklLattice *hkl_lattice_new_default(void);
47 extern void hkl_lattice_free(HklLattice *self);
49 extern int hkl_lattice_set(HklLattice *self,
50 double a, double b, double c,
51 double alpha, double beta, double gamma);
53 extern int hkl_lattice_get_B(HklLattice const *self, HklMatrix *B);
55 extern int hkl_lattice_get_1_B(const HklLattice *self, HklMatrix *B);
57 extern int hkl_lattice_reciprocal(HklLattice const *self, HklLattice *r);
59 extern void hkl_lattice_randomize(HklLattice *self);
61 extern void hkl_lattice_fprintf(FILE *f, HklLattice const *self);
63 HKL_END_DECLS
65 #endif /* __HKL_LATTICE_H__ */