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, 2022 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 <math.h> // for cos, sin, M_PI, atan2, sqrt
23 #include <stdio.h> // for fprintf, FILE
24 #include <stdlib.h> // for NULL, free
25 #include "hkl-lattice-private.h" // for _HklLattice
26 #include "hkl-macros-private.h" // for HKL_MALLOC
27 #include "hkl-matrix-private.h" // for _HklMatrix
28 #include "hkl-parameter-private.h" // for hkl_parameter_init_copy, etc
29 #include "hkl-unit-private.h" // for hkl_unit_length_nm, etc
30 #include "hkl-vector-private.h" // for hkl_vector_angle, etc
31 #include "hkl.h" // for HklLattice, etc
35 static double convert_to_default(const HklParameter
*p
, double value
, HklUnitEnum unit_type
)
38 case HKL_UNIT_DEFAULT
:
41 return value
/ hkl_unit_factor(p
->unit
, p
->punit
);
47 static int check_lattice_param(double a
, double b
, double c
,
48 double alpha
, double beta
, double gamma
,
52 hkl_error (error
== NULL
|| *error
== NULL
);
54 double D
= 1. - cos(alpha
)*cos(alpha
) - cos(beta
)*cos(beta
)
55 - cos(gamma
)*cos(gamma
) + 2. * cos(alpha
)*cos(beta
)*cos(gamma
);
60 HKL_LATTICE_CHECK_LATTICE
,
61 "these lattice parameters are not valid, check alpha, beta and gamma");
64 *volume
= a
* b
* c
* sqrt(D
);
73 * @a: the length of the a parameter
74 * @b: the length of the b parameter
75 * @c: the length of the c parameter
76 * @alpha: the angle between b and c (radian)
77 * @beta: the angle between a and c (radian)
78 * @gamma: the angle between a and b (radian)
79 * @error: return location for a GError, or NULL
83 * Returns: a new HklLattice
85 HklLattice
*hkl_lattice_new(double a
, double b
, double c
,
86 double alpha
, double beta
, double gamma
,
89 HklLattice
*self
= NULL
;
92 hkl_error (error
== NULL
|| *error
== NULL
);
94 if(!check_lattice_param(a
, b
, c
, alpha
, beta
, gamma
, &volume
, error
))
96 hkl_assert (error
== NULL
|| *error
!= NULL
);
99 hkl_assert (error
== NULL
|| *error
== NULL
);
101 self
= g_new(HklLattice
, 1);
103 self
->a
= hkl_parameter_new("a", "The length of the first lattice vector",
107 &hkl_unit_length_nm
);
108 self
->b
= hkl_parameter_new("b", "The length of the second lattice vector",
112 &hkl_unit_length_nm
);
113 self
->c
= hkl_parameter_new("c", "The length of the third lattice vector",
117 &hkl_unit_length_nm
);
118 self
->alpha
= hkl_parameter_new("alpha",
119 "The angle between the second and third lattice vector",
123 &hkl_unit_angle_deg
);
124 self
->beta
= hkl_parameter_new("beta",
125 "The angle between the first and third lattice vector",
129 &hkl_unit_angle_deg
);
130 self
->gamma
= hkl_parameter_new("gamma",
131 "The angle between the first and second lattice vector",
135 &hkl_unit_angle_deg
);
136 self
->volume
= hkl_parameter_new("volume",
137 "The volume of the lattice",
141 &hkl_unit_length_nm
);
147 * hkl_lattice_new_copy: (skip)
154 HklLattice
*hkl_lattice_new_copy(const HklLattice
*self
)
156 HklLattice
*copy
= g_new(HklLattice
, 1);
158 copy
->a
= hkl_parameter_new_copy(self
->a
);
159 copy
->b
= hkl_parameter_new_copy(self
->b
);
160 copy
->c
= hkl_parameter_new_copy(self
->c
);
161 copy
->alpha
= hkl_parameter_new_copy(self
->alpha
);
162 copy
->beta
= hkl_parameter_new_copy(self
->beta
);
163 copy
->gamma
= hkl_parameter_new_copy(self
->gamma
);
164 copy
->volume
= hkl_parameter_new_copy(self
->volume
);
170 * hkl_lattice_new_default: (skip)
172 * default constructor
176 HklLattice
* hkl_lattice_new_default(void)
178 return hkl_lattice_new(1.54, 1.54, 1.54,
179 90*HKL_DEGTORAD
, 90*HKL_DEGTORAD
, 90*HKL_DEGTORAD
,
184 * hkl_lattice_free: (skip)
189 void hkl_lattice_free(HklLattice
*self
)
191 hkl_parameter_free(self
->a
);
192 hkl_parameter_free(self
->b
);
193 hkl_parameter_free(self
->c
);
194 hkl_parameter_free(self
->alpha
);
195 hkl_parameter_free(self
->beta
);
196 hkl_parameter_free(self
->gamma
);
197 hkl_parameter_free(self
->volume
);
201 #define HKL_LATTICE_X_SET(_p, _parameter, _error) do{ \
202 hkl_error ((_error) == NULL || *(_error) == NULL); \
203 double a, b, c, alpha, beta, gamma; \
204 /* check if the combinaison of parameters is ok */ \
205 hkl_lattice_get(self, &a, &b, &c, &alpha, &beta, &gamma, HKL_UNIT_DEFAULT); \
206 _p = hkl_parameter_value_get((_parameter), HKL_UNIT_DEFAULT); \
208 if(!hkl_lattice_set(self, a, b, c, alpha, beta, gamma, HKL_UNIT_DEFAULT, (_error))){ \
209 hkl_assert ((_error) == NULL || *(_error) != NULL); \
212 hkl_assert ((_error) == NULL || *(_error) == NULL); \
213 return hkl_parameter_init_copy(self->_p, (_parameter), (_error)); \
218 * @self: the this ptr
220 const HklParameter
*hkl_lattice_a_get(const HklLattice
*self
)
227 * @self: the this ptr
228 * @parameter: the parameter to set
229 * @error: return location for a GError, or NULL
231 * Returns: TRUE on success, FALSE if an error occurred
233 int hkl_lattice_a_set(HklLattice
*self
, const HklParameter
*parameter
,
236 HKL_LATTICE_X_SET(a
, parameter
, error
);
241 * @self: the this ptr
243 const HklParameter
*hkl_lattice_b_get(const HklLattice
*self
)
250 * @self: the this ptr
251 * @parameter: the parameter to set
252 * @error: return location for a GError, or NULL
254 * Returns: TRUE on success, FALSE if an error occurred
256 int hkl_lattice_b_set(HklLattice
*self
, const HklParameter
*parameter
,
259 HKL_LATTICE_X_SET(b
, parameter
, error
);
264 * @self: the this ptr
266 const HklParameter
*hkl_lattice_c_get(const HklLattice
*self
)
273 * @self: the this ptr
274 * @parameter: the parameter to set
275 * @error: return location for a GError, or NULL
277 * Returns: TRUE on success, FALSE if an error occurred
279 int hkl_lattice_c_set(HklLattice
*self
, const HklParameter
*parameter
,
282 HKL_LATTICE_X_SET(c
, parameter
, error
);
286 * hkl_lattice_alpha_get:
287 * @self: the this ptr
289 const HklParameter
*hkl_lattice_alpha_get(const HklLattice
*self
)
295 * hkl_lattice_alpha_set:
296 * @self: the this ptr
297 * @parameter: the parameter to set
298 * @error: return location for a GError, or NULL
300 * Returns: TRUE on success, FALSE if an error occurred
302 int hkl_lattice_alpha_set(HklLattice
*self
, const HklParameter
*parameter
,
305 HKL_LATTICE_X_SET(alpha
, parameter
, error
);
309 * hkl_lattice_beta_get:
310 * @self: the this ptr
312 const HklParameter
*hkl_lattice_beta_get(const HklLattice
*self
)
318 * hkl_lattice_beta_set:
319 * @self: the this ptr
320 * @parameter: the parameter to set
321 * @error: return location for a GError, or NULL
323 * Returns: TRUE on success, FALSE if an error occurred
325 int hkl_lattice_beta_set(HklLattice
*self
, const HklParameter
*parameter
,
328 HKL_LATTICE_X_SET(beta
, parameter
, error
);
332 * hkl_lattice_gamma_get:
333 * @self: the this ptr
335 const HklParameter
*hkl_lattice_gamma_get(const HklLattice
*self
)
341 * hkl_lattice_gamma_set:
342 * @self: the this ptr
343 * @parameter: the parameter to set
344 * @error: return location for a GError, or NULL
346 * Returns: TRUE on success, FALSE if an error occurred
348 int hkl_lattice_gamma_set(HklLattice
*self
, const HklParameter
*parameter
,
351 HKL_LATTICE_X_SET(gamma
, parameter
, error
);
355 * hkl_lattice_volume_get:
356 * @self: the this ptr
358 const HklParameter
*hkl_lattice_volume_get(const HklLattice
*self
)
364 * hkl_lattice_lattice_set: (skip)
365 * @self: the this ptr
366 * @lattice: the lattice to set from.
368 void hkl_lattice_lattice_set(HklLattice
*self
, const HklLattice
*lattice
)
373 hkl_parameter_init_copy(self
->a
, lattice
->a
, NULL
);
374 hkl_parameter_init_copy(self
->b
, lattice
->b
, NULL
);
375 hkl_parameter_init_copy(self
->c
, lattice
->c
, NULL
);
376 hkl_parameter_init_copy(self
->alpha
, lattice
->alpha
, NULL
);
377 hkl_parameter_init_copy(self
->beta
, lattice
->beta
, NULL
);
378 hkl_parameter_init_copy(self
->gamma
, lattice
->gamma
, NULL
);
379 hkl_parameter_init_copy(self
->volume
, lattice
->volume
, NULL
);
392 * set the lattice parameters
396 int hkl_lattice_set(HklLattice
*self
,
397 double a
, double b
, double c
,
398 double alpha
, double beta
, double gamma
,
399 HklUnitEnum unit_type
, GError
**error
)
401 hkl_error (error
== NULL
|| *error
== NULL
);
403 double _a
, _b
, _c
, _alpha
, _beta
, _gamma
;
406 _a
= convert_to_default(self
->a
, a
, unit_type
);
407 _b
= convert_to_default(self
->b
, b
, unit_type
);
408 _c
= convert_to_default(self
->c
, c
, unit_type
);
409 _alpha
= convert_to_default(self
->alpha
, alpha
, unit_type
);
410 _beta
= convert_to_default(self
->beta
, beta
, unit_type
);
411 _gamma
= convert_to_default(self
->gamma
, gamma
, unit_type
);
413 /* need to do the conversion before the check */
414 if(!check_lattice_param(_a
, _b
, _c
, _alpha
, _beta
, _gamma
, &_volume
, error
)){
415 hkl_assert (error
== NULL
|| *error
!= NULL
);
418 hkl_assert (error
== NULL
|| *error
== NULL
);
420 IGNORE(hkl_parameter_value_set(self
->a
, _a
, HKL_UNIT_DEFAULT
, NULL
));
421 IGNORE(hkl_parameter_value_set(self
->b
, _b
, HKL_UNIT_DEFAULT
, NULL
));
422 IGNORE(hkl_parameter_value_set(self
->c
, _c
, HKL_UNIT_DEFAULT
, NULL
));
423 IGNORE(hkl_parameter_value_set(self
->alpha
, _alpha
, HKL_UNIT_DEFAULT
, NULL
));
424 IGNORE(hkl_parameter_value_set(self
->beta
, _beta
, HKL_UNIT_DEFAULT
, NULL
));
425 IGNORE(hkl_parameter_value_set(self
->gamma
, _gamma
, HKL_UNIT_DEFAULT
, NULL
));
427 IGNORE(hkl_parameter_value_set(self
->volume
, _volume
, HKL_UNIT_DEFAULT
, NULL
));
435 * @a: (out caller-allocates):
436 * @b: (out caller-allocates):
437 * @c: (out caller-allocates):
438 * @alpha: (out caller-allocates):
439 * @beta: (out caller-allocates):
440 * @gamma: (out caller-allocates):
442 * get the lattice parameters
444 void hkl_lattice_get(const HklLattice
*self
,
445 double *a
, double *b
, double *c
,
446 double *alpha
, double *beta
, double *gamma
,
447 HklUnitEnum unit_type
)
449 *a
= hkl_parameter_value_get(self
->a
, unit_type
);
450 *b
= hkl_parameter_value_get(self
->b
, unit_type
);
451 *c
= hkl_parameter_value_get(self
->c
, unit_type
);
452 *alpha
= hkl_parameter_value_get(self
->alpha
, unit_type
);
453 *beta
= hkl_parameter_value_get(self
->beta
, unit_type
);
454 *gamma
= hkl_parameter_value_get(self
->gamma
, unit_type
);
458 * hkl_lattice_get_B: (skip)
460 * @B: (out): where to store the B matrix
462 * Get the B matrix from the lattice parameters
466 int hkl_lattice_get_B(const HklLattice
*self
, HklMatrix
*B
)
469 double c_alpha
, s_alpha
;
470 double c_beta
, s_beta
;
471 double c_gamma
, s_gamma
;
472 double b11
, b22
, tmp
;
474 c_alpha
= cos(hkl_parameter_value_get(self
->alpha
, HKL_UNIT_DEFAULT
));
475 c_beta
= cos(hkl_parameter_value_get(self
->beta
, HKL_UNIT_DEFAULT
));
476 c_gamma
= cos(hkl_parameter_value_get(self
->gamma
, HKL_UNIT_DEFAULT
));
477 D
= 1 - c_alpha
*c_alpha
- c_beta
*c_beta
- c_gamma
*c_gamma
478 + 2*c_alpha
*c_beta
*c_gamma
;
485 s_alpha
= sin(hkl_parameter_value_get(self
->alpha
, HKL_UNIT_DEFAULT
));
486 s_beta
= sin(hkl_parameter_value_get(self
->beta
, HKL_UNIT_DEFAULT
));
487 s_gamma
= sin(hkl_parameter_value_get(self
->gamma
, HKL_UNIT_DEFAULT
));
489 b11
= HKL_TAU
/ (hkl_parameter_value_get(self
->b
, HKL_UNIT_DEFAULT
) * s_alpha
);
490 b22
= HKL_TAU
/ hkl_parameter_value_get(self
->c
, HKL_UNIT_DEFAULT
);
493 B
->data
[0][0] = HKL_TAU
* s_alpha
/ (hkl_parameter_value_get(self
->a
, HKL_UNIT_DEFAULT
) * D
);
494 B
->data
[0][1] = b11
/ D
* (c_alpha
*c_beta
- c_gamma
);
495 B
->data
[0][2] = tmp
/ D
* (c_gamma
*c_alpha
- c_beta
);
499 B
->data
[1][2] = tmp
/ (s_beta
*s_gamma
) * (c_beta
*c_gamma
- c_alpha
);
509 * hkl_lattice_get_1_B: (skip)
510 * @self: the @HklLattice
511 * @B: (out): where to store the 1/B matrix
513 * Compute the invert of B (needed by the hkl_sample_UB_set method)
514 * should be optimized
516 * Returns: TRUE or FALSE depending of the success of the
519 int hkl_lattice_get_1_B(const HklLattice
*self
, HklMatrix
*B
)
530 * first compute the B matrix
535 hkl_lattice_get_B(self
, &tmp
);
538 * now invert this triangular matrix
547 B
->data
[0][0] = 1 / a
;
548 B
->data
[0][1] = -b
/ a
/ d
;
549 B
->data
[0][2] = (b
* e
- d
* c
) / a
/ d
/ f
;
552 B
->data
[1][1] = 1 / d
;
553 B
->data
[1][2] = -e
/ d
/ f
;
557 B
->data
[2][2] = 1 / f
;
563 * hkl_lattice_reciprocal:
564 * @self: the this ptr
565 * @reciprocal: the lattice where the result will be computed
567 * compute the reciprocal #HklLattice and put the result id the
568 * provided @reciprocal parameter
570 * Returns: 0 or 1 if it succeed.
572 int hkl_lattice_reciprocal(const HklLattice
*self
, HklLattice
*reciprocal
)
574 double c_alpha
, c_beta
, c_gamma
;
575 double s_alpha
, s_beta
, s_gamma
;
576 double c_beta1
, c_beta2
, c_beta3
;
577 double s_beta1
, s_beta2
, s_beta3
;
578 double s_beta_s_gamma
, s_gamma_s_alpha
, s_alpha_s_beta
;
581 c_alpha
= cos(hkl_parameter_value_get(self
->alpha
, HKL_UNIT_DEFAULT
));
582 c_beta
= cos(hkl_parameter_value_get(self
->beta
, HKL_UNIT_DEFAULT
));
583 c_gamma
= cos(hkl_parameter_value_get(self
->gamma
, HKL_UNIT_DEFAULT
));
584 D
= 1 - c_alpha
*c_alpha
- c_beta
*c_beta
- c_gamma
*c_gamma
585 + 2*c_alpha
*c_beta
*c_gamma
;
592 s_alpha
= sin(hkl_parameter_value_get(self
->alpha
, HKL_UNIT_DEFAULT
));
593 s_beta
= sin(hkl_parameter_value_get(self
->beta
, HKL_UNIT_DEFAULT
));
594 s_gamma
= sin(hkl_parameter_value_get(self
->gamma
, HKL_UNIT_DEFAULT
));
596 s_beta_s_gamma
= s_beta
* s_gamma
;
597 s_gamma_s_alpha
= s_gamma
* s_alpha
;
598 s_alpha_s_beta
= s_alpha
* s_beta
;
600 c_beta1
= (c_beta
* c_gamma
- c_alpha
) / s_beta_s_gamma
;
601 c_beta2
= (c_gamma
* c_alpha
- c_beta
) / s_gamma_s_alpha
;
602 c_beta3
= (c_alpha
* c_beta
- c_gamma
) / s_alpha_s_beta
;
603 s_beta1
= D
/ s_beta_s_gamma
;
604 s_beta2
= D
/ s_gamma_s_alpha
;
605 s_beta3
= D
/ s_alpha_s_beta
;
607 IGNORE(hkl_lattice_set(reciprocal
,
608 HKL_TAU
* s_alpha
/ (hkl_parameter_value_get(self
->a
, HKL_UNIT_DEFAULT
) * D
),
609 HKL_TAU
* s_beta
/ (hkl_parameter_value_get(self
->b
, HKL_UNIT_DEFAULT
) * D
),
610 HKL_TAU
* s_gamma
/ (hkl_parameter_value_get(self
->c
, HKL_UNIT_DEFAULT
) * D
),
611 atan2(s_beta1
, c_beta1
),
612 atan2(s_beta2
, c_beta2
),
613 atan2(s_beta3
, c_beta3
),
614 HKL_UNIT_DEFAULT
, NULL
));
620 * hkl_lattice_randomize: (skip)
623 * randomize the lattice
625 void hkl_lattice_randomize(HklLattice
*self
)
627 static HklVector vector_x
= {{1, 0, 0}};
630 unsigned int angles_to_randomize
;
632 /* La valeur des angles alpha, beta et gamma ne sont pas indépendant. */
633 /* Il faut donc gérer les différents cas. */
634 hkl_parameter_randomize(self
->a
);
635 hkl_parameter_randomize(self
->b
);
636 hkl_parameter_randomize(self
->c
);
638 angles_to_randomize
= self
->alpha
->fit
641 switch (angles_to_randomize
) {
645 if (self
->alpha
->fit
) {
647 a
= b
= c
= vector_x
;
650 hkl_vector_randomize_vector(&axe
, &a
);
651 hkl_vector_rotated_around_vector(&b
, &axe
,
652 hkl_parameter_value_get(self
->gamma
,
656 hkl_vector_randomize_vector(&axe
, &a
);
657 hkl_vector_rotated_around_vector(&c
, &axe
,
658 hkl_parameter_value_get(self
->beta
,
661 /* compute the alpha angle. */
662 IGNORE(hkl_parameter_value_set(self
->alpha
, hkl_vector_angle(&b
, &c
),
663 HKL_UNIT_DEFAULT
, NULL
));
664 } else if (self
->beta
->fit
) {
669 hkl_vector_randomize_vector(&axe
, &a
);
670 hkl_vector_rotated_around_vector(&b
, &axe
,
671 hkl_parameter_value_get(self
->gamma
,
676 hkl_vector_randomize_vector(&axe
, &b
);
677 hkl_vector_rotated_around_vector(&c
, &axe
,
678 hkl_parameter_value_get(self
->alpha
,
682 IGNORE(hkl_parameter_value_set(self
->beta
, hkl_vector_angle(&a
, &c
),
683 HKL_UNIT_DEFAULT
, NULL
));
689 hkl_vector_randomize_vector(&axe
, &a
);
690 hkl_vector_rotated_around_vector(&c
, &axe
,
691 hkl_parameter_value_get(self
->beta
,
696 hkl_vector_randomize_vector(&axe
, &c
);
697 hkl_vector_rotated_around_vector(&b
, &axe
,
698 hkl_parameter_value_get(self
->alpha
,
702 IGNORE(hkl_parameter_value_set(self
->gamma
, hkl_vector_angle(&a
, &b
),
703 HKL_UNIT_DEFAULT
, NULL
));
707 if (self
->alpha
->fit
) {
708 if (self
->beta
->fit
) {
713 hkl_vector_randomize_vector(&axe
, &a
);
714 hkl_vector_rotated_around_vector(&b
, &axe
,
715 hkl_parameter_value_get(self
->gamma
,
719 hkl_vector_randomize_vector_vector(&c
, &a
, &b
);
721 IGNORE(hkl_parameter_value_set(self
->alpha
, hkl_vector_angle(&b
, &c
),
722 HKL_UNIT_DEFAULT
, NULL
));
723 IGNORE(hkl_parameter_value_set(self
->beta
, hkl_vector_angle(&a
, &c
),
724 HKL_UNIT_DEFAULT
, NULL
));
730 hkl_vector_randomize_vector(&axe
, &a
);
731 hkl_vector_rotated_around_vector(&c
, &axe
,
732 hkl_parameter_value_get(self
->beta
,
736 hkl_vector_randomize_vector_vector(&b
, &a
, &c
);
738 IGNORE(hkl_parameter_value_set(self
->alpha
, hkl_vector_angle(&b
, &c
),
739 HKL_UNIT_DEFAULT
, NULL
));
740 IGNORE(hkl_parameter_value_set(self
->gamma
, hkl_vector_angle(&a
, &b
),
741 HKL_UNIT_DEFAULT
, NULL
));
748 hkl_vector_randomize_vector(&axe
, &b
);
749 hkl_vector_rotated_around_vector(&c
, &axe
,
750 hkl_parameter_value_get(self
->alpha
,
754 hkl_vector_randomize_vector_vector(&a
, &b
, &c
);
756 IGNORE(hkl_parameter_value_set(self
->beta
, hkl_vector_angle(&a
, &c
),
757 HKL_UNIT_DEFAULT
, NULL
));
758 IGNORE(hkl_parameter_value_set(self
->gamma
, hkl_vector_angle(&a
, &b
),
759 HKL_UNIT_DEFAULT
, NULL
));
763 hkl_vector_randomize(&a
);
764 hkl_vector_randomize_vector(&b
, &a
);
765 hkl_vector_randomize_vector_vector(&c
, &b
, &a
);
767 IGNORE(hkl_parameter_value_set(self
->alpha
, hkl_vector_angle(&b
, &c
),
768 HKL_UNIT_DEFAULT
, NULL
));
769 IGNORE(hkl_parameter_value_set(self
->beta
, hkl_vector_angle(&a
, &c
),
770 HKL_UNIT_DEFAULT
, NULL
));
771 IGNORE(hkl_parameter_value_set(self
->gamma
, hkl_vector_angle(&a
, &b
),
772 HKL_UNIT_DEFAULT
, NULL
));
778 * hkl_lattice_fprintf: (skip)
782 * print into a file the lattice.
784 void hkl_lattice_fprintf(FILE *f
, HklLattice
const *self
)
787 hkl_parameter_fprintf(f
, self
->a
);
789 hkl_parameter_fprintf(f
, self
->b
);
791 hkl_parameter_fprintf(f
, self
->c
);
793 hkl_parameter_fprintf(f
, self
->alpha
);
795 hkl_parameter_fprintf(f
, self
->beta
);
797 hkl_parameter_fprintf(f
, self
->gamma
);