spec2nexus.diffractometers
#
source code documentation#
Describe SPEC diffractometer geometry #G control lines.
#G0 … G[] array (geo mode, sector, etc) #G1 … U[] array (lattice constants, orientation reflections) #G2 is unused #G3 … UB[] array (orientation matrix) #G4 … Q[] array (lambda, frozen angles, cut points, etc)
API
|
describe the diffractometer for the scan |
catalog of the diffractometer geometries known to SPEC |
|
|
split geo_name into geometry name and variation |
- class spec2nexus.diffractometers.Diffractometer(geo_name)[source]#
Bases:
object
describe the diffractometer for the scan
parse
(scan)print_all
(scan)Print All (pa) about this diffractometer scan.
print_brief
(scan)Print brief information (wh: where) about this diffractometer scan.
- property _Q_names#
List of names used to define Q (typically: h k l). All lower case.
- _get_Q_dict(info)[source]#
Dictionary with all the Q-related terms & values (hkl, for example).
PARAMETERS
- info dict :
from _get_info_dict()
- _get_info_dict(level='str')[source]#
Return dictionary for use in various reports.
PARAMETER
- level str :
Level of detail for desired report. One of these values:
pa
,str
,wh
. Default:str
- _positioners_dict(scan)[source]#
Dictionary with positioners (keys) and positions (values) in this scan.
PARAMETERS
- scan obj :
SPEC data file scan (a
spec2nexus.spec.SpecDataFileScan
object).
- class spec2nexus.diffractometers.DiffractometerGeometryCatalog[source]#
Bases:
object
catalog of the diffractometer geometries known to SPEC
geometries
([variations])list known geometries
get
(geo_name[, default])return dictionary for diffractometer geometry
geo_name
has_geometry
(geo_name)Is the
geo_name
geometry defined? True or Falsematch
(scan)Find the
geo_name
geometry that matches thescan
.- db = {}#
- class spec2nexus.diffractometers.KeyDescriptionValue(key, description, value)#
Bases:
tuple
- _asdict()#
Return a new dict which maps field names to their values.
- _field_defaults = {}#
- _fields = ('key', 'description', 'value')#
- classmethod _make(iterable)#
Make a new KeyDescriptionValue object from a sequence or iterable
- _replace(**kwds)#
Return a new KeyDescriptionValue object replacing specified fields with new values
- count(value, /)#
Return number of occurrences of value.
- description#
Alias for field number 1
- index(value, start=0, stop=9223372036854775807, /)#
Return first index of value.
Raises ValueError if the value is not present.
- key#
Alias for field number 0
- value#
Alias for field number 2
- class spec2nexus.diffractometers.LatticeParameters2D(a, b, gamma)#
Bases:
tuple
- _asdict()#
Return a new dict which maps field names to their values.
- _field_defaults = {}#
- _fields = ('a', 'b', 'gamma')#
- classmethod _make(iterable)#
Make a new LatticeParameters2D object from a sequence or iterable
- _replace(**kwds)#
Return a new LatticeParameters2D object replacing specified fields with new values
- a#
Alias for field number 0
- b#
Alias for field number 1
- count(value, /)#
Return number of occurrences of value.
- gamma#
Alias for field number 2
- index(value, start=0, stop=9223372036854775807, /)#
Return first index of value.
Raises ValueError if the value is not present.
- class spec2nexus.diffractometers.LatticeParameters3D(a, b, c, alpha, beta, gamma)#
Bases:
tuple
- _asdict()#
Return a new dict which maps field names to their values.
- _field_defaults = {}#
- _fields = ('a', 'b', 'c', 'alpha', 'beta', 'gamma')#
- classmethod _make(iterable)#
Make a new LatticeParameters3D object from a sequence or iterable
- _replace(**kwds)#
Return a new LatticeParameters3D object replacing specified fields with new values
- a#
Alias for field number 0
- alpha#
Alias for field number 3
- b#
Alias for field number 1
- beta#
Alias for field number 4
- c#
Alias for field number 2
- count(value, /)#
Return number of occurrences of value.
- gamma#
Alias for field number 5
- index(value, start=0, stop=9223372036854775807, /)#
Return first index of value.
Raises ValueError if the value is not present.
- class spec2nexus.diffractometers.Reflections2D(h, k, wavelength, angles)#
Bases:
tuple
- _asdict()#
Return a new dict which maps field names to their values.
- _field_defaults = {}#
- _fields = ('h', 'k', 'wavelength', 'angles')#
- classmethod _make(iterable)#
Make a new Reflections2D object from a sequence or iterable
- _replace(**kwds)#
Return a new Reflections2D object replacing specified fields with new values
- angles#
Alias for field number 3
- count(value, /)#
Return number of occurrences of value.
- h#
Alias for field number 0
- index(value, start=0, stop=9223372036854775807, /)#
Return first index of value.
Raises ValueError if the value is not present.
- k#
Alias for field number 1
- wavelength#
Alias for field number 2
- class spec2nexus.diffractometers.Reflections3D(h, k, l, wavelength, angles)#
Bases:
tuple
- _asdict()#
Return a new dict which maps field names to their values.
- _field_defaults = {}#
- _fields = ('h', 'k', 'l', 'wavelength', 'angles')#
- classmethod _make(iterable)#
Make a new Reflections3D object from a sequence or iterable
- _replace(**kwds)#
Return a new Reflections3D object replacing specified fields with new values
- angles#
Alias for field number 4
- count(value, /)#
Return number of occurrences of value.
- h#
Alias for field number 0
- index(value, start=0, stop=9223372036854775807, /)#
Return first index of value.
Raises ValueError if the value is not present.
- k#
Alias for field number 1
- l#
Alias for field number 2
- wavelength#
Alias for field number 3