Module: engine
#
Low-level support to Hkl computation engine support for diffractometers
|
Like calc parameter but needs reference to a geometry object. |
|
HKL calculation engine |
|
HKL library parameter object |
|
Solution of the conversion from (hkl) to axes. |
- class hkl.engine.CalcParameter(param, geometry, *args, **kwargs)[source]#
Like calc parameter but needs reference to a geometry object. Updates to the parameter should be propagated back to the geometry.
True if the parameter can be fit or not
Allowed range of values (low, high).
Position of this axis.
- Parameters:
param (HklParameter)
geometry (Geometry object)
- property fit#
True if the parameter can be fit or not
- property limits#
Allowed range of values (low, high).
- property value#
Position of this axis.
- class hkl.engine.Engine(calc, engine, engine_list)[source]#
HKL calculation engine
The calculation engine
HKL calculation mode (see also HklCalc.modes)
Name of this engine.
List the names of the additional parameters.
List the values of the additional parameters.
[(name, value)]
.List the names of the pseudo axes.
List the values of the pseudo positioners.
Allowed real solutions given the pseudo position.
The units used for calculations
update
()Calculate the pseudo axis positions from the real axis positions.
- property _units#
The (internal) units used for calculations
- property axes_c#
HKL real axis names (held constant during forward() computation).
- property axes_r#
HKL real axis names (read-only).
- property axes_w#
HKL real axis names (written by forward() computation).
- property engine#
The calculation engine
- property mode#
HKL calculation mode (see also HklCalc.modes)
- property name#
Name of this engine.
- property parameters#
List the names of the additional parameters.
- property parameters_values#
List the values of the additional parameters.
- property pseudo_axes#
[(name, value)]
.- Type:
List of pseudo axes as tuples
- property pseudo_axis_names#
List the names of the pseudo axes.
- property pseudo_positions#
List the values of the pseudo positioners.
- property solutions#
Allowed real solutions given the pseudo position.
- property units#
The units used for calculations
- class hkl.engine.Parameter(param, units='user', name=None, inverted=False)[source]#
HKL library parameter object
Is the value inverted internally?
The HKL library parameter object
Either
user
ordefault
.Name of this parameter.
Value used (in
forward()
method) if held constant by themode
.A string representing the user unit type
A string representing the default unit type
(low, high)
Example:
Parameter( name='None (internally: ux)', limits=(min=-180.0, max=180.0), value=0.0, fit=True, inverted=False, units='Degree')
- property default_units#
A string representing the default unit type
- property fit#
True if the parameter can be fit or not
- property hkl_parameter#
The HKL library parameter object
- property inverted#
Is the value inverted internally?
- property limits#
(low, high)
- property name#
Name of this parameter.
- property units#
Either
user
ordefault
.
- property user_units#
A string representing the user unit type
- class hkl.engine.Solution(engine, list_item, class_)[source]#
Solution of the conversion from (hkl) to axes.
List real axis names of the solution.
List real axis values of the solution.
select
()Select a solution.
units
- property axis_names#
List real axis names of the solution.
- property positions#
List real axis values of the solution.