Skip to content

Commit

Permalink
MNT #325 set by kind="config"
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed May 14, 2024
1 parent f47867e commit c0e259e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions hkl/diffract.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,20 +315,17 @@ def __init__(
# fmt: off
prefix,
read_attrs=read_attrs,
configuration_attrs=configuration_attrs,
configuration_attrs=configuration_attrs, # write xtal info to descriptor
**kwargs,
# fmt: on
)

# write the crystal orientation information in descriptor doc
self.configuration_attrs += self._orientation_attrs
for attr in self.orientation_attrs.get():
getattr(self, attr).kind = "config"
self.energy_update_calc_flag.kind = "config"
self.orientation_attrs.kind = "config" # orientation written as descriptors
self._constraints_stack = []

if read_attrs is None:
# if unspecified, set the read attrs to the pseudo/real motor
# positions once known
self.read_attrs = list(self.PseudoPosition._fields) + list(self.RealPosition._fields)

self.energy.subscribe(self._energy_changed, event_type=Signal.SUB_VALUE)
self.energy_offset.subscribe(self._energy_offset_changed, event_type=Signal.SUB_VALUE)
self.energy_units.subscribe(self._energy_units_changed, event_type=Signal.SUB_VALUE)
Expand Down

0 comments on commit c0e259e

Please sign in to comment.