sample#
Import: hklpy2.blocks.sample
A Crystalline Sample.
|
A crystalline sample mounted on a diffractometer. |
Module Contents#
- class hklpy2.blocks.sample.Sample(core: object, name: str, lattice: Lattice)[source]#
Import:
hklpy2.blocks.sample.SampleA crystalline sample mounted on a diffractometer.
Note
Internal use only.
It is expected this class is called from a method of
Core, not directly by the user.Python Methods
Refine the lattice parameters from 3 or more reflections.
_validate_matrices(value, name)(internal) Validate U & UB matrices.
Python Properties
_asdict()Describe the sample as a dictionary.
Sample crystal lattice.
Sample name.
Ordered dictionary of orientation reflections.
remove_reflection(name)Remove the named reflection.
Return the matrix, U, crystal orientation on the diffractometer.
Return the crystal orientation matrix, UB.
Trueiff the orientation reflections have changed since the last successfulcalc_UBfor this sample.- property UB: Matrix3x3[source]#
Return the crystal orientation matrix, UB.
\(UB\) - orientation matrix
\(B\) - crystal lattice on the diffractometer
\(U\) - rotation matrix, relative orientation of crystal on diffractometer
- property UB_is_stale: bool[source]#
Trueiff the orientation reflections have changed since the last successfulcalc_UBfor this sample.Returns
Falsein any of these cases:calc_UBhas not been called for this sample (no snapshot to compare against),the user has assigned
UorUBdirectly (they have explicitly taken ownership of the matrix; the snapshot is cleared),the orientation reflections (
reflections.order[:2]and their physics-relevant contents) are unchanged since the lastcalc_UB.
Returns
Truewhenorder[:2]itself changes (reorder, prepend a new orienting reflection, remove an orienting one) or when an in-place mutation of one of the orienting reflections changes itspseudos,reals,wavelength, or unit fields. Reflections outsideorder[:2]do not affect staleness.
- property reflections: ReflectionsDict[source]#
Ordered dictionary of orientation reflections.