Skip to content

Commit

Permalink
MNT #307 allow h, k, l to be int or float only
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Dec 12, 2023
1 parent bed59ca commit a59ba71
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions hkl/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,20 +333,22 @@ def reflections(self, refls):
for refl in refls:
self.add_reflection(*refl)

def add_reflection(self, h, k, l, position=None, detector=None, compute_ub=False):
def add_reflection(
self, h: (int, float), k: (int, float), l: (int, float), position=None, detector=None, compute_ub=False
):
"""Add a reflection, optionally specifying the detector to use
Parameters
----------
h : float
h : (int, float)
Reflection h
k : float
k : (int, float)
Reflection k
l : float
l : (int, float)
Reflection l
detector : Hkl.Detector, optional
The detector
position : tuple or namedtuple, optional
position : list, tuple, or namedtuple, optional
The physical motor position that this reflection corresponds to
If not specified, the current geometry of the calculation engine is
assumed.
Expand Down

0 comments on commit a59ba71

Please sign in to comment.