hkl2: hkl Reference Manual

## hkl2 hkl2 |

## Functions

#define | E4ch()
#define | E4cv()
#define | E6c()
#define | K4ch()
#define | K4cv()
#define | K6c()
#define | SoleilNanoscopiumRobot()
#define | SoleilSiriusKappa()
#define | SoleilSixsMed2_3()
#define | SoleilSixsMed2_3_v2()
#define | Zaxis()
HklGeometry * | newGeometry ()
HklEngineList * | newEngines ()
#define | Cubic()
#define | Hexagonal()
#define | Tetragonal()
HklLattice * | newLattice ()
HklSample * | newSample ()
const char * | getModeName ()
#define | EngineHkl()
void | Engine_fprintf ()
void | Engine_header ()
void | Engine_save_as_dat ()
HklGeometryList * | Engine_solve ()
#define | TrajectoryHklFromTo()
extern | generator_declare ()
uint | Trajectory_len ()
HklGeometryList * | Trajectory_solve ()

## Types and Values

enum | geometry_e
struct | Geometry
enum | lattice_e
struct | Lattice
struct | Sample
enum | mode_e
struct | Mode
#define | ModeHklBissectorVertical
#define | ModeHklE4CHConstantPhi
enum | engine_e
struct | Engine
enum | trajectory_e
struct | Trajectory

## Description

## 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);

### Engine_solve ()

    HklGeometryList *
    Engine_solve (HklEngineList *engines,
                  struct Engine econfig);

### 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

### enum geometry_e

#### Members

GEOMETRY_E4CH |  |
GEOMETRY_E4CV |  |
GEOMETRY_E6C |  |
GEOMETRY_K4CH |  |
GEOMETRY_K4CV |  |
GEOMETRY_K6C |  |
GEOMETRY_SOLEIL_NANOSCOPIUM_ROBOT |  |
GEOMETRY_SOLEIL_SIRIUS_KAPPA |  |
GEOMETRY_SOLEIL_SIXS_MED_2_3 |  |
GEOMETRY_SOLEIL_SIXS_MED_2_3_v2 |  |
GEOMETRY_ZAXIS |  |

### 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;
    	};
    };

### enum lattice_e

#### Members

LATTICE_CUBIC |  |
LATTICE_HEXAGONAL |  |
LATTICE_TETRAGONAL |  |

### 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;
    };

### enum mode_e

#### Members

MODE_HKL_BISSECTOR_VERTICAL |  |
MODE_HKL_E4CH_CONSTANT_PHI |  |

### 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 }

### enum engine_e

#### Members

ENGINE_HKL |  |

### struct Engine

    struct Engine {
    	enum engine_e tag;
    	union {
    		struct {double h; double k; double l; struct Mode mode;} hkl;
    	};
    };

### enum trajectory_e

#### Members

TRAJECTORY_HKL_FROM_TO |  |

### 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;
    	};
    };