Miscellaneous Support#
Source Code Documentation#
Miscellaneous Support.
|
Raise ValueError exception if value is not in the list of examples. |
|
Compare two dictionaries. |
|
Load a Solver class from a named entry point. |
|
Load YAML from text. |
|
|
|
Round a number to specified precision. |
|
Create a Solver object with geometry and axes. |
|
Dictionary of available Solver classes, mapped by entry point name. |
|
Short, unique name, first 7 (at most) characters of a unique, random uuid. |
Name by which hklpy2 backend Solver classes are grouped. |
Custom exceptions from |
|
Custom exceptions from |
|
Custom exceptions from |
|
Custom exceptions from |
|
Custom exceptions from |
|
Custom exceptions from |
|
Custom exceptions from |
|
Custom exceptions from a Solver. |
|
Custom exceptions from |
- exception hklpy2.operations.misc.ConfigurationError[source]#
Bases:
Hklpy2Error
Custom exceptions from
hklpy2.operations.configure
.- add_note()#
Exception.add_note(note) – add a note to the exception
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception hklpy2.operations.misc.ConstraintsError[source]#
Bases:
Hklpy2Error
Custom exceptions from
hklpy2.operations.constraints
.- add_note()#
Exception.add_note(note) – add a note to the exception
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception hklpy2.operations.misc.DiffractometerError[source]#
Bases:
Hklpy2Error
Custom exceptions from
DiffractometerBase
.- add_note()#
Exception.add_note(note) – add a note to the exception
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception hklpy2.operations.misc.LatticeError[source]#
Bases:
Hklpy2Error
Custom exceptions from
hklpy2.operations.lattice
.- add_note()#
Exception.add_note(note) – add a note to the exception
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception hklpy2.operations.misc.OperationsError[source]#
Bases:
Hklpy2Error
Custom exceptions from
Operations
.- add_note()#
Exception.add_note(note) – add a note to the exception
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception hklpy2.operations.misc.ReflectionError[source]#
Bases:
Hklpy2Error
Custom exceptions from
hklpy2.operations.reflection
.- add_note()#
Exception.add_note(note) – add a note to the exception
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- hklpy2.operations.misc.SOLVER_ENTRYPOINT_GROUP = 'hklpy2.solver'#
Name by which hklpy2 backend Solver classes are grouped.
- exception hklpy2.operations.misc.SampleError[source]#
Bases:
Hklpy2Error
Custom exceptions from
hklpy2.operations.sample
.- add_note()#
Exception.add_note(note) – add a note to the exception
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception hklpy2.operations.misc.SolverError[source]#
Bases:
Hklpy2Error
Custom exceptions from a Solver.
- add_note()#
Exception.add_note(note) – add a note to the exception
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception hklpy2.operations.misc.WavelengthError[source]#
Bases:
Hklpy2Error
Custom exceptions from
hklpy2.wavelength_support
.- add_note()#
Exception.add_note(note) – add a note to the exception
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- hklpy2.operations.misc.check_value_in_list(title, value, examples, blank_ok=False)[source]#
Raise ValueError exception if value is not in the list of examples.
- hklpy2.operations.misc.compare_float_dicts(a1, a2, tol=0.0001)[source]#
Compare two dictionaries. Values are all floats.
- hklpy2.operations.misc.get_solver(solver_name)[source]#
Load a Solver class from a named entry point.
import hklpy2 SolverClass = hklpy2.get_solver("hkl_soleil") libhkl_solver = SolverClass()
- hklpy2.operations.misc.solver_factory(solver_name: str, geometry: str, **kwargs)[source]#
Create a Solver object with geometry and axes.