Functions
E4ch()
#define             E4ch(_w, _o, _c, _p, _t)
 
E4cv()
#define             E4cv(_w, _o, _c, _p, _t)
 
E6c()
#define             E6c(_w, _m, _ko, _ka, _kp, _g, _d)
 
K4ch()
#define             K4ch(_w, _o, _c, _p, _t)
 
K4cv()
#define             K4cv(_w, _o, _c, _p, _t)
 
K6c()
#define             K6c(_w, _m, _ko, _ka, _kp, _g, _d)
 
SoleilNanoscopiumRobot()
#define             SoleilNanoscopiumRobot(_w,  _rz, _rs, _rx, _r, _d, _g)
 
SoleilSiriusKappa()
#define             SoleilSiriusKappa(_w,  _m, _ko, _ka, _kp, _d, _g)
 
SoleilSixsMed2_3()
#define             SoleilSixsMed2_3(_w, _b, _m, _o, _g, _d, _e)
 
SoleilSixsMed2_3_v2()
#define             SoleilSixsMed2_3_v2(_w, _m, _o, _g, _d, _e)
 
Zaxis()
#define             Zaxis(_w, _m, _o, _d, _g)
 
newGeometry ()
HklGeometry *
newGeometry (struct Geometry geometry);
 
newEngines ()
HklEngineList *
newEngines (struct Geometry geometry);
 
Cubic()
#define Cubic(_a) {.tag=LATTICE_CUBIC, .cubic={_a}}
 
Hexagonal()
#define Hexagonal(_a, _c) {.tag=LATTICE_HEXAGONAL, .hexagonal={_a, _c}}
 
Tetragonal()
#define Tetragonal(_a, _c) {.tag=LATTICE_TETRAGONAL, .tetragonal={_a, _c}}
 
newLattice ()
HklLattice *
newLattice (struct Lattice lattice);
 
newSample ()
HklSample *
newSample (struct Sample sample);
 
getModeName ()
const char *
getModeName (struct Mode mode);
 
EngineHkl()
#define EngineHkl(h_, k_, l_, mode_) {.tag=ENGINE_HKL, .hkl={h_, k_, l_, mode_}}
 
Engine_fprintf ()
void
Engine_fprintf (FILE *f,
                struct Engine engine);
 
Engine_header ()
void
Engine_header (FILE *f,
               const struct Engine engine);
 
Engine_save_as_dat ()
void
Engine_save_as_dat (FILE *f,
                    const struct Engine engine);
 
TrajectoryHklFromTo()
#define TrajectoryHklFromTo(h0_, k0_, l0_, h1_, k1_, l1_, n_, mode_) {.tag=TRAJECTORY_HKL_FROM_TO, .hklfromto={h0_, k0_, l0_, h1_, k1_, l1_, n_, .mode=mode_}}
 
generator_declare ()
extern
generator_declare (trajectory_gen Param1,
                   struct Engine Param2,
                   struct Trajectory Param3,
                   tconfig Param4);
 
Trajectory_len ()
uint
Trajectory_len (struct Trajectory tconfig);
 
Trajectory_solve ()
HklGeometryList *
Trajectory_solve (struct Trajectory tconfig,
                  struct Geometry gconfig,
                  struct Sample sconfig,
                  uint move);
 
 
Types and Values
struct Geometry
struct Geometry {
	enum geometry_e tag;
	union {
		struct {
			double wavelength;
			union {
				double positions[4];
				struct {
					double omega;
					double chi;
					double phi;
					double tth;
				};
			};
		} e4ch;
		struct {
			double wavelength;
			union {
				double positions[4];
				struct {
					double omega;
					double chi;
					double phi;
					double tth;
				};
			};
		} e4cv;
		struct {
			double wavelength;
			union {
				double positions[6];
				struct {
					double mu;
					double komega;
					double kappa;
					double kphi;
					double gamma;
					double delta;
				};
			};
		} e6c;
		struct {
			double wavelength;
			union {
				double positions[4];
				struct {
					double komega;
					double kappa;
					double kphi;
					double tth;
				};
			};
		} k4ch;
		struct {
			double wavelength;
			union {
				double positions[4];
				struct {
					double komega;
					double kappa;
					double kphi;
					double tth;
				};
			};
		} k4cv;
		struct {
			double wavelength;
			union {
				double positions[6];
				struct {
					double mu;
					double komega;
					double kappa;
					double kphi;
					double gamma;
					double delta;
				};
			};
		} k6c;
		struct {
			double wavelength;
			union {
				double positions[6];
				struct {
					double rz;
					double rs;
					double rx;
					double r;
					double delta;
					double gamma;
				};
			};
		} soleil_nanoscopium_robot;
		struct {
			double wavelength;
			union {
				double positions[6];
				struct {
					double mu;
					double komega;
					double kappa;
					double kphi;
					double delta;
					double gamma;
				};
			};
		} soleil_sirius_kappa;
		struct {
			double wavelength;
			union {
				double positions[6];
				struct {
					double beta;
					double mu;
					double omega;
					double gamma;
					double delta;
					double eta_a;
				};
			};
		} soleil_sixs_med_2_3;
		struct {
			double wavelength;
			union {
				double positions[5];
				struct {
					double mu;
					double omega;
					double gamma;
					double delta;
					double eta_a;
				};
			};
		} soleil_sixs_med_2_3_v2;
		struct {
			double wavelength;
			union {
				double positions[4];
				struct {
					double mu;
					double omega;
					double delta;
					double gamma;
				};
			};
		} zaxis;
	};
};
 
struct Lattice
struct Lattice {
	enum lattice_e tag;
	union {
		struct { double a; } cubic;
		struct { double a; double c; } hexagonal;
		struct { double a; double c; } tetragonal;
	};
};
 
struct Sample
struct Sample {
	const char *name;
	struct Lattice lattice;
	double ux;
	double uy;
	double uz;
};
 
struct Mode
struct Mode {
	enum mode_e tag;
};
 
ModeHklBissectorVertical
#define ModeHklBissectorVertical { .tag=MODE_HKL_BISSECTOR_VERTICAL }
 
ModeHklE4CHConstantPhi
#define ModeHklE4CHConstantPhi { .tag=MODE_HKL_E4CH_CONSTANT_PHI }
 
struct Engine
struct Engine {
	enum engine_e tag;
	union {
		struct {double h; double k; double l; struct Mode mode;} hkl;
	};
};
 
struct Trajectory
struct Trajectory {
	enum trajectory_e tag;
	union {
		struct {double h0; double k0; double l0;
			double h1; double k1; double l1;
			uint n; struct Mode mode;} hklfromto;
	};
};